texts:
Hello Magento community this is my first question so go easy on me, I will try to be as accurate as possible but I am a noob front-end with Magento.

What I am trying to achieve is: when user buys virtual products only, which automatically skips second step of the checkout, display address list at the billing step if user has saved address.

So far I managed to achieved this:

by adding:

<item name="beforeMethods" xsi:type="array">
<item name="children" xsi:type="array">
    <item name="billing-address-list" xsi:type="array">
        <item name="component" xsi:type="string">Custom_Checkout/js/view/billing-address/list</item>
    </item>
</item>

Inside checkout_index_index.xml

<item name="billing-step" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="children" xsi:type="array">
    <item name="payment" xsi:type="array">
        <item name="children" xsi:type="array">
            <item name="beforeMethods" xsi:type="array">
                <item name="children" xsi:type="array">
                    <item name="billing-address-list" xsi:type="array">
                        <item name="component" xsi:type="string">Custom_Checkout/js/view/billing-address/list</item>
                    </item>
                </item>
            </item>
            <item name="renders" xsi:type="array">

                <item name="children" xsi:type="array">
                    <item name="payzen-payments" xsi:type="array">
                        <item name="component" xsi:type="string">Lyranetwork_Payzen/js/view/payment/payzen-payments</item>
                    </item>
                </item>
            </item>
            <item name="afterMethods" xsi:type="array">
                <item name="children" xsi:type="array">
                    <item name="giftCardAccount" xsi:type="array">

                        <item name="config" xsi:type="array">
                            <item name="componentDisabled" xsi:type="boolean">true</item>
                        </item>
                    </item>
                    <item name="discount" xsi:type="array">

                        <item name="config" xsi:type="array">
                            <item name="componentDisabled" xsi:type="boolean">true</item>
                        </item>
                    </item>
                </item>
            </item>
            <item name="additional-payment-validators" xsi:type="array">
                <item name="children" xsi:type="array">
                    <item name="agreements-validator" xsi:type="array">
                        <item name="component" xsi:type="string">Illicado_Checkout/js/view/billing-address-validation</item>
                    </item>
                </item>
            </item>
        </item>
    </item>
</item>

billing-address/list.html

I would like to make it work and also get rid of this weird second address list element which for some reason appears.


texts: Add color picker in system.xml in serialized grid in Magento 2

texts:
I want to assign the color code to a particular customer group by the system.xml file.
I have successfully created the grid, but I am facing difficulty adding the color picker in the color column of the config setting. For clarification see below image:

Let me know if anyone has done this functionality. Appreciate it in advance.


texts:
I want to create a new order from an existing order (cart, products...etc)for other customers with a button "copy", Is it possible ?
Edit :

Imagine you have :

Order n°10001 Customer name : Magento, email : magento@magento.fr ...etc Customer products : computer ASUS , speakers...
Now you want to have exactly the same order with the other customer and the same products and with a different n° of order :
Order n°10002 Customer name : Ninad, email : Ninad@magento.fr ...etc products : computer ASUS , speakers...

So, first question : Is it possible ?

If yes, how can i do this ? i just don't know how to begin to do this in fact...


texts:
I'm experiencing the following issue in the graphql schema declaration in Magento2.
I use PhpStorm for development and, after installing the plugin JS GraphQL, it keeps prompting me errors on common directives as @doc, @resolver, ...

Does anyone know how to cope with this issue and let the plugin automatically recognize such directives as correct?
Thank you.


texts:
can we add  tag as child of any other  tag

<support_index_index>
    <reference name="content">
          <reference name="foo">
              <block type="support/support" name="support" template="support/support.phtml" />
          </reference>
    </reference>
</support_index_index>


texts: Where does Magento create the catalogsearch_fulltext_scope1 .. n tables?

texts:
Magento 2 creates one fulltext search table per store view, but I am wondering where exactly these are created and how I can force it.

Context: We have a setup script (InstallData) that creates store views, but in integration tests the fulltext tables for these store views are missing, which leads to errors from fixtures that try to save a product.

I tried reindexing in the setup script, after the stores were saved, but it did not help:

    ...

    $this->getIndexer('catalogsearch_fulltext')->reindexAll();
}

private function getIndexer($indexerId)
{
    return $this->indexerFactory->create()->load($indexerId);
}


texts:
In which table I can see ordered item's custom options and its chosen value.

I can see a product_options column in table sales_flat_order_item, but not sure is it same as product's or item's custom option?


texts: Hide all success as well as error message message after some interval

texts:
I want to hide all success messages after some interval. I have added following code in messages.js but it will not work on Add to cart success message. In short it will not working on messages which come from Ajax call.

  ...
  ....
 $.cookieStorage.set('mage-messages', '');
        setTimeout(function() {
            $(".messages").hide('blind', {}, 500)
        }, 5000);


texts: Magento2 Check Order Was Created by Admin or Customer?

texts: I want to check whether an order is created by an Admin or by the customer.


texts: Rendering: only  content visible on some pages

texts:
Almost all the page's render correct. Currently i have 1 (product) page which shows only the content of the  tag. When i view the source, the html,body, head tags are all gone (both opening and closing tag)

Instead of:

Content

All i get is

Content

When i clear all cache this problem is gone but then there will be another page with this problem so don't tell me to just refresh the cache ;)

When i change the product data in the backend, the changes are visible on the frontend but the problem remains. The content is correct.

This is the state of the project:

all caching is enabled
caching to redis cache (default+full page)
production mode
javascript NOT combined
css minified AND combined
static files are signed
the product does not have design updates or invalid content (it's not related to this product)
indexing is up to date
there is nothing significant in the log files
browser cache is disabled, CTRL+F5, ...

Edit: add screenshots


texts: How to group the options of an attribute in layered navigation frontend

texts:
How can I group the options of an attribute alphabetically in layered navigation frontend?

I have approx 300 options for an attribute and I need to group them, such as [A-C] [D-F], etc.

The idea is that clicking on [A-C] the users see all the options from A to C of that attribute, and so on.


texts: Is it advisable to put JS in the footer? Magento 1.9.x

texts:
A query is a good practice to put the JS in the footer in magento 1.9.x?
In Google Speed Test tells me that there are resources that clog the page when loading


texts: Editing _extend.less workflow extremely slow

texts:
I'm pretty new in Magento.

I'm a little confused about customizing theme CSS, by editing _extend.less file. Magento documentation says that this is the simplest way to edit theme CSS.
But any time I change a line in the less file I need to completely clear the pub/static and preprocessed folder, then run static deploy: this is extremely slow.

By enabling developer mode, which should be changing things in realtime, the site/admin is super slow, not practicable.

Is there a way such as save and refresh?

Thanks


texts: Magento 2: How use attributes options for the dropdown box?

texts:
I created a customer attribute. it is a dropdown box, I did create Options inside the attributes. It was use in customer profile page.
I have a checkout page, want to display this attributes dropdown box with all the options. It can call the user selected values.
Below is the XML for the dropdown box, what replacement I need to get the attributes option and generate the dropdown box?
<item name="checkout_industry" xsi:type="array">
   <item name="component" xsi:type="string">Magento_Ui/js/form/element/select</item>
   <item name="config" xsi:type="array">
       <item name="customScope" xsi:type="string">customCheckoutForm</item>
       <item name="template" xsi:type="string">ui/form/field</item>
       <item name="elementTmpl" xsi:type="string">ui/form/element/select</item>
   </item>
       <item name="options" xsi:type="array">
           <item name="0" xsi:type="array">
               <item name="label" xsi:type="string">Please select value</item>
               <item name="value" xsi:type="string"></item>
           </item>
           <item name="1" xsi:type="array">
               <item name="label" xsi:type="string">Value 1</item>
               <item name="value" xsi:type="string">value_1</item>
           </item>
           <item name="2" xsi:type="array">
               <item name="label" xsi:type="string">Value 2</item>
               <item name="value" xsi:type="string">value_2</item>
           </item>
       </item>
   <item name="value" xsi:type="string">value_2</item>
   <item name="provider" xsi:type="string">checkoutProvider</item>
   <item name="dataScope" xsi:type="string">customCheckoutForm.checkout_industry</item>
   <item name="label" xsi:type="string">Select Industry</item>
   <item name="sortOrder" xsi:type="string">5</item>


texts:
I am getting this error in my logs

PHP Fatal error:

  Declaration of
  Mage_Customer_Model_Customer_Attribute_Source_Website::getAllOptions()
  must be compatible with
  Mage_Eav_Model_Entity_Attribute_Source_Table::getAllOptions($withEmpty
  = true, $defaultValues = false) in
   /var/www/vhosts/goart/app/code/core/Mage/Customer/Model/Customer/Attribute/Source/Website.php
  on line 34


texts: Required return class of _retrieveCollection() in extending Magento API

texts:
I am creating my own resources by extending the Magento REST API, and I'm stuck on what object class should be returned on _retrieveCollection() for my API to render properly on both XML and JSON output.

My code is, roughly, as follows:

class Company_Module_Model_Api2_Invoice extends Mage_Api2_Model_Resource
{
    protected function _retrieveCollection()
    {
        //just can't get the proper object to return here. :(

    }

    protected function _retrieve() {
        $invoice_increment_id = $this->getRequest()->getParam('invoice_id');
        $invoice = Mage::getModel("sales/order_invoice")->loadByIncrementId($invoice_increment_id);
        return $invoice;

        //Mage_Sales_Model_Order_Invoice is a Mage_Sales_Model_Abstract
        //which in turn is a Mage_Core_Model_Abstract
        //Having a Mage_Core_Model_Abstract as a return renders perfectly
        //as json or xml :)

        //Also works with Mage_Sales_Model_Order which is a
        //Mage_Sales_Model_Abstract which in turn is a
        //Mage_Core_Model_Abstract
    }

    protected function _create() {
         ....
         //no matter what you return, this doesn't render any output.
    }

    protected function _delete() {
         ...
         //no matter what you return, this doesn't render any output.
    }

So the question is: What is the return type for _retrieveCollection()?

UPDATE:

@danny-dev-nz is correct with Mage_Sales_Model_Resource_Order_Invoice_Collection (and I guess any Mage_Core_Model_Resource_Db_Abstract)

I realized my problem is Magento versions. This is straightforward on a Magento 1.9.0.1 installation.

protected function _retrieveCollection()
{

     $order_increment_id = $this->getRequest()->getParam('order_id');
     $order = Mage::getModel("sales/order")->loadByIncrementId($order_increment_id);
     $invoices = $order->getInvoiceCollection();
     return $invoices;

}

Output on Magento "1.9.0.1"

Output on Magento "1.7.0.2" is quirky:


texts: Recently viewed/report issue Magento 1.9

texts:
We've got a few issues which I believe are all related to the same thing, I've looked into this various times and haven't got close to a solution:

Recently viewed doesn't work i.e. does not display any products for logged in and logged out users (product pages)
On the dashboard, 'Most Viewed Products' is empty
Table 'report_viewed_product_index' is empty/does not update - 'log_*' tables do not update either

It is my understanding that recently viewed is part of Mage Reports hence why I think these are all related. Ultimately, we want the recently viewed to work. The rest is a bonus.

I've tried:

Clearing the logs on command line
Refresh statistics
Various variations of showing recently viewed (see below)
Creating a CMS widget for recently viewed
Checked catalog.xml for appropriate recent product script

<?php echo $this->getChildHtml('product_recently_viewed'); ?>

<?php echo $this->getChildHtml('recently_viewed'); ?>

<?php $collection = Mage::getSingleton('Mage_Reports_Block_Product_Viewed')->getItemsCollection(); ?>

Our development website did have all of the above working (for reasons I won't go into, that development website is no longer accessible - we've seen had to create a new development website from the live website). The website build/files were the same.

We're working on Magento 1.9.2.1

Any insight will be greatly appreciated.


texts: how to keep URL parameters for conversion?

texts:
We have Facebook users that come to our website, and we need to count their purchases as the number of conversions.

for example, we have the following URL with parameters:

http://domain.com/pdppage?utm_source=Facebook&utm_medium=Facebook+Ads&utm_campaign=GoBat+Summer+2016

But when it goes to checkout and success page all the parameters will go away, I tried to create a session and set the variable, when I log the variable I can see that I have it, however, I need to show it on success page, so that It can be recorded on the Google Analytics, I was wondering maybe I should get an observer to observe the parameters, store them in session and then if user purchased an item show the parameters in the success URL. However, I do not know what kind of observer can do it. Here is what I did instead,

in product detail page I have the following:
app\design\frontend\enterprise\scosche\template\colorswatch\view.phtml

Mage::getSingleton('core/session')->setMyparams($this->getRequest()->getParams());

then In the success page and checkout I did the following:
app\design\frontend\enterprise\scosche\template\checkout\success.phtml

 Mage::getUrl('checkout/onepage/success',Mage::getSingleton('core/session')->getMyparams());

but how to make the success page to have the parameters in the browser? I don't think redirecting the page is a good idea.


texts: How to create custom reports in custom menu in admin magento 2?

texts: Actually i want create custom report based on sales ,product and custom data from custom module in admin side with graph


texts: How does one add a new country in Magento? (Curacao)

texts:
I've tried to add a country in Magento 1.7.0.2. I tried following this 'solution':
http://www.magentocommerce.com/boards/viewthread/226473/

Open lib/zend/locale/data/en.xml

Locate territories tag in this file

copy one of territory tags for the syntax and paste it within the territories tag

hard part here is to add country code in this file as might not be able to find a unique one, so it’s upto you.

Save this file

Open table name directory_country

It has predefined syntax follow then same and create a new row and enter the same country code as entered in the en.xml file in 3
columns.

Refresh the site’s cache.

Admin > Configuration > General this new country should be selected in list of allowed countries.

So I added this line in lib/zend/locale/data/en.xml:
<territory type="CW">Curacao</territory>

And the following in MySQL:
In directory_country

country_id    iso2_code   iso3_code
CW            CW          CUW

Next, I cleared the cache.. and Curacao was nowhere to be found. Does somebody know what's going wrong. Is it possible to add a country?
Thanks a lot

Edit:
I fixed my own problem, here's the solution:
Do everything as I said above, but make sure you add the territory tag to en.xml but also to whatever xml your storeview uses. In my case I had a Dutch storeview and it uses the dutch xml files, so I put the same exact territory tag in the nl.xml files.
Next, clear your cache and it appears in the dropdown menus!


texts: Get no order from product name or product description

texts:
I want create search field which can get order number from product name or product description in magento 1.9 ,

I've confuse since order number is placed in Mage::getModel('sales/order') and product name in Mage::getModel('catalog/product')

I don't know how to join them.


texts:
In Zend Framework we provide properties to layouts which are then consumed in the view. An example of this would be:

$this->layout = new Zend_Layout();
$this->layout->username = 'John';
$this->layout->email = 'john@foofoobunnies.edu';

Which I would later echo in my view.phtml:

<?= $this->username; ?>
<?= $this->email; ?>

However I find myself in Magento writing block methods that return entire objects to be consumed by the view - for instance:

Block/User.php

public function getUser(){
    return Mage::getModel('mymodule/user')->load($this->getUserId());
}

And in my user.phtml:

$user = $this->getUser();
echo $user->getUsername();
echo $this->getEmail();

Is there any way to cut out this step of having to write block methods to return relevant data? I've been using this method for 2-3 years so I'm no stranger to it, but it just seems like the Zend Two-Step/Composite view layout paradigm is much faster to hack on.

Edit

It just occurred to me that it may be possible to utilize block properties in the same manner that I utilize the block methods, e.g. $this->username where $this may be an object of type Mymodule_User_Block_User; though I don't know if this is an understood or accepted practice in Magento, as I haven't seen this too often.


texts: Magento 2 : How to Write Conditional Query in Collection Method

texts:
How to write this query in magento2 collection method ?

SELECT o.increment_id, o.base_grand_total, h.status,o.created_at , h.created_at
FROM sales_order AS o
RIGHT JOIN sales_order_status_history AS h ON h.parent_id = o.entity_id

WHERE h.status = 'processing_closed'
AND CONVERT(o.created_at, DATE) <= CONVERT('2018-04-10', DATE)
AND CONVERT(h.created_at, DATE) = CONVERT('2018-04-10', DATE)


texts:
Wanted to check the sample module for online payments from Magento, but noticed that the module is not anymore in Magento Github Repository.
Does anyone have any idea where can it be found?

Broken Link to Github from official documentation


texts: Magento 2.4.1 EE | Customer custom attribute created from admin but not saving value in DB

texts:
I am facing an issue with Magento2 EE website (Magento ver. 2.4.1) for customer custom attribute.
Found similar question here as well but not with any solutions.
When I create a new customer attribute in admin, attribute created and visible it in admin area but value is not saving. I noticed that the attribute data is not getting saved in the eav_entity_attribute table.
How can I fix it, please suggest.


texts:
Done anyone provide Magento 2 associate developer free practice test?
Or
Does anyone provide Magento 2 associate developer free study material?
Which type of question asked in the exam?
Thanks in advance


texts: Frontend and Backend menu not clickable in Magento 2.0

texts:
After installation of stable Magento 2.0, everything seemed to work fine but not the menus (frontend & backend - menu not clickable).

Further investigation showed 404 error for static/_requirejs/frontend/Magento/luma/en_US/requirejs-config.js file even though the file was there.

My nginx conf file looks like:

server {
    listen 80;
    server_name magento2.dev;
    set $MAGE_ROOT  /path/to/magento2;
    set $MAGE_MODE developer;
    include /path/to/magento2/nginx.conf.sample;
}

Any idea what can be the issue?


texts: Getting thumbnail AND normal size from image

texts:
I am using these two functions to get two different sizes of the same image (thumbnail and normal):

$thumb = Mage::helper('catalog/image')->init($_product, 'image', $image->getFile())->resize(100, 100);
$big = Mage::helper('catalog/image')->init($_product, 'image', $image->getFile());

But, when I want to call $thumb with an echo, it shows the $big value. If I turn $thumb and $big around, it does show the $thumb value, but not the $big value.

How do I sove this?


texts: Class interceptor does not exist magento 2

texts:
Class Vendor\Mymodule\Controller\Adminhtml\Allimports\Save\Interceptor does not exist

I have a custom form and when I save data this error message, how to fix it, except usage di: compile. Thank you.


texts: My Magento Contact page does not show the Submit Button

texts:
I need some help with my small but annoying problem.

While testing my new Magento website, I realised that in my contact page the SUBMIT button is not showing, and so the contact form can not be sent

I have tried with Safari, Chrome, Firefox all the same...

Please check it here:
http://www.stampaoffsetonline.com/weprint/contacts/

How can I solve this problem?

Any indication would be very much appreciated


texts:
I have already know how to get the POST value of Request.

I used to use this code below to get the value:

$this->getRequest()->getPostValue();

But how can I set the value of POST. Something like:

$this->getRequest()->setPostValue('value',$value);

or

$this->getRequest()->set('value',$value);

Is it possible?


texts: How to get product details and category id in shipping method?

texts:
I want to get product detail and category of that product, which product is added in cart. But I want those product in shipping method. I am using Fedex Shipping method. I want those details in this function.

app\code\core\Mage\Usa\Model\Shipping\Carrier\Fedex.php

protected function _prepareRateResponse($response)
{
     // Need Product details and category id of that product
}

Thank you in advanced!


texts: M2 | Cron is not auto executing on server

texts:
I created custom cron job, all jobs are running fine on local server but on staging jobs are scheduled but always stay pending or missed.

I can execute cron from backend using third party extension and every time I click button "Run Cron" to execute all jobs (default, custom) and pending states are created..

Is there some setting we need to build cron for server and then all jobs will be auto creating..? like

https://devdocs.magento.com/guides/v2.3/install-gde/install/post-install-config.html#post-install-cron


texts: Magento 2.4 - different checkout page for different store under one website

texts: I have 3 stores(store1, store2, store3) under 1 website(Main Website). Is it possible to have different checkout fields (custom checkout page) for the stores?


texts: How to create Product Type with multiple options

texts:
I have a requirement where one of my category and its sub-category will contain a product having following options

For example, I am selling apparel and the Tshirt category contains products.

Custom T-shirt is an example of T-shirt where the product becomes complex in variations. It would contain the following

11 Different Types of Color Options (no price change)
Each color will be combined with either white or black (no price
change)
Only 3 sizes will be available (each size with different price)

The product should be filtered in layered navigation with by Custom T-Shirt. On product detail page, the price will be shown based on the size selected by user.

How can I build above mentioned product type along with the attribute set and attribute ?

What would be the best practice in doing so ?

Thanks


texts: Magento 2.4 decline message disappears quickly - several quick fixes don't to the trick

texts:
I have a problem on my updated Magento 2.4 store. The error messages (like insufficient stock amount) disappear after a short time. Instead, I want them to be visible until the customer clicks on them. This should be standard behaviour in my opinion for error messages!
I checked the issue here, but the fix here did not work / the file is now different on Magento 2.4.
The overrides for vendor/magento/module-ui/view/frontend/web/template/messages.html did not work (source). I have changed the file from

div data-role="checkout-messages" class="messages"
data-bind="visible: isVisible(), click: removeAll"

to

div data-role="checkout-messages" class="messages" data-bind="click: removeAll">

Also, I did the suggested override for vendor/magento/module-ui/view/frontend/web/js/view/messages.js: I changed the values for the timeout

return Component.extend({
    defaults: {
        template: 'Magento_Ui/messages',
        selector: '[data-role=checkout-messages]',
        isHidden: false,
        hideTimeout: 30000,
        hideSpeed: 10000,
        listens: {
            isHidden: 'onHiddenChange'
        }
    },

I did the required bin/magento setup:upgrade and double checked every edit. Still, whenever there is an alert message, it disappears after a very short period of time. The annoying thing is, that it is not about styling or visibility, the whole message just disappears from the code.
For every success message, the structure is like this:

[MESSAGE  TEXT].

However when there is an error, there is just the wrapper class, so the whole HTML disappears:

For me, this is rather unusual and not elegantly solved. How do I prevent the message from being vanished?


texts: How to do db table collate change using update script?

texts:
I am trying to make a collate change (DEFAULT CHARSET=utf8 COLLATE utf8_general_ci) to db but not sure how? (magento1.9)

<?php
$installer = $this;
$installer->startSetup();

$installer->getConnection()

// how to do collate change here?

Help much appreciated,

Thanks
G


texts:
Using the quick-create-product option on Configurable Products gives an error. An AJAX call is made, the product is created but the JSON response is wrong. So the 'Please wait' overlay stays and the site appears to be frozen.
It is supposed to return:

{attributes: [{label: "Koper", value_index: "65", attribute_id: "136"}],…}

Which it does, on my local machine. But the live code returns an additional wrapper around the JSON response:

sitename_store2_idx2sitename_default_idx2sitename_store3_idx1{attributes: [{label: "Koper", value_index: "65", attribute_id: "136"}],…}

The codes of three store views in the website are in the name of that wrapper, with 'sitename_' and '_idx2' around it.

After that the response is managed by JavaScript code like so:

result.attributes.each(function(attribute)){...}

But since there is no result.attributes it does not work. The overlay remains and the loading gif stays visible so no buttons work either.

My local machine and the server are both on HEAD so it is the same code. I could make a JavaScript workaround but that's a dirty solution. For the time being I suggested using the regular 'create related item' but it still needs solving. Does anyone know what could cause this?


texts:
I've been editing within catalog/view/options/type/configurable.phtml and this other guy working on the template has been editing all over the place. Suddenly, the whole configurable options block (that renders configurable.phtml) went missing from the page. The following blocks are still in view.phtml:

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
                <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>

and

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
                <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
            <?php endif;?>

What else might be missing that would cause the disappearance of the configurable options block? There are no errors in the server or Magento logs that are applicable. Nor any JavaScript errors.


texts:
I have a magento remarketing tag but I can not configure it correctly. I have the following parameters:

var google_tag_params = {
ecomm_prodid: 'REPLACE_WITH_VALUE',
ecomm_pagetype: 'REPLACE_WITH_VALUE',
ecomm_totalvalue: 'REPLACE_WITH_VALUE',
dynx_itemid: 'REPLACE_WITH_VALUE',
dynx_itemid2: 'REPLACE_WITH_VALUE',
dynx_pagetype: 'REPLACE_WITH_VALUE',
dynx_totalvalue: 'REPLACE_WITH_VALUE',
};

This returns me the following errors:

Number field should not be quoted: 'ecomm_totalvalue'
Number field should not be quoted: 'dynx_totalvalue'

Code used:

(function(){
 try {
    url_atual = $j('#urlAtual').val();
    alert(url_atual);
  if(url_atual == "catalog"){
   var prodid, totalvalue;
   //page product/category
   totalvalue = $j('#valor_produto').val();
   prodid = $j('#id_produto').val();
   alert(totalvalue);
   alert(prodid);
   dataLayer.push({
    'event': 'fireRemarketingTag',
    google_tag_params: {
      'ecomm_prodid': prodid,
      'ecomm_pagetype': 'product',
      ecomm_totalvalue: totalvalue
    }
   });
  }
  else if (url_atual == "ajax") {
   var prodid, totalvalue;
  //cart
   console.log('entrou carrinho');
   dataLayer.push({
    'event': 'fireRemarketingTag',
    'google_tag_params': {
      'ecomm_prodid': prodid,
      'ecomm_pagetype': 'cart',
      'ecomm_totalvalue': totalvalue
    }
   });
  }
  else if (url_atual == "cms") {
   var prodid, totalvalue;
   //other pages/cms
   dataLayer.push({
    'event': 'fireRemarketingTag',
    'google_tag_params': {
      'ecomm_prodid': prodid,
      'ecomm_pagetype': 'purchase',
      'ecomm_totalvalue': totalvalue
    }
   });
  }
  else {
   dataLayer.push({
    'event': 'fireRemarketingTag',
    'google_tag_params': { }
   });
  }
 }
 catch (err) {}
}) ();

I have already tried setting up data layers but with no success. And after a lot of searching too, I did not find anything that could help me do the same setup on magento. Thanks in advance.


texts:
I've got a multisite installation: 2 websites: "Europe" and "Asia". Europe has 2 stores: "France" and "Germany". And "Asia" has only one store: "China".
"France" store as one storeview: "French". "Germany" has one storeview: "German". And "China" has 2 storviews: "Chinese" and "English".

The problem is when a new customer account is created in frontend in "Chinese" storeview, I've got in the backend site in "Account Information" tab "Send Welcome Email from "French" and if I change it to "Chinese" it does not change after saving the modification and the welcome email is sent to the customer in french language. Also "Associted to website" is "China" so it is ok. And in "Customer view" tab I've got "account created in chinese" which is ok. The same issue occures if the customer is created in "German storeview" or in "English". The system always displays in "Account Information" tab: "Send Welcome Email from "French".

Can someone help me please

Thanks


texts:
I have code that saves order details to a custom table:

    foreach($links as $link) {
        $pdf = Mage::getModel('custom_sales/pdf');
        $pdf->setOrderId($order->getId())
            ->setOrderIncrementId($order->getIncrementId())
            ->setLink($link)
            ->save();
    }

The code saves the records, and the order_id and link columns are correct, but the order increment id's are completely wrong e.g. an order with increment ID 15070100396216 has it's increment ID saved as 4294967295

The table structure is as follows:

  `entity_id` int(10) UNSIGNED NOT NULL auto_increment,
  `order_id` INTEGER(14) UNSIGNED NOT NULL,
  `order_increment_id` INTEGER(20) UNSIGNED NOT NULL,
  `link` VARCHAR(255) NOT NULL DEFAULT '',

Does anyone have any clue why this might be happening?


texts:
I can't find any settings in developer tab from backend about log in version 2.0.2

Someone can told me where to find it


texts: How to Remove a Block From layout Programatically in magento 2

texts:
i am trying to remove a Crossell from cart page  in my phtml file how i can do this

when i researched i found crosssell products are viewed in checkout_cart_index.xml file

as

<referenceContainer name="content">
            <block class="Magento\Checkout\Block\Cart" name="checkout.cart" template="Magento_Checkout::cart.phtml" cacheable="false">
                <container name="checkout.cart.items" as="with-items">
                    <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-" ifconfig="checkout/cart/crosssell_enabled">
                    </block>
                </container>
            </block>
        </referenceContainer>

i have tried following code

$layout =$this->getLayout();
$parent  = $layout->getBlock('checkout.cart');
if ($parent) {
   $parent->unsetChild('checkout.cart.crosssell');
 }

  i have tried each and every answer from stackexchange

i want to remove block on following condtion

if($sliderData->getSliderType()=='cross-sells')
        {
            $type = 'crosssell';
            $class = $type;
            $image = 'upsell_products_list';
            $sliderTitle = $sliderData->getSliderTitle();
            $sliderDescription= $sliderData->getSliderDescription();
            $items = $block->getCrossSellCollection($product);
            $exist = count($block->getCrossSellCollection($product));
            $limit = 4;
            $shuffle = 0;
            $showAddTo = true;
            $showCart = true;
            $templateType = null;
            $description = false;
            $canItemsAddToCart = false;
            $layout =$this->getLayout();
            $parent  = $layout->getBlock('checkout.cart');
            if ($parent) {
                $parent->unsetChild('checkout.cart.crosssell');
            }


texts: Is there a recommended way to temporarily suspend ordering?

texts:
I would like to prevent orders from being placed while an inventory update script runs.

We utilize a 3rd party warehouse management system (WMS) that has the final say in whether or not a part is in stock. Magento is configured to keep track of inventory (an order for 2 of SKU A will decrement SKU A's inventory by 2), but inevitably these systems become out of sync (due to defective or lost products, sales outside of Magento, etc). As such, we run an inventory sync every night where we request product counts from the WMS and update Magento with this data. The problem is that from the time we request the file until it finishes orders can still be placed in Magento and inventory can become out of sync. Since the update typically lasts ~15 mins, it was decided that Magento should just stop accepting orders during that time. Ideally, the site would still be navigable (is that a word?). I'd like to keep code changes to a minimum, but understand this probably cannot be achieved with configuration alone. A few of the avenues I've explored:

Raise the minimum order amount to 9999999 and set an error message saying, "We are undergoing server maintenance, ordering is temporarily disabled"
Touch maintenance.flag and remove when script completes

Alternatively, the inventory script can log the time it began and before updating inventory search for any orders from START_TIME until now to take into account anything the WMS did not know about. This seems like more work though and will certainly increase the processing time.


texts: Magento 2.4 Docker - Port must be configured within host parameter

texts:
I can start the setup via Command Line. And I get no Errors. But if i enter the homepage i got this error:
[2020-11-03 23:11:17] main.CRITICAL: Port must be configured within host parameter (like localhost:3306 {"exception":"[object] (Zend_Db_Adapter_Exception(code: 0): Port must be configured within host parameter (like localhost:3306 at /usr/share/nginx/html/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php:405)"} []


texts: How to get the block of new template magento 2

texts: i installed this theme http://magento2.flytheme.net/themes/sm_shop4u/default/ and i miss many block in my home page such as featured products , Deals of the week so how can i get them back or i have to create new block but how to know the right place to put them under featured product?? i am sorry if i can't explain very well i am new in magento 2 please help me


texts: I need a way to create a handling fee that is a percentage of an an item

texts: I have a client that needs a a handling fee of 14% of every item that a person purchases.  I have exhausted any further options to figure this out via magento connect.  Anyone have any Ideas?


texts: How to set Input for argument of mass actions

texts:
My case: I have the mass action for a selected products to make some math operations with a prices. At first step I have the "Change prices" action and the selecting on it gives me the mass actions with needed operation (+,-, * and so on).

  $operations = Mage::getSingleton('op/operations')->getOptionArray();

    array_unshift($operations, [
        'label' => '',
        'value' => ''
        ]);

    $this->getMassactionBlock()->addItem('Change price', array(
    'label' => Mage::helper('op')->__('Change price'),
    'url' => $this->getUrl('*/*/massPrices', array(
        '_current' => true
    )),
    'additional' => array(
        'visibility' => array(
            'name' => 'operations',
            'type' => 'select',
            'class' => 'required-entry',
            'label' => Mage::helper('op')->__('Change price'),
            'values' => $operations
        )
    )
));

But in order to make some math operations I need to get argument for user's input. To do this I try  to repeat getMassactionBlockfrom previous step with new label and type=text. yes, it really gives me text input, but I'd like to get only after the second mass action (with math operations) will be selected.

Thx for help.


texts: Order : To add comments programmatically for an order in admin panel in magento 2

texts: In admin panel Sales->Orders section, while viewing the order, It show order information like below,How to add comment programatically.... And it needs to save (sale_order_status_history) table  Suggest a solution..


texts:
So I want to update the price of a  specific products in product listing page programatically.
To update, I created product attribute and I would like to take that value and update the price in an observer.
Which product listing page event should I use to achieve this?
If there is any alternative to update the price I am open to suggestions as well.


texts: Price Difference In List.phtml and View.Phtml in Magento 1.9

texts:
I have a magento store running on magento 1.9 version which has 30000+ products. When i update a product and apply a rule it has to be reindexed to apply the rule. And whenever i do that ,there will be a price difference on the List view and Product view before the reindex completes.List view shows the wrong value but the Product page displays correct Price. I have gone through the List.phtml and view.phtml in the path html\app\design\frontend\mytheme\default\template\catalog\product .
In list.phtml

"<?php echo $this->getPriceHtml($_product, true) ?>"

and in view.phtml it is

"<?php echo $this->getPriceHtml($_product) ?>".

My question is, is that difference in the price is just because of that additional "true" parsed in List.phtml or something else. If it is not that what is the solution??Which is the database are these files are fetching the price value from?? And where exactly i find(Path for the file) that query to make both files to fetch from same database table?


texts: In Magento 2, how do I force the table rate shipping rule to apply to a discounted total? I would imagine this is a setting in the config somewhere but I can not find it.


texts:
I have put together a demo store and added a couple of store views to it.
I went to change the scope of the price attribute to 'website' from 'global' and I cannot find the scope option in the backend.
My store is 2.4 with demo data, very little changed apart from that.
I have never seen the attribute scope missing before, it shows in the admin grid but not when you edit an attribute.


texts: Display Payment methods in dropdown in magento admin grid

texts:
I want to show all payment methods in a dropdown in admin grid in magento.I wish to display similar like that in the below picture.

Hoping for immediate response


texts: magento2 New coupon code not working in cart page

texts: Magento 2 coupon code are saved in cart while changed new coupon code still shows the old coupon code how to fix this issue?


texts: What cronjob takes care of running a Scheduled Import in Magento2?

texts:
I don't understand how scheduled import processes are starting.

I don't find a matching cronjob in Magento_ScheduledImportExport, only a cleaning job:

<job name="magento_scheduled_import_export_log_clean" instance="Magento\ScheduledImportExport\Cron\ScheduledLogClean" method="execute" />

Weirdly, the only thing I found that seems to take care of scheduled imports is a call to processScheduledOperation() in the controller Magento\ScheduledImportExport\Controller\Adminhtml\Scheduled\Operation\Cron:

/** @var \Magento\ScheduledImportExport\Model\Observer $result */
$result = $this->_objectManager->get(\Magento\ScheduledImportExport\Model\Observer::class)
                ->processScheduledOperation($schedule, true);

But I can't find a place where this controller would be called automatically.

Any idea?


texts: Magento 2: Add datepicker in massaction field in block grid

texts:
I am trying to show the date picker in the mass action field in the custom block grid.
Here is my code:
$this->getMassactionBlock()->addItem(
    'update_eta',
        [
            'label' => __('Update ETA (Don\'t Notify)'),
            'url' => $this->getUrl('*/*/massUpdateEta'),
            'additional' => [
                'eta_value' => [
                    'name' => 'eta_value',
                        'type'     => 'date',
                        'class' => 'required-entry control-text',
                        'label' => __('ETA Value'),
                        'gmtoffset' => true,
                        'format'    => '%d.%m.%Y'
            ],
        ]
    ]
);

The date picker icon is being shown with the textbox, but the date picker is not being opened.
Can anyone help me to fix this problem?


texts: Turpentine diasable cache for footer reference

texts:
In checkout i use anather footer.

<opc_index_index>
    <reference name="footer">
        <action method="setTemplate">
            <template>page/html/footer/footer-bottom-checkout.phtml</template>
        </action>
    </reference>

in turpentine_esi.xml i have code

<opc_index_index>
    <turpentine_cache_flag value="0"/>
</opc_index_index>

But footer is in cache and does not change, the default template is loaded page/html/footer.phtml

How I can remowe footer from ceche?


texts: On mobile submenu 'All %categoryname' is not translated - Magento 2

texts:
I can't translate the string 'All' from the subcategory on mobile menu. The file where the string appears is menu.js located on public/lib/web/mage/

And it looks like this:

.text($.mage.__('All ') + category);

So only the string 'All' needs to be translated, it doesn't require to put something like 'All %1', 'translatedAll %1' in my language file.
The translations I made looks like this:

"All ", "translatedAll "

Also I tried to put the location for the translation, like this:

"All ","translatedAll ",lib,lib/web/mage/menu.js

But it doesn't work. I also tried to translate directly in the en_US.csv file from public/lib/web/i18n/. Not working either

How can I translate this?


texts: Magento 2 display certain rows from custom table in admin grid

texts:
I have a custom table(id,product_id,company_code) that is displayed on the backend as a grid.

To create the grid, I followed this link.

This displays all the records from the table. I need to show only those records that have company_code = 1.

I am very new to Magento and not sure about the terminology.


texts:
Is it somehow possible to get the PDF invoice which has been created for an order from outside of Magento?

I want to be able to send a mail to the customer containing a link to the PDF. He clicks on that link and the invoice will be shown. That should work without any login, just the click and the invoice is shown.

Ideas on how to solve this?

Thanks for helping!


texts: Move Recent Order List to Top Magento 2.3.3

texts:
In Magento V2.3.3 Recent orders shown at the bottom of the Account section. I tried to move recent orders to the top by using the below code, it's not working for me.

<move element="customer_account_dashboard_top" destination="customer_account_navigation" before="-"/>

Guide me on how to move the recent orders to the top. And also guide me on how to rearrange the MyAccount left sidebar links (My Account, My Orders, etc).


texts: how to include category id in url on category page?

texts:
I have one query regarding category id.I need to include category id, in category list page. Currently it should be like this :

http://magento2.shelltag.com/women/bags/backpacks

I want to show like this :

http://magento2.shelltag.com/women/bags/backpacks-6

How can it be achieved?

is this is the possible solution?

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

or in which file i need to make changes?


texts: How does PRODUCT_TYPE in catalog.xml work?

texts:
Looking in app/design/frontend/base/default/layout/catalog.xml, I see what appears to be conditional XML based on product type.

    <PRODUCT_TYPE_simple translate="label" module="catalog">
        Catalog Product View (Simple)
        <reference name="product.info">
            <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
                <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
                    Product Extra Info
                </block>
            </block>
        </reference>
    </PRODUCT_TYPE_simple>
    <PRODUCT_TYPE_configurable translate="label" module="catalog">
        Catalog Product View (Configurable)
        <reference name="product.info">
            <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
                <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
                    Product Extra Info
                </block>
            </block>
        </reference>
        <reference name="product.info.options.wrapper">
            <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
        </reference>
    </PRODUCT_TYPE_configurable>

How is this logic accomplished?  Can these keywords be used in any layout files?


texts: How to add New Product Type similar like Configurable in Magento2.3?

texts:
I have to make new Product Type similar like Configurable and I have tried the below reference which is working but I cannot add/update Product Price and Qty. Qty all the time becomes Zero, also Configurations is missing similar like Configurable Products.

Reference : Magento2: How to add a new product type

Github : https://github.com/Genmato/DemoProduct

How to fix it?


texts:
How to override default magento 2 file

vendor/magento/framework/Reflection/ExtensionAttributesProcessor.php

in my custom module.


texts: How to move Li inside an UL in magento 2

texts:
I am trying to move registration link before login

<move element="register.link.container" destination="header.links" before="authorization-link"/>

but it's unable to move the register.link.container(li) before the authorization-link(li)


texts: Magento 2.3 - How to add a field for serial number to admin shipping screen?

texts:
Need to implement the addition of a "serial number" field on the Admin panel of M2.3. Once a customer purchases an item, we pick a random, serialized item from stock and package it for shipment. During that process, we would like to capture the chosen item's serial number in a text field on the M2.3 shipping screen in the Admin panel. We can then print the serial number on the Invoice and on packing slips.
Is implementing this literally just a matter of adding a new field to the UI and altering the save routine? Obviously we'll need to add a new field to the DB in the appropriate "order" and "invoice" tables, and we'll need to alter the appropriate invoice/reporting/etc templates to print. Is there anything else we'd need to do?
Thanks for the help.
Fred


texts: Forward Category Page to Product View Page not Working

texts:
I am trying to forward every category page to a product view page using an event observer. But it seems to be not working.

Scenario : I am playing around with Magento router now. As part of this, I am trying to forward every category page in my Magento instance to the product page. The product page which is going to load for a category is the page of first product in that category.

What I have Tried : I observed to the event controller_action_predispatch_catalog_category_view and added below code to my observer method.

public function forwardSingleProCategory(Varien_Event_Observer $observer)
{
    //get event data
    $action = $observer->getControllerAction();
    $request = $action->getRequest();

    //get category id
    $categoryId = (int)$request->getParam('id', false);

    //grab category collection
    $layer = Mage::getModel('catalog/layer')->setCurrentCategory($categoryId);
    $collection = $layer->getProductCollection();

    //check whether category count is 1. If YES, then do magic
    if ($collection->getSize() > 0) {

        //prepare parameters that needs for the action `catalog/product/view`
        $product = $collection->getFirstItem();
        $actionName = 'view';
        $controllerName = 'product';
        $moduleName = 'catalog';
        $params = array(
            'category' => $categoryId,
            'id'       => $product->getId()
        );

        //tells no to category page router processing further
        $request->setDispatched(false);

        //throw exception with a clear message we need a product page.
        $e = new Mage_Core_Controller_Varien_Exception();
        $e->prepareForward($actionName, $controllerName, $moduleName, $params);
        throw $e;

    }

    return $this;
}

See the comments that I have put in the code. If something is not clear in my code please let me know. I can explain

But I am getting 404 Page for every category page request. Ooops !!!

How much I debug : The 404 page is triggering from Mage_Catalog_ProductController itself (which means observer is working fine). The problem lies here in this section :

 public function viewAction()
{
    // Get initial data from request
    $categoryId = (int) $this->getRequest()->getParam('category', false);
    $productId  = (int) $this->getRequest()->getParam('id');
    $specifyOptions = $this->getRequest()->getParam('options');
    ...
    try {
        $viewHelper->prepareAndRender($productId, $this, $params);
    } catch (Exception $e) {
        if ($e->getCode() == $viewHelper->ERR_NO_PRODUCT_LOADED) {
            if (isset($_GET['store'])  && !$this->getResponse()->isRedirect()) {
                $this->_redirect('');
            } elseif (!$this->getResponse()->isRedirect()) {
                $this->_forward('noRoute');
            }
        } else {
            Mage::logException($e);
            $this->_forward('noRoute');
        }
    }

The problem is $productId and $categoryId are same (seems that both holds category id value) and hence the line $viewHelper->prepareAndRender($productId, $this, $params); is failing and  thus I am getting 404 page.

But in my observer, you can see that I am setting both category and id parameters via this section

$e = new Mage_Core_Controller_Varien_Exception();
$e->prepareForward($actionName, $controllerName, $moduleName, $params);

I double checked and confirmed that $params (holds the right product id for id and right category id for category) are correct  in my observer.

So my question is how it is get rewriting by category Id in the router process in this scenario ?

How can I make it work ?


texts:
I would like to change the address of a website , but I do not know. For example, " www.page.com/contact-us " and it will change to " www.page.com/kontakt " . How can I do this?
I just want to translate my address of the page that was understood in my country.


texts: set image using default for particular store view by code

texts:
Is there any method to set all image(thumb, small, base) using default value for particular store view.

I got strange problem, I installed 2 languages magento, and one day all image in one store view just missing. so I checked on product detail admin, I found that all images are still there. However all images on one store view set as no image. I have 1000+ SKU. how can I mass update all product using default store value ?

I'm trying to search magmi function, and it doesn't provide update for this.


texts: Paypal echeck IPN callback cancelling orders

texts:
I have an issue with a store we look after. Magento version 1.6.2.0

Almost immediately after an order is placed using a PayPal echeck, we receive an IPN callback cancelling the order. This in turn cancels the order, and its items. 6 days later we receive notification that the payment is complete and the order is moved to the processing, then complete state.

Unfortunately at this stage we have orders that are set to complete, with cancelled line items. Is this normal Magento/PayPal behaviour or is it a bug in the native PayPal module? Could it possibly be an incorrect setting in the PayPal account itself? It seems strange to me that PayPal would send a cancellation notification back so soon after the order is placed.

Cheers


texts: how to change home label in breadcrumb for search result page magento 2

texts: I want to change the home label in breadcrumb for search result page


texts: Random Timezone Error "timezone (Etc/UTC) is not a known timezone"

texts:
I was logging into the magento admin panel, and when I log in this sudden error appears.

There has been an error processing your request

timezone (Etc/UTC) is not a known timezone

Trace:
#0 /home/signklri/public_html/app/code/core/Mage/Reports/Model/Resource/Order/Collection.php(373): Zend_Date_DateObject->setTimezone('Etc/UTC')
#1 /home/signklri/public_html/app/code/core/Mage/Reports/Model/Resource/Order/Collection.php(809): Mage_Reports_Model_Resource_Order_Collection->getDateRange('24h', 0, 0, true)
#2 /home/signklri/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(53): Mage_Reports_Model_Resource_Order_Collection->addCreateAtPeriodFilter('24h')
#3 /home/signklri/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#4 /home/signklri/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#5 /home/signklri/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard.php(50): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#6 /home/signklri/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#7 /home/signklri/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 /home/signklri/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#9 /home/signklri/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#10 /home/signklri/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 /home/signklri/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /home/signklri/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 /home/signklri/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /home/signklri/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#15 /home/signklri/public_html/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#16 /home/signklri/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->indexAction()
#17 /home/signklri/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#18 /home/signklri/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/signklri/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/signklri/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /home/signklri/public_html/index.php(83): Mage::run('', 'store')
#22 {main}

The only way I was able to fix this was to change Etc/UTC to UTC. Can someone explain why this error suddenly appeared, and if my fix around it will have any issues.

Edit: Courtesy to simonthesorcerer upgrading the PHP to 5.4 has fixed the issue as well!
I would recommend doing that instead. Make sure you rename the php.ini file in the public_html directory to php5.ini, well in my case I had to.


texts: Adding a new custom phtml block to the header

texts:
How does one add a new block and template file to the header in Magento2?

So far I've created a child theme, which is working, including a default.xml, which is successfully moving other block around. But for creating a new block it won't work.

So far I have:

<?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>
    <move element="top.links" destination="header-wrapper" before="-" />

    <referenceContainer name="header-wrapper">
        <container name="custom.header" htmlClass="headerSitemenu" htmlTag="div">
            <block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::html/headersitemenu.phtml">

            </block>
        </container>
    </referenceContainer>

and have created headersitemenu.phtml inside <theme>/Magento_Theme/html.

Flushed and cleaned the cache etc, but nothing shows.


texts: Place long description under short description

texts: How can I place the long description below the short description?


texts: how to do absolute pricing for custom options in simple product?

texts:
i have added many simple products with custom options , but during select it add price to the default.

i donot want it to add price in default , actually it should replace it with the selected custom option price.

default $30

custom options :

first $50
second $70

on selecting first custom option, it should show final price as $50 instead of $80

Please suggest...


texts: How to requeue message queue if something happen wrong

texts:
I am implementing message queue for my system. I want to know that how can i requeue any queue if something goes wrong or suppose my api didnt give me response as i wish so i want to send that message again in requeue.

Please help me.


texts: Failed to open file composer.json. Please verify the archive

texts:
This is my composer.json

{
    "name": "edgepay/payments",
    "description": "Add a payment method in Magento 2.",
    "type": "magento2-module",
    "version": "1.0.0",
    "license": [
    "OSL-3.0",
    ],
    "require": {
        "php": ">=5.3.0",
        "rmccue/requests": "v1.7.0",
        "ext-json": "*"
    },
    "autoload": {
        "files": [ "registration.php" ],
        "psr-4": {
            "Edgepay\\Payments\\": ""
        }
    }
}

I have issue to submitting my module. please check screenshot

Please Helps me to solve this error.


texts:
How to fix install blog extension last step error?
please check this screenshot.
http://prntscr.com/li3e5p

i'm facing many errors on this server(platform.cloudways.com).


texts: Magento2 - add Product to cart with out-stock status

texts:
Is it possible add product to cart with stock status = out-stock.
I used plugin to override method with afterIsSalable, with this add-cart-button showing but not adding product into cart.
Note: backorder setting already enabled.
Error message showing:
"There are no source items with the in stock status"
"This product is out of stock."Z
This is urgent.


texts: Magento 2, get Min and Max price in Layered Navigation

texts:
I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

  public function getPriceRange($filter){
     $Filterprice = array('min' => 0 , 'max'=>100);
    if($filter instanceof Magento\CatalogSearch\Model\Layer\Filter\Price) {
        $priceArr = $filter->getResource()->loadPrices(10000000000);
        $Filterprice['min'] = reset($priceArr);
        $Filterprice['max'] = end($priceArr);
    }

    return $Filterprice;
}

But it says  loadprice not a method. Can any please suggest to get Min & Max price.


texts: Magento 2: Add product to guest cart programmatically

texts: Please let me know how to add product to cart programmatically using an event observer in magento 2.2


texts: Magento 2: Api getting product collection using category id

texts:
I am trying to get product collection using Rest Api
Below is my code
file:  ProductsManagementInterface.php

  interface ProductsManagementInterface {

/**
 * GET for Products api
 * @param string $param
 * @return array
 */
public function getProducts($param); }

webservice define in xml

<?xml version="1.0" ?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route method="GET" url="/V1/productcollection/products/:param">
        <service class="Vendor\ProductCollection\Api\ProductsManagementInterface" method="getProducts"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

model file

<?php

namespace Vendor\ProductCollection\Model;

class ProductsManagement implements \Vendor\ProductCollection\Api\ProductsManagementInterface
{

    protected $_categoryFactory;
    protected $_category;
    protected $_categoryRepository;
    protected $_storeManager;
    protected $jsonHelper;

    public function __constructor(
    \Magento\Catalog\Model\CategoryFactory $categoryFactory,
    \Magento\Catalog\Helper\Category $category,
    \Magento\Catalog\Model\CategoryRepository $categoryRepository,
    \Magento\Framework\Json\Helper\Data $jsonHelper,
    Magento\Store\Model\StoreManagerInterface $storeManager
    ){
        $this->_categoryFactory = $categoryFactory;
        $this->_category = $category;
        $this->_categoryRepository = $categoryRepository;
        $this->jsonHelper = $jsonHelper;
        $this->_storeManager = $storeManager;
    }
    /**
     * Return mixed.
     *
     * @api
     * @param string $param.
     * @return array.
     */
    public function getProducts($param)
    {
        $json = $this->getJsonArrayProductFromCategory($param);
        $decodedData = $this->jsonHelper->jsonDecode($json);
        return $decodedData;
        //return 'hello api GET return the $param ' . $param;
    }

    public function getJsonArrayProductFromCategory($id){
        $category =  $this->_categoryFactory->create()->load($id);
        $categoryProducts = $category->getProductCollection()
                             ->addAttributeToSelect('*');
        $json= array();
        $i=0;

        foreach ($categoryProducts as $product)
        {
                $productData['sku'] = $product->getSku();
                $productData['name'] = $product->getName();
                $productData['price'] = $product->getPrice();
                $productData['url'] = $product->getProductUrl();
                $json[$i]=$productData;
                $i++;
        }
        return $json;
    }
}

My url is

http://domian.com/rest/V1/productcollection/products/5

but it give


texts: Magento1 : Display custom variable from admin panel

texts:
I want to display Magento custom variable from the Admin configurations, so when I add the calling inside my custom configurations it didn't get the value of it, you can see the below example:

        <bank_sms translate="label">
            Bank Orders Ensure Message
            <frontend_type>text</frontend_type>
            <sort_order>3</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <fields>
                <active_banksms translate="label">
                    Enable Bank Orders SMS
                    <frontend_type>select</frontend_type>
                    <source_model>adminhtml/system_config_source_yesno</source_model>
                    <sort_order>0</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                </active_banksms>
                <message_bank>
                    Bank Orders SMS
                    <frontend_type>textarea</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <depends>
                        <active_banksms>1</active_banksms>
                    </depends>
                </message_bank>
            </fields>
        </bank_sms>

After I echo the configurations, it give me the same content in it (Your order  {{customVar code=verifyOrder}}). So is there a way to print the value of the customVar tag?


texts: Magento 2.3.2 EE Composer Install Could Not Resolve

texts:
I am using Magento version 2.3.2 EE. I am trying to run the "composer install" step (I have not modified the composer.json file in any way) and I'm seeing the following error:

$ composer install

Loading composer repositories with package information
Updating dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.

Problem 1

- magento/magento-cloud-metapackage 2.3.2 requires magento/product-enterprise-edition 2.3.2 -> satisfiable by magento/product-enterprise-edition[2.3.2].
- magento/magento-cloud-metapackage 2.3.2-p1 requires magento/product-enterprise-edition >=2.3.2 <2.3.3 -> satisfiable by magento/product-enterprise-edition[2.3.2, 2.3.2-p2].
- magento/product-enterprise-edition 2.3.2 requires magento/module-checkout-address-search 100.3.0 -> satisfiable by magento/module-checkout-address-search[100.3.0].
- magento/product-enterprise-edition 2.3.2-p2 requires magento/module-checkout-address-search 100.3.0 -> satisfiable by magento/module-checkout-address-search[100.3.0].

- Conclusion: don't install magento/module-checkout-address-search 100.3.0
- Installation request for magento/magento-cloud-metapackage >=2.3.2 <2.3.3 -> satisfiable by magento/magento-cloud-metapackage[2.3.2, 2.3.2-p1].

Has anyone else encountered this?


texts: Magento 2.3 SOAP envelope update stock qty - Postman

texts:
I am trying to update my stock qty via SOAP using Postman. I have no experience using SOAP.
Can anybody tell me what I am doing wrong here?
https://mydomain/soap/default?wsdl&services=catalogInventoryStockRegistryV1
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="https://mydomain/soap/default?wsdl&services=catalogInventoryStockRegistryV1">
<soapenv:Header/>
 <soap:Body>
     <def:catalogInventoryStockRegistryV1GetStockItemBySku>
        <productSku>101019NC</productSku>
        <itemId>1</itemID>
            <stock_item>
                <product_id>1</product_id>
                <qty>31</qty>
            </stock_item>
      </def:catalogInventoryStockRegistryV1GetStockItemBySku>
 </soap:Body>
</soap:Envelope>

The only response that I get is the WSDL definition.
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="https://mydomain/soap/de?services=catalogInventoryStockRegistryV1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="MagentoWSDL" targetNamespace="https://mydomain/soap/de?services=catalogInventoryStockRegistryV1">
    <types>
        <xsd:schema targetNamespace="https://mydomain/soap/de?services=catalogInventoryStockRegistryV1">
            <xsd:element name="GenericFault" type="tns:GenericFault"/>
            <xsd:complexType name="GenericFaultParameter">
                <xsd:sequence>
                    <xsd:element name="key" minOccurs="1" maxOccurs="1" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation></xsd:documentation>
                            <xsd:appinfo xmlns:inf="https://mydomain/soap/de?services=catalogInventoryStockRegistryV1">
                                <inf:maxLength/>
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
...

Thanks!


texts: Add custom content in order summary on checkout page

texts:
I have added a custom text inside the cart summary checkout page using a simple HTML template file.

My question is how can I add dynamic content(from .phtml file or Block file) to this section?
I want to process the grand total and add the order total in other/secondary currency.


texts:
When run the security scan with base url.
example: www.testurl.com
all patchs are updated
when run add the store code to base url
example: www.testurl.com/us
10415 patch is failed
can I know the reason
when add the store code patch is failed


texts: Translation conflict between modules within the same system_config section

texts:
I created my own section (say "Company") under admin system_config

<config>
    <sections>
        <company translate="label">
            <label>Company</label>
            <tab>service</tab>
            <frontend_type>text</frontend_type>
            <sort_order>400</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
        </company >
    </sections>
</config>

I created 2 modules adding their own group under Company section. Those groups are displayed as intended.
Both modules are well configured to handle adminhtml translations.

Module 1 :

<config>
    <adminhtml>
        <translate>
            <modules>
                <company>
                    <files>
                        <default>Company_Module1.csv</default>
                    </files>
                </company>
            </modules>
        </translate>
    </adminhtml>
</config>

and Module 2 :

<config>
    <adminhtml>
        <translate>
            <modules>
                <company>
                    <files>
                        <default>Company_Module2.csv</default>
                    </files>
                </company>
            </modules>
        </translate>
    </adminhtml>
</config>

So here is my problem :
I created Module 2 before Module 1. As long as Module 2 was alone in Company section, my strings were correctly translated. As soon as I created Module 1 and added its group under Company section, only Module 1 labels and comments were translated.

It appears that only Company_Module1.csv is used. Any string in Company_Module2.csv is ignored. If I copy my Company_Module2.csv content in Company_Module1.csv file, then Module 2 is now correctly translated. It's very weird because I explicitly configured Module 2 to translate from Company_Module2.csv and not from Company_Module1.csv.

Can someone explain this behavior ? Eventually this will help me understand what I did wrong and fix it.
Thanks !


texts:
I have defined a CMS/Static block in the magento admin called: slick_slideshow, it has content and is enabled

I've updated my page.xml and added:

<block type="cms/block" name="slick_slideshow"></block>

to the default section immediately following the breadcrumbs block.

in my 1column.phtml after the breadcrumbs block I've added:

<?php echo $this->getChildHtml('slick_slideshow') ?>

Cache is currently disabled, but nothing shows up!! Ideally I need this to only show on the homepage. but it won't show up on any page right now.

What could the issue be?


texts:
We have Magento with 3 stores with language English and Arabic for each. It is working fine without any issue. We are planning to change the URL of each website.

Current URL:

  http://example.com/kw_en/

  http://example.com/kw_ar/

  http://example.com/sa_en/

  http://example.com/sa_ar/

Need to change the above URLs as below:

  http://example.com/kw/en/

  http://example.com/kw/ar/

  http://example.com/sa/en/

  http://example.com/sa/ar/

Is there any we can do it?


texts:
I'm looking for my Magento store like bigbasket.com
I'm trying to add weight to price but I'm unable to get same as bigbasket.com and I need some solution about how to create an attribute for grocery products and how to manage weights by price?

For reference I just sending this URL (https://www.bigbasket.com/pd/10000404/bb-royal-sona-masoori-raw-rice-10-kg-bag/) please this and let me know the weighting process for grocery


texts: adminhtml system settings addColumn upload image

texts:
I'm trying to add an image upload button to a custom "Custom_Module_Block_Adminhtml_System_Config_Source_Table".

I have found the following site: https://www.integer-net.com/how-to-create-tables-in-magento-system-configuration/

Here they show how to create a drop-down menu. So I should use 'renderer' to create a custom field. But how to create a image upload field?

Any help would be appreciated.


texts:
I am having an issue with a cron job in Magento 2.1.  I have a job that I need to query a database to get some stock values for my Magento products, but the cron job gives me the following error:

HP Fatal error:  Class 'Meese\MWS\Cron\mysqli' not found in /chroot/home/ikonopsc/ikonops.com/html/app/code/Meese/MWS/Cron/Stock.php on line 28

Why is the mysqli object not available here?


texts:
I have an .xml file:

<?xml version="1.0" encoding="utf-8"?>

<config>

<timezone>CET</timezone>

<days>1 2 3 4 5</days>

</config>

And I would like to have those values be changeable from the admin panel. So I created a system config where values can be requested like: Mage::getStoreConfig('twilio/call_forward/weekdays');

How can I get this value in the .xml file?

Edit:

Also, my problem is that the .xml file has to be located in the root folder of magento. So in order to call Mage::getStoreConfig('twilio/call_forward/weekdays'); is have to first

define('MAGENTO', realpath(dirname(__FILE__)));
require_once MAGENTO . '/app/Mage.php';

Which as far as I know can only be done in php.

Is there a way to call a helper from the root folder?


texts: Magento add Customer Email to adminhtml order grid (Mage 1.8)

texts:
I am trying to add the Customer Email to our adminhtml order grid. We are overriding the code in Mage/core in this file: app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php

In PrepareColumns we add

$this->addColumn('customer_email', array(
    'header'    => Mage::helper('Sales')->__('Email'),
    'width'     => '100px',
    'index'     => 'customer_email',
    'type'        => 'text',

));

And in _prepareCollection we added this

$customer_entity = Mage::getSingleton('core/resource')->getTableName('customer_entity');
        $collection->getSelect()
               ->join(
               $customer_entity,
               'main_table.customer_id = '.$customer_entity.'.entity_id', array('customer_email' => 'email'));

The good news is, that it does add the email column

My question: Now the only problem is that when we enter an order id, or sku as filter that the result is the Magento error page .... So something is still going wrong here

What are we forgetting? Or what is the best code for Magento 1.8 to add the Email address in the order grid?


texts: Stripe 1.9.1 error in Magento 2.3.5-p1 - Authentication required

texts:
We recently installed the Stripe module but in checkout nothing happens when placing an order, the only thing we can see is in network and console this
{"message":"Authentication Required: pi_XXXX_secret_XXXXX"}

And in console this
POST https://siteurl.com/rest/V1/guest-carts/XXXXX/payment-information 400

What can cause this issue? Any help?
Idk if it's related, but Paypal does not work too but I can't see any error so idk if it's the same and all works fone in a test environment both Stripe and Paypal. But in a live nothing works, I tried to disable Cloudflare and all stayed the same so it's not from it I guess.
Thanks :D


texts: Calculate UPS and USPS Shipping Cost in Custom phtml page

texts:
I am using Magento 1.9.3.6.

I am adding Product Programmatically. I want to calculate the Shipping Cost in that phtml page. Like which is calculated in the cart page based on quote(Shown in the below) while Customer enters the weight, Country(By Default US), State.

How to do this.

Below is the Screenshot.

Update:
I need Shipping Cost for Ups and USPS Shipping Methods.


texts: How to get all the Children Categories IDs of the Specific Category in Magento2

texts:
I want to get all categories of the specific category for that I tried

public function categoryHide()
    {
        $data = $this->arrayData();
        $save = array();
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of Object Manager
        $categoryFactory = $objectManager->get('\Magento\Catalog\Model\CategoryFactory');// Instance of Category Model
        foreach($data as $test)
        {
            $category = $categoryFactory->create()->load($test);
            // $parentCategories = $category->getParentCategories();
            $childrenCategories = $category->getChildrenCategories();
            foreach ($childrenCategories as $cat){
                $save[] = $cat->getId();
              }
        }
        return array_merge($data,$save);
    }

}

This code is working perfectly for the Gear but if we tried to get the Ids of the Women or men category it will return only 2 children

it will only return the ids of tops and bottoms not there further children eg for women its category is 20 and tops category is 21 and bottoms category is 22 its only return there values not further children of tops and bottom. now I want to get all the child categories ids. Thanks in advance


texts:
Is there anyway to auto 301 redirect old product urls to new ones..

January always brings around alot of product changes and dont want to be overwelmed with 404 errros in WMT

I use Mass 301 redirect using a CSV but is this the best way to do it ? The problem i find with this is that you need to know the url of every product before you can change it.. Sometimes we can delete 400 products that have been discountinued

Thanks
Michael


texts: Uncache dynamic blocks in cms page using Lesti FPC

texts:
I have two blocks that deliver dynamic data, set up in a CMS page.
One block is a button that needs to look activated if a DB record is found and says "Download (PDF)" or be grayed out with text that says "Download Unavailable" in the button if no data is found.
The other block is a table displaying the record if found, if not then it says "Sorry no results found".
The problem is my CMS pages are cached with Lesti FPC in config:

And adding the blocks to Dynamic Blocks or Lazy Load blocks seem to get overridden by the Cachable Actions settings, so the blocks are cached along with the CMS page and never get re-rednered.  So I am able to see results in one browser and the same results in another browser which they should be different for each session.  Removing cms_page_view from Cachable actions work, but that defeats the purpose of caching cms pages, there has to be a way to do it.
CMS Page Content:

Your Results!

Before leaving this page, download the pdf below.

            {{block type="reader/scannerresults" name="scannerresults" template="reader/results-download-button.phtml" buttonTitle="Download your Results" buttonCopy="DOWNLOAD RESULTS (PDF)" disabledButtonCopy="DOWNLOAD UNAVAILABLE"}}

            {{block type="reader/scannerresults" name="scannerresults" template="reader/results-table.phtml" noResultsFoundCopy="Sorry no results were found."}}

Design > Layout Update XML
Just a pointer to CSS
<reference name="head">
    <action method="addItem"><type>skin_css</type><name>css/reader/scanner-results.css</name><params/></action>
</reference>


texts: Assigning values to attributes different than the option?

texts:
Is it possible in magento that if you set a attribute to be used in admin (the customer doesn't need to see this) that you can set a different value to be saved other than that is set as the option?

Best way I can describe what I'm trying to achieve is imagine you were doing a dropdown option in a html form for example

<option value="32">Size S</option>
  <option value="34">Size M</option>
  <option value="36">Size L</option>
  <option value="38">Size XL</option>

So imagine the attribute Option would be size S but I want it to record the value as 32

That way the site admin could read the attribute correctly  and select Size S as the option but for export purposes when you export via the dataflow profile it will export the value as 32 (as that is the value that is saved)


texts: How to migrate only products, categories and attributes from Magento1 to Magento2?

texts: I have clear Magento 2 installation and working Magento 1.9 show. I want to migrate just products, categories and product attributes to the Magento 2 (without orders, settings and anything else). How can I do this?


texts: In the official documentation it says Varnish is supported out of the box and there should be an option to generate a VCL file compatible with Varnish 3 and Varnish 4. I can't find this using the admin panel or CLI. Has anyone tried to use this feature?


texts: A checklist for Magento Enterprise update

texts:
I have a question. I am most likely facing an upgrade from my Magento 1.7EE/1.14 right now due to the fact the system is just old.

Now I am wondering what specific steps and hints the community here can give me. I read a lot and I know my question is really broad but I just don´t want to miss anything in the first place.

I did a backup of all my files and my database already.

I checked this https://github.com/magento-hackathon/upgrade-checklist
But i´m still wondering if there is more to be concerned about and what impact that would have for me in case of time and difficulties normally.

I am also still wondering to which version i should upgrade now.
Can some people give some advice please?


texts: how to get value from localstorage of product details in magento 2

texts: How to get value from local storage of product weight and id in magento 2.


texts:
I'm having problems with the VAT field after a customer placed an order and entered a VAT number.

Everything appears to be working except when opening an order with a VAT number filled in. The following error shows up in the logs:

  Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute, instance of Mage_Eav_Model_Entity_Attribute given, called in .../app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php on line 133 and defined  in .../app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59

The solution in a similar issue (Magento - Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory()) was to remove any attribute_models from the eav_attributes table. This solution works until another order with a VAT number is placed. In that case the attribute_model for the taxvat is set to eav/entity_attribute.

I've looked through the Magento source where the VAT number might get saved but I couldn't find anything. What causes the attribute_model to be updated and is there any way to avoid it being set?

I'm running Magento v1.9.0.1 on PHP 5.5


texts: Shopping Cart Price Rules: How to stop all other coupon codes from being applied to a rule that has no coupon code

texts:
Basically I have a coupon called 2Love which we used for V-day. It has stop further rule processing set to "yes", but there's no actual coupon code for it. It applies directly to the cart if there is a combination of sku's.

Now in the second picture i have a rule with a specific coupon code. It is also set to stop further rule processing. The problem is you can still enter the "welcomeback25" code if the 2LOVE is already being applied.

Perhaps it's because it's only on the right and not on the left under apply coupon.. it doesn't recognize it?

A rule that actually has a coupon code will show on both sides like the last image.

Any ideas how i can stop all other rules/coupon codes from being applied to a rule that doesn't have a coupon code.. rather just a name/label?


texts:
Just a question, is it a good practice to close connections after opening?
I open connections as follows:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager
    $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
    $connection = $resource->getConnection();

Magento 2


texts: Custome scripts conflict with Magento 2 and requirejs!

texts:
I have custome jQuery scripts (revolution slider).
My steps:

Add custome js files to app/design/frontend/Agestor/default/web/js.

Create requirejs-config.js to app/design/frontend/Vendor/default.

Or try like this:
Other 9 files connect in jquery.themepunch.revolution.min like this code:

For call load js, add slider code to home page content:

require(['jquery', 'jquery.themepunch.tools.min', 'jquery.themepunch.revolution.min'],function($){
    (function() {
         //code goes here
    })(jQuery);
});

Result: errors in console page, not work menu and checkout windows.

Please help, any tips...


texts: Extension point for set website ids product in case admin not set website

texts:
This is my scenario I have hidden website_ids field in product form (default magento show it)
So how i can use plugin for set website ids for product when it create. Is there any entry-point to do this

My goal is if not website ids available when post data so init default website ids for product

Added modifier for modify Form:

public function modifyMeta(array $meta)
{
    $this->_meta = unset($meta['websites']);
    return $this->_meta;
}


texts: How to get swatch image of multiple select attribute values in Magento 2?

texts:
I am using Magento 2.2.2

I have an attribute called "Brand" and input type for this attribute is multiple select. In this attribute, I have set "Small Image" in additional settings for one of the values. Please refer below screenshots.

I have set the value "Test1" in one of the products. so, I want to display a small image(see second screenshot) of this attribute value in listing page. So, how can I achieve this?


texts:
Hi i want to send product import csv to some custom email address. How I achieve this?

can you please give me some idea about this? it's like automatically send email to some custom email id


texts: Magento 2.0 Moving Added Tab UI Code From Catalog Component To My Own Component

texts:
I recently chanced upon a tutorial in datasheat[dot]com to add a custom tab into the Product edit/create form.  I was able to make it work, but the issue I found is that the code has been added to the Magento Catalog component.  Can any of you point out how I can move the added code into the component I created?

This is the code that was added (based on the tutorial):

Add code to
magento\module-catalog\view\adminhtml\layout\catalog_product_new.xml

<block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\CustomTab" name="product_tabs.customtab" as="custom-tab">
    <arguments>
        <argument name="label" xsi:type="string" translate="true">Custom Tab</argument>
    </arguments>
</block>

Create CustomTab.php in Magento\Catalog\Block\Adminhtml\Product\Edit\Tab

<?php
namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab;

class CustomTab extends \Magento\Backend\Block\Widget
{
    protected $_template = 'catalog/product/tab/customtab.phtml';

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        array $data = []
    ) {
       parent::__construct($context, $data);
      }
 }

Create file customtab.phtml in
magento\module-catalog\view\adminhtml\templates\catalog\product\tab

<fieldset class="fieldset form-inline">
    <legend class="legend"><?php echo __('Custom Tab') ?></legend>

                <?php  echo __('FIrst') ?>

                <input type="text" class="input-text" id="custom_first" name="first" value="first">

                <?php  echo __('Second') ?>

                <input type="text" class="input-text" id="custom_second" name="second" value="second">

</fieldset>

Add code below inside
    Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs.php

 $ This-> AddTab (
      'Custom-tab'
      [
      'Label' => __ ( 'Custom Tab')
      'Content' => $ this -> _ translateHtml (
      $ This-> getChildHtml ( 'custom-tab')
      )
      'Group_code' => self :: BASIC_TAB_GROUP_CODE
      ]
      );


texts: Magento 2.3.5 : Display product count with Page Main Title

texts:
I want to display product count with page main title for category page.
How I can display that?

Thanks.


texts:
I need to be able  to select more than one payment method at the same time and that the order screen appears with the two or more selected methods.
Example image below.


texts: Importing Products to New Magento Installation - Help

texts:
I have a second Magento store which for some reason will not upgrade to the latest version of Magento.

It's currently version 1.8.1 but I want to upgrade to 1.9.2.  We have tried numerous times but it keeps throwing errors at us and ultimately we have to restore the store from a backup each time.  It's very frustrating.

Is it possible to start a fresh by downloading Magento 1.9.2 and importing the databases and images from the backup file?

This isn't something I've done before so I don't know what the correct/most efficient procedure is to do it.

If anyone can help at all it would be most appreciated.


texts: Paypal shows Blank White page after Payment in Mobile

texts:
I am getting very weird issue for mobile iphone user. After customer gets paid using paypal, then they are getting white blank white page.
Can you please let me know what you could be the issue is? This happen for few customers not for all.
Thanks,


texts: Unable to update via Connect Manager since 1.9.2.3

texts:
Never had any issues using Magento Connect Manager until I tried to go from 1.9.2.2 to 1.9.2.3 or the latest 1.9.2.4. It will not update anything connected with Magento

I get the same errors see log here

I have done the patches via SSH no issue and my other extensions install correctly. But Mage will not install.

Any ideas, please
Thorrrr


texts: What is different between cache disable and enable on magento 2?

texts:
What is different between cache disable and enable on magento-2?

If i disable magento cache then magento will boost fast or slow.

What do i do for magento-2 fast?

Thanks.


texts: Magento2: How to login as customer frontend side?

texts:
I want to log in as customer frontend side.

I have created a customer listing page. But when I click on customer login button customer login without login details.

My Magento v2.0.17


texts: Magento 2 fetch related products HTML based on simple product id

texts:
I would like to fetch related products while select configurable product drop downs hence i am using plugin concept.
I am unable to fetch the related products for the simple product.
it is throwing the product already existed in the frontend. Can any one advise me please what i is wrong here.
<?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\ConfigurableProduct\Block\Product\View\Type\Configurable">
        <plugin disabled="false" name="configurable" sortOrder="10" type="Demo\ConfigurableSku\Plugin\Magento\ConfigurableProduct\Block\Product\View\Type\Configurable"/>
    </type>
</config>

app/code/Demo/ConfigurableSku/Plugin/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
<?php

namespace Demo\ConfigurableSku\Plugin\Magento\ConfigurableProduct\Block\Product\View\Type;
use Magento\Framework\Registry;
use Psr\Log\LoggerInterface;
class Configurable
{
    /**
     * @var Registry
     */
    protected $registry;

     /**
     * @var \Magento\Catalog\Model\ProductFactory
     */
    protected $product;

    /**
     * @var LoggerInterface
     */
    private $logger;

    /**
     * Layout
     *
     * @var \Magento\Framework\View\LayoutInterface
     */
     protected $layout;

     public function __construct(
        Registry $registry,
        \Magento\Catalog\Model\ProductFactory $product,
        LoggerInterface $logger,
        \Magento\Framework\View\LayoutInterface $layout
    ) {
        $this->registry = $registry;
        $this->product = $product;
        $this->logger = $logger;
        $this->layout = $layout;
    }

    public function afterGetJsonConfig(\Magento\ConfigurableProduct\Block\Product\View\Type\Configurable $subject, $result)
    {
        $jsonResult = json_decode($result, true);
        $jsonResult['related']= [];
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $productFactory = $objectManager->get('Magento\Catalog\Model\ProductFactory');
        foreach ($subject->getAllowProducts() as $simpleProduct)
        {
            $jsonResult['related'][$simpleProduct->getId()]= $this->getRelated($simpleProduct->getId());
        }
        $result = json_encode($jsonResult);
        return $result;
    }

     public function getRelated($productId) {
        try{
            $product = $this->getProduct($productId);
            $this->registry->register('product', $product);
            $relateProducts = $product->getRelatedProducts();
                if($relateProducts) {
                    $block = $this->layout->createBlock("Magento\Catalog\Block\Product\ProductList\Related")
                    ->setTemplate("WeltPixel_OwlCarouselSlider::product/list/items.phtml")
                    ->setData('type', 'related');
                    return $block->toHtml();
                } else {
                    return '';
                }
            return '';
        }catch(\exception $e){

        }
    }

    public function getProduct($productId) {
        $product = $this->product->create()->load($productId);
        if ($product) {
            return $product;
        }
        return '';
    }

}