texts: How to delete test orders in magento CE 1.9

texts: I want to delete test orders from my magento 1.9 before going live. the script I found was for EE1.9 and contains some table that cannot be found in CE1.9. Please help


texts: how to use geturl function to custom page in php value in magento 2

texts:
<a href="<?php /* @escapeNotVerified */ echo $block->getUrl(
                                      'mpquotesystem/sellerquote/quoteedit/id/404/',
                                      ['_secure' => $block->getIsSecure()]
                                  );?>">

  I want to give number is dynamic

  echo $block->getUrl('mpquotesystem/sellerquote/quoteedit/id/404/', //404 -

  here I want to give $id how I can do this


texts: How to add unique mobile number function in Magento 2 registration form?

texts:
I used this link How can i add a field mobile number at the time of customer registration form in magento 2?
to add mobile number field in the registration form which works fine. But I need to validate mobile number to be unique, min and max of 10 digits.


texts: Magento 2: How to add a div in below navigation?

texts:
I am trying to get a div displayed directly below the navigation on a theme which extends Luma

I have added the following into my Magento_Theme/layout/default.xml but cannot see any results. The block as been created via admin UI.

<referenceContainer name="below.nav">
    <container name="after_main" label="Before Main Columns" htmlTag="div" htmlClass="topbar" before="columns.top">
        <block class="Magento\Cms\Block\Block" name="topbar">
            <arguments>
                <argument name="block_id" xsi:type="string">topbar</argument>
            </arguments>
        </block>
    </container>
</referenceContainer>


texts: Magento 2 theme updated with basic functionality

texts:
At the moment we have always used Ultimo, but it has been discouraged because it has not been updated for almost a year, and it customizes many aspects of Magento that we don't even use.

We, therefore, thought of replacing Ultimo with a lighter theme and having 'Basic' features, such as the possibility to modify the colors, the header, and the footer, and to take care of the responsive.

Unfortunately, all the themes we found were very customized with integrated Page Builder and lots of features in it.

Does anyone know any theme that respects these characteristics or compatible with this?


texts: Security reminders keep rolling in... (SUPEE-5344 & SUPEE-1533)

texts:
I have several Magento installations, that I manage on behalf of our clients.
We already patched the vulnerabilities, but the warnings keep rolling in.
We just received the third warning on all sites.

We have two different versions deployed: 1.7.0.2 and 1.9.1.0.

When I patched the 1.9 version, I got some warnings, but I verified that the patch was applied, by checking the 'diff' in the sh file against the actual code.
Also, I could not apply the SUPEE-1533 patch, since the changes were already made in 1.9.1.0.
I found elsewhere that the patch is only for 1.9.0.1.
Only SUPEE-5344 figures in my /app/etc/applied.patches.list

On 1.7.0.2 it's another problem. I did manage to apply both patches, but the SUPEE-5344 is called SUPEE-5345 instead..

The warnings keep rolling in, and the clients are complaining about them.
It looks like we didn't apply the security patches, which we did.

Also: the naming of the patches are a bit .. unfortunate.
The SUPEE-5344 and SUPEE-5345 are named for their Enterprise versions: EE_1.12.0.2 and EE_1.14.1.0, even though I downloaded the Community version of the patch...

Did I miss something, when I installed the patches?
Will the warnings stop appearing if I have the correct patch names in applied.patches.list?


texts: Product URL with additional parameters (CE 1.8 & EE 1.13)

texts:
In short: Retrieving a product URL with additional params doesn't work in CE 1.8 & EE 1.13.

URLs have changed with the latest version of Magento. Previously in CE 1.7 and EE 1.12 calling $this->getAddToCartUrl($_product) from a product list would run through the following stages:

Mage_Catalog_Block_Product_Abstract::getAddToCartUrl()

Here it would add the query param "options" with the value "cart"

Mage_Catalog_Block_Product_Abstract::getProductUrl()

This method essentially gets a value from the URL model

Mage_Catalog_Model_Product_Url::getUrl()

A lot of processing occurs until the URL is finally generated, complete with the query parameters originally passed in

Now, with CE 1.8 and EE 1.13, step 3 Mage_Catalog_Model_Product_Url::getUrl() starts like this:

$url = $product->getData('url');
if (!empty($url)) {
    return $url;
}

Because the products in the list have URL data already, the query parameters are not added and the final URL does not contain ?options=cart.

My question: Is this a bug or a feature?


texts:
How to add div main-content above in magento 2.2

please advance thanks for help


texts:
On the home page instead of displaying blocks displays:

We're sorry, an error has occurred while generating this content.

Any solution?

in debug.log

[2018-04-02 08:31:45] main.CRITICAL: Cannot read contents from file "/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/cs_CZ/mage/requirejs/mixins.min.js" Warning!file_get_contents(/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/cs_CZ/mage/requirejs/mixins.min.js): failed to open stream: No such file or directory {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): Cannot read contents from file \"/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/cs_CZ/mage/requirejs/mixins.min.js\" Warning!file_get_contents(/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/cs_CZ/mage/requirejs/mixins.min.js): failed to open stream: No such file or directory at /home/fsg/domains/wearon.pl/public_html/vendor/magento/framework/Filesystem/Driver/File.php:149)"} []
[2018-04-02 08:31:50] main.CRITICAL: Cannot read contents from file "/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/en_US/mage/requirejs/mixins.min.js" Warning!file_get_contents(/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/en_US/mage/requirejs/mixins.min.js): failed to open stream: No such file or directory {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): Cannot read contents from file \"/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/en_US/mage/requirejs/mixins.min.js\" Warning!file_get_contents(/home/fsg/domains/wearon.pl/public_html/pub/static/frontend/Mgs/claue/en_US/mage/requirejs/mixins.min.js): failed to open stream: No such file or directory at /home/fsg/domains/wearon.pl/public_html/vendor/magento/framework/Filesystem/Driver/File.php:149)"} []


texts:
I'm trying to create an observer that call a function right before the user logs in. I have Googled the problem, but with no good results.

The problem is:
User writes login data, hits enter, my function is called to make some checks and then continue or break; the login process.

I didn't find any event or observer.

Do you guys have any ideas?


texts: How to delegate Magento 1=>2 migration to a 3rd party, without leaking PII?

texts:
My company manages many Magento stores for our clients. Most things we do in-house, but migrating 100+ stores to 2.x on our own would take a lot of manhours, so we'd like to test some 3rd party vendors and see if they can do a quality job with less cost.
How can we prevent the PII from those stores leaking into the wrong hands?
We've never had to give a 3rd party access to the store database, so we've never faced this problem and aren't sure how to handle it.
We've thrown around ideas like:

Anonymize the data first, let the 3rd party write the migration mappings, but run the migration script ourselves
not ideal; still lots of work for us; migrations might not actually work
Encrypt all the customer data first, then decrypt it in the Magento 2 DB when we receive it.
Still lots of work, plus requires modifying DB to accommodate the longer, encrypted versions of those strings, will require 3rd party to understand what's happening there and apply the same schema change
Anonymize the data first, then once we get the finished M2 DB back, write scripts to update those anonymized strings with data from the original M1 DB
I don't know if this can even work. Also seems like a lot of work: Basically like re-migrating.

How do you prepare for this sort of scenario?
Clarification, in response to comments:
3rd party: refers to a company who offers a paid service to migrate your Magento 1 store to Magento 2. Just Google for "Magento 2 migration service" and you'll see what I mean.
Who we are: We're not re-selling a migration service. We manage many stores as a turn-key solution we provide to clients. They ship us merchandise in bulk, then we handle all the logistics of getting it sold online, and send them a check for their profits. Many of them don't even know what Magento is, much less what version their store uses.


texts:
My add to cart url returns this. When i click it the products doesn't get added because it's invalid. This happens in the homepage.

http://localhost/mage/index.php/checkout/cart/add/uenc/aHR0cDovL2xvY2FsaG9zdC9tYWdlL2luZGV4LnBocC9wYWNrYWdlcy9wYWNrYWdlL2luZGV4Lw`,,`/product/13/form_key/D5FhQaqwv69PjG8q/

First in my code it was using $this->getAddToCartUrl($_product) because of this issue i replaced it with this Mage::helper('checkout/cart')->getAddUrl($_product) Still the problem exists.

If i clear my cache it works for a few hours and again it returns the incorrect url. How can i overcome this problem?

====update=========

Heard that this is a problem with new formkey introduced after magento 1.8. Any solution to overcome this issue?


texts:
Is there any way to exclude some extensions/modules from magento compilation ?

Because some extensions create issues with magento compilation like uRapidFlow .


texts: Too many redirects after store name change

texts:
I am using Magento 1.7 on localhost over WAMP server.

I wanted to change the name of my store, and I did so by going to Admin -> System -> Configuration -> General -> Web -> Insecure / Secure. Here I changed from oldStoreName to newStoreName.

I also changed my store's folder name, under wamp64/www, from oldStoreName to newStoreName.

I also changed the name of the alias file (under wamp64/alias) to newStoreName.conf, and changed the places within the file where oldStoreName appears.

I cleared Magento's cache. I cleared var/session folder. I cleared my browser's cookies and cache.

I am able to access my admin page, 127.0.0.1/newStoreName/admin but whenever I try to access 127.0.0.1/newStoreName I get an error from the browser saying 'Too many redirects'.

I checked Apache's error log and found "apache client denied by server configuration local.xml", but after a bit of research it didn't seem to be related to my issue. Maybe it is?

*Edit: here's the code of .htaccess under myMagentoFolder/media/:

Options All -Indexes
<IfModule mod_php5.c>
php_flag engine 0
</IfModule>

# AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

############################################
## never rewrite for existing files
    RewriteCond %{REQUEST_FILENAME} !-f

############################################
## rewrite everything else to index.php

    RewriteRule .* ../get.php [L]
</IfModule>

Anyone has any hints on what the issue could be? I just changed my store's name, didn't modify more things that what I explain here. Any help is much appreciated.


texts: Cart items will not be deleted in observer

texts:
I searched a lot but none of the solutions worked for me, I am trying to delete an Item from observer but if there is only one item in cart it works with removeAllItems() but if there are more than one items then it doesn't work, below is snippet from my code for observer checkout_cart_add_product_complete:

// get the product data and product options chosen
$transport = $observer->getTransport();

// get the current product
$product = $observer->getProduct();

$cart = Mage::getSingleton('checkout/session')->getQuote();
            // get all the cart items
$items = $cart->getAllItems();

// if item count is greater than 1 then remove current product only
if (count($items) > 1) {
    foreach ($items as $item) {
        if ($item->getProduct()->getId() == $product->getId()) {
            try {
                  $itemId = $item->getItemId();
                  $cart->removeItem($itemId)->save();

                  if($item->getParentItemId()) {
                      $cart->removeItem($item->getParentItemId())->save();
                  }

              } catch (Exception $e) {
                  Mage::log('Failed to remove item from cart'.$e.'.');
              }
          }
    }
    $cart->setCartWasUpdated(true);
} else { // else every item

    foreach($items as $item)
    {
        if($item->getProduct()->getId() == $product->getId())
        {

            try {
//                $quote = Mage::getSingleton('checkout/session')->getQuote();
                  $cart->removeAllItems();
                  $cart->save();
                  $cart->setCartWasUpdated(true);
            } catch (Exception $e) {
                  Mage::log('Failed to remove item from cart'.$e.'.');
            }
        }
    }

}

else part works (removes item) but mini cart shows 1 product selected and if you hover on it to see the item it show no products in cart. If part doesn't work at all.


texts: What's the meaning of 'module="foo"' attribute in api.xml tags?

texts:
I have this chunk of code:

<?xml version="1.0"?>
<config>
  <api>
    <resources>
      <mobile_api translate="title" module="mobile">
        <title>Milyuncarros Mobile API</title>
        <acl>mobile/api</acl>
        <model>mobile/api</model>

Question: What's the purpose of specifying module="mobile" and what values are allowed there? (in my case the value is "mobile"; i'm not asking about the particular value but the attribute itself)

I have this API currently working, but I did it by repetition (and adaptation) from tutorials - don't fully understand all the concepts and settings. I notice that attribute exists for many tags (e.g. faults tag and also acl/resources children tags).


texts:
I just want to have the column in the grid but not visible.

Is it possible ? any parameter I should pass to addColumn()


texts: Override Magento\Catalog\Model\Layer is not working in custom module magento2

texts:
I am trying to override layer.php file in my custom module but it is not taking override file, it is loading core file only

Here is my di.xml file -> path : [namespace][module_name][etc] -> di.xml

<preference for="Magento\Catalog\Model\Layer" type="[namespace]\[module_name]\Model\Layer" />

Here is my custom module layer.php file Path : [namespace][module_name][Model][Layer.php]

namespace [namespace][module_name]\Model;

class Layer extends \Magento\Catalog\Model\Layer
{

    public function getProductCollection()
    {
        var_dump("local");
        die;
    }
}

When I run the code it is not load file from my custom module.

Can you please help me I am not getting how to load layer.php file from my custom module.

Thank you in advance.


texts: Magento 2.0 Pass custom input in phtml to controller

texts:
I want pass an input data from phtm file to controller. I create a js file and I can get the value of input that I want pass but how I pass this value to controller only with JavaScript (no Jquery).

phtml file:

<button onclick="inputQty(<?php echo $cont ?>)" id="qtyAdd2Cart" type="submit"
                 title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                 class="action tocart primary">
  <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>
</button>

JavaScript:

function inputQty(id){
   id = "qty"+id;
   alert(id)
 }

In this moment only do an alert with id, but I can capture the value of input. I only need pass this value to controller.

Thanks.


texts:
I am trying to update product data programmatically through scripts. The data gets updated in database but not getting reflected in admin panel.
I am using magento 2.3.2
Here is my code

 $product = $productRepository->get('my-sku1');
    if($product->getSku() != '')
    {

        echo "Product  found", $product->getShortDescription();
        $product->setShortDescription('This is my simple sample productttttttttt');
        echo "########3";
        $product->save();

    // }


texts:
So I am trying to add a new column in the Orders report.

I decided to get the orders by period, so I did this $order_id = $row->getData('period');

Then I tried to load the orders using

$sales_model = Mage::getModel('sales/order')->load($order_id);
$subtotal = $sales_model->getSubtotal();
$items = $sales_model->getAllItems();

But it won't work. I tried outputting $sales_model and it's empty.

Thanks in advance!

EDIT:

From ProxiBlue (still returns nothing):

<?php
class Mage_Adminhtml_Block_Report_Sales_Grid_Column_Renderer_Profit extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
    public function render(Varien_Object $row)
    {
        $fromDate = date('Y-m-d H:i:s', strtotime($fromDate));
        $toDate = date('Y-m-d H:i:s', strtotime($toDate));

        /* Get the collection */
        $orderCollection = Mage::getModel('sales/order')->getCollection()
            ->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate))
            ->addAttributeToFilter('status', array('eq' => Mage_Sales_Model_Order::STATE_COMPLETE));

        return $orderCollection;

    }
}


texts: Magento security patches installation order

texts:
I am using Magento Version 1.6.2.0
I want to know if there there is any order for the installation of the security patches because I have installed the patches SUPEE-5994, SUPEE-6237, SUPEE-6285 and SUPEE-6482 but not the patch SUPEE-5344

Can I install the last one (SUPEE-5344) after the other patches, or have I to revert the other patches.


texts: Magento 2 Order number skipped almost 700 Ids

texts:
I have been running into very unusual behavior on my Magento 2 site. I know that order IDs can skip periodically due to customers abandoning card or having payment issues and other miscellaneous reasons, however, every once in awhile, my site will skip hundreds of places for no real reason I can find.
Here is one that skipped almost 700 Ids:

This is a particularly large jump, but every once in awhile, the IDs will jump 100-300 values, which I can't attribute to any normal process.
Does anyone know why such large jumps are happening? It's not very consistent, in terms of what time it happens but it almost always happens during off hours when there isn't many people on the site.


texts: bulk product attribute update error with Area code is already set

texts:
Trying to do a bulk product attribute update in the magento GUI and feedback is that the message is queued.  Messages in the database table queue_message seem right, the logs and a manual php bin/magento cron:run have the message:

queue:consumers:start [--max-messages MAX-MESSAGES] [--batch-size BATCH-SIZE] [--area-code AREA-CODE] [--pid-file-path PID-FILE-PATH] [--]
In State.php line 136:
Area code is already set

So for now I've commented out that check in /http/vendor/magento/framework/App/State.php and the jobs run.
It does not seem right to hack the magento core code, but I have done this before for php bin/magento catalog:images:resize for that specific job to skip that and it worked fine - but that was a job I'd expect to run one time only and could revert the change.  This is required to be constantly running and to process exports and attribute updates.
Is there any advice you could give me to get this feature working without having to hack the core please?


texts: Magento 1.9.2: How can I delete multiple rows from custom table with where clause without loop

texts:
I want to delete rows from Database without for loop to increase efficiency

I had done with the code having loop.Below are snippets for the same :

$collections = $model->getCollection()
                 ->addFieldToFilter('customers_id', array('eq' => '139'))
                 ->addFieldToSelect('id')
                 ->load();
foreach ($collections->getData()  as $value) {
                $data = Mage::getModel('save/save')->load($value['id']);
                $data->delete();
            }

I want to delete data having customers_id = 139
Note:customers_id is not my primary key

Can Any one help me out ?


texts: setting the shipping address of a quote doesn't work

texts:
I am trying to implement a magento 1.9 API for a mobile application
  and I tried to implement saveShipping address for checkout process like below :

    function set_shipping_address($params){

    $this->check_customer_login();

    $storeIds = Mage::app()->getWebsite(Mage::app()->getWebsite()->getId())->getStoreIds();

    $quote = Mage::getModel('sales/quote')->setSharedStoreIds($storeIds)->loadByCustomer($this->_customer_id);

    $address = $quote->getShippingAddress();

    $customerAddress = Mage::getModel('customer/address')->load($params['address_id']);

    $address->importCustomerAddress($customerAddress)->setSaveInAddressBook(0);

    $address->implodeStreetAddress();
    $address->setCollectShippingRates('1');

    $quote->collectTotals()->save();

    return true;
 }

but I got the following error:

 Fatal error: Call to a member function getIsQtyDecimal() on a non-object in /home/public_html/magento/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php on line 193


texts: How can I integrate my Magento2 project with firebase to send push notifications to user?

texts: I want to send push notification using firebase to all customers in Magento2.


texts: How to setTotalPaid() and setTotalDue() manually after order success

texts:
I want to update order grand total, total paid amount and total due amount after order succes.

For this I have added a event checkout_onepage_controller_success_action in my custom module and my observer function has code as below :

...
$order->setGrandTotal($some_amount);
$order->setBaseGrandTotal($some_amount);
$order->setTotalDue($some_amount);
$order->setBaseTotalDue($some_amount);
$order->setTotalpaid($some_amount);
$order->setBaseTotalpaid($some_amount);
$order->save();
...

This code update order grand total but total_paid and total_due amount not update by this.

Is it possible to update manually total_paid and total_due amount?

Is there another way to do that?


texts:
I am using grid serialization in my custom module grid.

I want to filter data using student_ids.

I have current student id.

In database student_ids save multiple student id for Ex. 1,2,3.

Now i want to filter grid current student id exists in student_ids.

I am trying this

$currentStudentId = $this->getRequest()->getParam('id');
    $collection = Mage::getModel('example/data')->getCollection()
                ->addFieldToFilter('student_ids',array('like' => '%,'.$currentStudentId));

but using this i can't get proper data because string is like this 1,2,3 here so many possibility so i can't use this please give me solution

[EDIT]


texts: Unserialize large data not working in Magento 1.9

texts:
I've created a custom module on my Magento 1.9.4.0 website, which creates a CSV feed file with all products and you can add dynamically what product attributes to display in the file. Something like in the image below.

The field is created like this:

<product_attributes translate="label comment">
    <label>Product Attributes</label>
    <frontend_model>company_fullfeed/adminhtml_system_config_form_field_attributes</frontend_model>
    <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
    <sort_order>50</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>1</show_in_store>
    <comment>Select product attributes that will be added to feed.</comment>
</product_attributes>

and all the attributes are saving in core_config_data as a serialized string.

The module works perfect, the file is created with products. The problem appears when I add more than 59 attributes, after that the file it is not generated. The problem seems to be from the unserialize method:

$mapValues = Mage::helper('core/unserializeArray')->unserialize($conf);

where $conf is the serialized array.

Does anyone know if there is a problem with Magento unserializing larger arrays?


texts: Magento2: Call different list.phtml file in some category?

texts:
I want to customize catalog list page for some categories.
I got the below link
how to use different template file for category magento 2
But it needs separate xml for each category and the name should be catalog_category_view_id_{{id}}.xml .It is not possible in my case. How can I do it


texts: How to get InvoiceId from sales_order_invoice_pay in magento 2

texts:
How to get invoiceId from sales_order_invoice_pay event.
$invoice = $observer->getEvent()->getInvoice();
$invoice->getIncrementId();

Can't get with this code But with sales_order_invoice_save_after event I can get the ID.
Can anyone help me out to get invoiceId from sales_order_invoice_pay


texts: Search results give unrelated category results - why?

texts:
If I type in "pink" in the search box, I get 4 of my products that are pink.

Is there a way to search and have the results post only categories related to the search results?

Because when you click on "category A" (from the results page) that has a product count of 15 next to it, you actually get a "no results" page.


texts: Magento2 : Too much apache processes running and consume memory

texts:
In magento2 - I've an instance of type c5d.xlarge on AWS with centos 7 with 8GB of RAM. I'm running a magento storefront on it. Magento version is 2.1.7 and apache version is 2.4 . Now the problem is the memory usage is 74% and it gets out of memory sometimes, although storefront not public for users yet.

And when I've checked the processes I've found that about 100 processes are for apache S state, All of them has the same command of /usr/sbin/httpd Dforeground but with different usage of memory which range from 600MB to 900MB.

The question is why all those processes are running and how to choose the best processes to kill and keep storefront running?

Note1: CPU usage is 0%, it get in use when I open the storefront and start send requests.

Note2: I've checked for MPM it's prefork but when I open httdp.conf I cannot find prefork module or other module for MPM inside it


texts: How to get product collections by set of ids in magento 2?

texts:
I want something like the "IN CLAUSE" in MYSQL via magento2 ORM, for example:
select * from product where id in (...)

but by using getCollection in magento 2 to get something like this:
$this->getCollection()->addFieldToFilter('id','in',[...]);

How can I achieve this?


texts: creating order with custom options programatically in magento via php

texts:
While creating order programatically,if custom options are passed through a function in the form of customoption={label:[xl],value:[5]}, the order should be created with these custom option fields.
    I am using the below code:

            foreach($orderproduct->id as $key=>$item) {
            $product = Mage::getModel('catalog/product');
            $product->load($item);
            $quoteItem = Mage::getModel('sales/quote_item')->setProduct($product);
            $quoteItem->setQuote($quote);
            $quoteItem->setQty($orderproduct->qty[$key]);
            $quoteItem->addOption($existentOptions['additional_options'][] = array(
           'label' => $optiontitle, // Title of custom option field
           'value' => $customvalue,  // Value of custom option field
            ));
            $quoteItem = $existentOptions->getItem();
            if ($existentOptions = $quoteItem->getOptionByCode('additional_options'))
            {
                $orderItem = $additionalproduct->getOrderItem();
                $options = $orderItem->getProductOptions();
                $options['additional_options'] = unserialize($existentOptions->getValue());
                $quoteItem->setProductOptions($options);
             }
            $quote->addItem($quoteItem);
        }

This is creating the order, but product is not getting added.A blank morder is created in which there is no custom product.
    Kindly please help me.


texts: Associating Categories with Additional Collections Other Than Products

texts:
I've got a decent understanding of the basics of eav and adding additional attributes to categories, products and other entities however I'd like to be able to form a one to many relationship between additional groups of objects for example:

Category -> FAQ's
Category -> Recommended Products
Category -> Blog Posts

Etc.

Could you get me pointed in the right direction?

What if I want to add an additional association with products to discern wither a product is recommended for the category?


texts: How to return a response from _create api rest method

texts: By default this method returns an empty JSON , i want to how to return some response such as "correct" or "fail" , for example


texts:
I try to set up cron to generate my site map.

I defined the google sitemap in catalog > google sitemap.
I also defined the system > configuration > catalog > google sitemap generation  to every day

I then configured cron in system > configuration > system > cron as follow :

As no update are made on my sitemap files, I implemented the following php
php cron job monitor

But no tasks are displayed….

Furthermore, when I do a crontab -l I have i got an error saying "No crontab for user"

Could you help me on that please?


texts: Mangento 2: How to get language swicher using getChildHtml()?

texts:
For minicart:

(a) Reference name: minicart

(b) as : minicart,
so getChildHtml('minicart')

For top search:

(a) Reference name: top.search

(b) as : topSearch,

so getChildHtml('topSearch')

The above is done by me, but I need to get a language switcher.

What is a reference name for language switcher & store switcher ?


texts: Update multiple record in DB Table Magento 2.3.4

texts:
I want to do bulk insert and update to my custom model collection, right now I can only do insert multiple records to DB like this:

public function __construct(
    \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor,
    \Magento\Framework\App\ResourceConnection $resource
) {
    $this->connection = $resource->getConnection();
    $this->resource = $resource;
}

public function execute(){
  $data[]['name'] = 'Bond'
  $data[]['code'] = '007';
  $data[]['name'] = 'Lancelot';
  $data[]['code'] = '002';
  $this->connection->insertMultiple($this->resource->getTableName('agent'), $data);
}

this will add those 2 data records to my database table agent, the problem is when I execute this multiple time it will insert new data, I want to update the data if the code column is same


texts: 301 redirect not working correctly with php in old URL

texts:
This url

Redirect 301 /productdetail.php?pId=11390&base=1 http://domain.com/new-magento-url.html

This works

Redirect 301 /supertest http://domain.com/new-magento-url.html

I can see it is the .php but how do I except for that?


texts: Limit category to a specific customer segment

texts:
In my store (mage-EE v12) I have a category that i want to restrict to a specific customer segment. Does anyone know of a way i can do this?
EG, if i set up a segment, I want customers in this segment to have access to the full catalog, but if the customers does not fall into this segment they have no visibility of the restricted category?
Any thoughts ?
Cheers


texts: Magento1.9 - List of all in stock product brands to main menu

texts:
I have listed all brands to the main menu using below code and it gives all available brands.

$attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product','brand');
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
$attributeOptions = $attribute->getSource()->getAllOptions();

But, now I wants to load only brands, which related products are is in stock(qty>=1) to the Main Menu.

So How could I do that?

Thanks.


texts: How to create non-admin accounts in Magento 2 which user can only add and edit products and categories.


texts: Edit the contents of "getChildHtml('content')" in 1column.phtml

texts:
I'm looking for editing the contents of my template in the page 1column.phtml.

This page looks like this :

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

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

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

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

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

What I would to change is generated by <?php echo $this->getChildHtml('content') ?>, but I have no idea where the find it.


texts:
Is there a way to change a price using a URL parameter.

For example

shop.com/?special=true

changes the prices from 119$ to 99$


texts: Get product list by category id in view.phtml

texts:
This is a follow-up to this question:

https://stackoverflow.com/questions/6748730/magento-product-listing-by-category-id

How can I get product lists by categoryid from from within view.phtml, i.e. pass a $categoryid to list.phtml?

View.phtml has

<?php echo $this->getProductListHtml() ?>

And I would like to do something like

<?php echo $this->setCategoryId(id)->getProductListHtml() ?>

This way I can iterate through categories in view.phtml and get the product list for each and have the product list rendering be done for me in list.phtml.


texts:
I'm trying to get a collection of orders by 2 clients using their emails. I tried this :

$CollectionOforders = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_email',array('in' => array('client1@email.com','client2@email.com'))->addFieldToFilter('status','complete');

But i got this error :

Parse error: syntax error, unexpected T_OBJECT_OPERATOR


texts: unable to get order status in sales_order_place_after event in magento 1.9

texts:
Hello I am unable to get the order status in the observer sales_order_place_after I also tried other events like checkout_onepage_controller_success_action, checkout_type_onepage_save_order_after. Here is my code

<global>
<models>
  <xyz_customorderstatusmodel>
    <class>Endive_CustomOrderStatus_Model</class>
  </xyz_customorderstatusmodel>
</models>
<events>

  <checkout_submit_all_after>
    <observers>
      <xyz_CustomOrderStatus_Model_Observer>
        <type>singleton</type>
        <class>xyz_customorderstatusmodel/observer</class>
        <method>implementOrderStatus</method>
      </xyz_CustomOrderStatus_Model_Observer>
    </observers>
  </checkout_submit_all_after>
</events>

public function implementOrderStatus(Varien_Event_Observer $observer){
    $mytime = "time - " . date('d-m-Y H:i:s');
    Mage::log('in me');
    $status = $observer->getEvent()->getOrder()->getStates();
    Mage::log('My variable : '.$mytime .' -- ' .$status);
    die;

 }


texts:
I'm using below code

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$select = $connection->select()
        ->from(
        ['ce' => 'customer_entity']
);
$data = $connection->fetchAll($select);

It's working fine. It returns all customer fields. I would like to select only First Name, Last Name & Email.

Instead of select(), which function we need to use & how?


texts:
Email.less is pulling in theme.less adding unnecessary styles to sales emails.

This is happening in our parent blank theme in the vendor folder. Is there a way to kill the @import so its not being pulled into email.less without editing "core?"

There is also a theme.less in our custom theme.


texts: How to add admin custom module page (Button) in Magento 2?

texts:
Here I already created the button

if ($this->_isAllowedAction('custom_Mpquotesystem::mpquotes')) {
            $this->buttonList->update(
                'delete',
                'label',
                __('Delete Quote')
            );

        } else {
            $this->buttonList->remove('delete');
        }

When I am changing the label name it works

  But when I copied this code to the other place and changed the button_id it is not working.
  and also I want to know how this works


texts:
How to optimize checkout speed.

  It's take to much time to load data.

  Loader take almost 60 secs

  It's almost heating 560 js request in my site


texts: I want to use a custom option radio button to show/hide other options

texts:
I am trying to show or hide certain custom options depending if a radio button option is set one way or the other.
I am trying to follow this guide but I can't make it work.
Dynamically Hide Custom Options in Magento

Any help would be greatly appreciated!


texts: In Manage categories I added a custom tab, now I want to save the data that I change in that tab.


texts: Braintree Orders not Posting to Magento 2.3.3 admin

texts:
I am facing an issue on our Magento2.3.3 website when order is placed via Braintree.

Some of the orders are missing in the admin but order confirmation emails are sent to customers.
Even in the payment logs response is 'success' => 'true' from the Braintree side so the issue seems in Magento code.

Is anyone facing the same issue?

Thank you.


texts:
How can I export Magento 2 orders and then import them on a new system?

The new system has the same products in front-end and as far as customers are concerned. However, the way it works in the back is completely different so products & their IDs may not match up.


texts: Stop product options from displaying in the minicart

texts: How do I stop product options from displaying in the minicart?


texts: How to change Magento Custom Options title for all products

texts:
I am using the same Custom Product Options for all of my products. For Example:

Option attribute: GIFT Wrap? With the dropdown options "Green Gift Wrap" and "Red Gift Wrap". Our "Red Gift Wrap" is replaced for "Blue Gift Wrap". Now I want to change the title "Red Gift Wrap" to "Blue Gift Wrap" for all products.

I tried to change the "title" in the "catalog_product_option_type_title" table with a query directly in the database. Now in our backend the "Red Gift Wrap" is replaced for the "Blue Gift Wrap". Unfortunately the products still shows "Red" instead of "Blue" at the frontend. I cleared all the caches, reindexed all indexes, optimized the database table without any result.


texts:
in site 1 , we did't installed security patches, but in site 2 we installed security patches.

after copying the folder,

i am getting the error as follows :

  Fatal error: Class 'Mage_Install_Controller_Router_Install' not found in /var/www/html/1/10/sitename/app/code/core/Mage/Core/Controller/Varien/Front.php on line 138

i saw this link : Error after successfull patch SUPEE-5994: Class 'Mage_Install_Controller_Router_Install' not found

but i am new to ssh.

please give me some idea about that link or what need to be done to solve the issue.

Thanks in advance.


texts: Override the same file from two modules so that both of the edits are shown?

texts:
I have overridden a template file by specifying the path in requirejs-config.js file
like so:

var config = {
    map: {
        '*': {
              'Magento_Checkout/template/form/element/email.html':
              'Vendor_Module/template/form/element/email.html'
        }
  }
};

I tried to create a new module that overrides the same file with the same technique:

 var config = {
        map: {
            '*': {
                  'Magento_Checkout/template/form/element/email.html':
                  'Vendor_AnotherModule/template/form/element/email.html'
            }
      }
    };

In the browser, I can see that only the second - AnotherModule is overriding and the changes from the first Module are being ignored.

How to override the same file from two different modules so that both of the edits are shown?


texts: How can i add custom field for Customer Manual order in order creation by admin?

texts: I need to apply shipping and handling charges for customer in manual order, in normal checkout the shipping and handling cost received by default, in manual order for customer, how can i apply custom field for getting shipping and handling cost.


texts: How to view details repeatedly in magento grid?

texts:
I have two tables.

table_return
table_return_history

I am getting data from table_return  to the grid.
I want to view the history details from table_return_history by the return_id.

I tried to get the details like this.

protected function _prepareForm()
{
    //-- new Form --
    $form = new Varien_Data_Form(array(
        'id'          => 'edit_form',
        'action'    => $this->getUrl('*/*/save',array('return_id'=>$this->getRequest()->getParam('return_id'))),
        'method'    => 'post',
        'enctype'   => 'multipart/form-data'
    ));

    $form->setUseContainer(true);
    $this->setForm($form);

    $fieldset = $form->addFieldset('edit_form',array('legend'=>Mage::helper('requestreturn')->__('Packages Information')));

    $return_id = $this->getRequest()->getParam('return_id');
    $return_model = Mage::getModel('requestreturn/requestreturnhistry')->load($return_id);

    $fieldset->addField('product_name','text',array(
        'label'      => Mage::helper('requestreturn')->__('Return Ref :'),
        'name'       => 'product_name',
        'value'      => $return_model->getProductName()
    ));

But if the history table has two product it want show in history page.

How can i get repeat data if available?

UPDATE

Without form method is there any way to show the history details in page?


texts: How to change 'out of stock' to 'Sorry sold out'

texts:
In Magento (v1.9.3.1) I want to replace 'Out of Stock' to 'Sorry sold out'
Which file I need to edit please? I want a solution that is not lost after migration.


texts: Why product images are not loading using CDN URL?

texts:
I am having two instances. One for Admin panel and One for Front end.

I am uploading from Admin panel instance and storing all the images to AWS S3 bucket.
And I have created CloudFront (CDN) Distribution and also associated it with S3 bucket.

And now I am using CloudFront (CDN) URl and using for media URL.

It's loading all the images for Categories and CMS pages. But now loading images for product.

Will it be issue for Product image cache?
On my S3 bucket, all the media images are there including cache images as well.
But on Front end, it's showing that placeholder image only.

Ex:
Actual image which is on S3 bucket and shows using CDN URL
http://d23owmzqqamu40.cloudfront.net/media/catalog/product/cache/1/thumbnail/224x153/9df78eab33525d08d6e5fb8d27136e95/7/_/7.jpg

But when I am checking on front end, it loading placeholder image.
URL:
http://d23owmzqqamu40.cloudfront.net//media/catalog/product/cache/1/thumbnail/224x153/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/thumbnail.jpg

Please help me if anyone have solution about the issue.

Thanks


texts:
I have an admin grid form. The form has a checkbox. If the checkbox is checked, an additional required field should appear. If the checkbox is unchecked, the additional field should disappear.
While saving the form when the checkbox is checked and the required field is empty there should be an error (required field empty).
While saving the form when the checkbox is unchecked there should be no error.
I was using Contao before. Contao has a feature like this (solved in 3 lines of code).
Does magento have such functionality?


texts: Magento Set Selected Filter In Layered Navigation

texts:
we would like to Set a selected filter on initial page load for a category.

For example: when accessing the category, shoe_size=10 should already be selected

I read you can access the variables quite easily here

But how do I

pass a variable to the code? (can this be done through a custom layout update in category xml in backend)?
But more importantly. How do I SET the shoe_size filter to value 10 in code? Is there a setFilter()?

Help appreciated


texts: Upgrading from Magento 2.0.7 to 2.1.0 can no longer run the CLI

texts:
While the upgrade process worked fine on my development system, when I attempted to perform the upgrade on the live database I could only get as far as updating composer.

After this was successfully complete I was unable to do anything else as this is the result of trying to run the CLI tool:

$ php ./bin/magento
PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\Framework\Console\CommandListInterface in .../vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73
Stack trace:
#0 .../vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#1 .../vendor/magento/framework/Console/Cli.php(140): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...')
#2 .../vendor/magento/framework/Console/Cli.php(112): Magento\Framework\Console\Cli->getApplicationCommands()
#3 .../vendor/symfony/console/Symfony/Component/Console/Application.php(91): Magento\Framework\Console\Cli->getDefaultCommands()
#4 .../vendor/magento/framework/Console/Cli.php(83): Symfony\Component\Console\Application->__construct('Magento CLI', '2.1.0')
#5 /var/www/vho in .../vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

The only germane differences I can see is that the failure was in production mode on Amazon Linux AMI release 2016.03, whereas the successful upgrade was in developer mode using OS X. There are no permission issues, and it does not matter if I clear down var and pub/static or restart redis.

Originally Amazon Linux AMI was on PHP 7.0.8, but I downgraded to 7.0.7 after the first answer suggested this as a possible issue. Same error.

I am out of ideas as to why the M2 object manager is failing to instantiate this interface. Any thoughts?


texts: Where does Magento 2 URL Segment Parsing Happen

texts:
In Magento 2 routing, the system parses the URL segments into three sections

module-or-front/segment2/segment3

Which specific class file does this happen in?

Put another way, the request object has a getModuleName method that looks like this

public function getModuleName()
{
    return $this->module;
}

Where does Magento 2 get the string that ultimately sets the module property?


texts:
How can I force one defined category page to use https secure instead of using unsecre url.

I am using Magento Version 1.6.2.0

Thanks for help.


texts: How to Increase the Number of Crosssell Items in Cart?

texts:
I want to increase the number of cross sell items appearing in cart. The max item count is 4 in defined at app/code/core/Mage/Checkout/Block/Cart/Crossell.php

class Mage_Checkout_Block_Cart_Crosssell extends Mage_Catalog_Block_Product_Abstract
{
    protected $_maxItemCount = 4;

How can I increase this limit from admin end or set the limit in checkout.xml file.

Please Guide.

Thanks.


texts: Magento 2 - Add class active to the current category

texts:
I use the following code to get the categories in the left side of my store :

function categoryLoop($id, $is_sub = false){
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$categories = $objectManager->create('Magento\Catalog\Model\Category')->load($id);
if($categories->hasChildren()){
echo '
getId().'"' : '') . '>';
        $subcategories = explode(',', $categories->getChildren());
        foreach ($subcategories as $category) {
            $subcategory = $objectManager->create('Magento\Catalog\Model\Category')->load($category);
              echo '
getUrl().'">';
            echo $subcategory->getName();
            echo "
";
            if($subcategory->hasChildren()){ categoryLoop($category, true); }
        }
    echo "
";
    }
}
categoryLoop(3);

How I can add a class "active" to the current / selected category?

Thank you


texts: Volume Check Failed error while running Data Migration

texts:
I am facing below error when i migrate from CE1.7.0.2 to CE2.0.7,

[2016-06-03 05:34:59][ERROR]: Incorrect value: ultramegamenu/category_attribute_source_block_proportions in: eav_attribute.source_model for attribute_code=umm_cat_block_proportions
[2016-06-03 05:34:59][ERROR]: Incorrect value: ultramegamenu/category_attribute_source_categorylabel in: eav_attribute.source_model for attribute_code=umm_cat_label
[2016-06-03 05:34:59][INFO][mode: data][stage: volume check][step: EAV Step]: failed

I checked the config.xml file:

<models>
    <ultramegamenu>
        <class>Infortis_UltraMegamenu_Model</class>
    </ultramegamenu>
</models>

Can anyone help me with this error.


texts:
XML is invalid when doing Magento Design Layout Update xml with following code

<reference name=”content”>
    <block type=”catalog/product_new” template=”catalog/product/new.phtml”>
        <action method=”setProductsCount”><count>9</count></action>
        <action method=”addColumnCountLayoutDepend”><layout>empty</layout><count>5</count></action>
        <action method=”addColumnCountLayoutDepend”><layout>one_column</layout><count>4</count></action>
        <action method=”addColumnCountLayoutDepend”><layout>two_columns_left</layout><count>3</count></action>
        <action method=”addColumnCountLayoutDepend”><layout>two_columns_right</layout><count>3</count></action>
        <action method=”addColumnCountLayoutDepend”><layout>three_columns</layout><count>2</count></action>
    </block>
</reference>


texts: Right syntax for the foreign key in InstallScript

texts:
When I adding a foreign key, I write something like:

->addForeignKey(
    $installer->getFkName('my_table_name', 'website_id', 'store_website', 'website_id'),
    'website_id',
    'store_website',
    'website_id',
    Table::ACTION_CASCADE
)

But when table prefix is used, table name can be different from the base name. What should I do in this case? Should I use the method SchemaSetupInterface::getTable($tablename) or Magento adds table prefix automatically?

PS: with the getTable method it could look like this:

->addForeignKey(
    $installer->getFkName('my_table_name', 'website_id', 'store_website', 'website_id'),
    'website_id',
    $installer->getTable('store_website'), // << CHANGED
    'website_id',
    Table::ACTION_CASCADE
)


texts: Magento 2 System Configuration Custom setting for Module Failed

texts:
Got problem here, I'm adding a store configuration and got this error

 1 exception(s): Exception #0 (Exception): Notice: Undefined index: id in C:\xampp\htdocs\magento3\app\code\Magento\Config\Model\Config\Structure\Element\Iterator.php on line 59

here is the system.xml

    <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="news" translate="label" sortOrder="1">
            News
        </tab>

            Latest News
            <tab>news</tab>
            <resource>News_LatestNews::system_config</resource>
            <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1"
showInWebsite="1" showInStore="1">
                General Settings
                <field id="enable_in_frontend" translate="label" type="select" sortOrder="1"
showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable in frontend
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="head_title" translate="label comment" type="text" sortOrder="2"
showInDefault="1" showInWebsite="1" showInStore="1">
                    Head title
                    <comment>Fill head title of news list page at here</comment>
                    <validate>required-entry</validate>
                </field>
                <field id="lastest_news_block_position" translate="label" type="select"
sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                    Lastest news block position
                    <source_model>News\LatestNews\Model\System\Config\LastestNews\Position</source_model>
                </field>
            </group>

    </system>

this is my acl.xml

    <?xml version="1.0"?>
           <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
<acl>
    <resources>
        <resource id="Magento_Backend::admin">
            <resource id="Magento_Backend::stores">
                <resource id="Magento_Backend::stores_settings">
                    <resource id="Magento_Config::config">
                        <resource id="News_LatestNews::system_config" title="Simple News Section" />
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>
</config>

I'm new in magento so I really need a help thanks a lot


texts: How to access all the rest api's in magento

texts: I'm trying to build a flutter app from an existing magento store. How can I access the current REST API of the store? (I'm new to magento...)


texts: How to set the Cookie metadata on Magento 2?

texts:
Magento2 release 2.4.1 announced a fix for SameSite issue.
But how to use change the default Cookie settings in a module?


texts:
Can't make messages to appear on frontend. I have an observer on event:

<event name="controller_action_postdispatch_cms">
        <observer name="some_module_controller_action_postdispatch" instance="Some\Module\Observer\PostdispatchFrontendActionControllerObserver" />
</event>

Some\Module\Observer\PostdispatchFrontendActionControllerObserver execute() method looks something like this:

 public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $this->messageManager->addSuccess(
            __('success message')
        );

        return $this;
     }

I can't see any messages on frontend. why is that?


texts: different template files for product detail page of simple and grouped product types. - Magento 2.2.x

texts:
I have 2 types of product in my website.

1) simple products and
2) grouped products

i wanted different design for both this types of product types. so how can i have different template file for product detail page for above 2 type of product.

thanks in advance


texts: Magento 2: Customer details change to another when edited in grid row

texts:
I seem to be having a strange problem with my Magento 2 installation and wanted to know if anyone else has come across this issue and may point me in the right direction towards a possible cause and therefore solution.

So, the issue seems to occur when I edit a customer in the customer grid. When I make a change, the customers address and company details change to that of another customer (seemingly at random), however when I go in to edit the customer the address details are as they should be, I tick the 'set as default' for billing and shipping, save the customer and the details then appear correctly.

If I then make another change in the grid row to that customer, the details again change to that of a different customer (although always to the same one that they did before) and the same story, the default addresses have been unticked, I make the changes and save them and it is fine again.

I appreciate this may be a little hard to imagine, so I have some screenshots to show this happening.

The customer as they should be:

The customer after I have made a grid action / inline grid row change:

It's important to note that no details actually get changed to the customer, it just appears wrong in the customer grid.

I am going through the process of testing what's gone wrong with a fresh Magento 2 installation, and hopefully this might lead to some explanations.

I am thinking this may have had something to do with the fact I imported data from a Magento 1 installation using Ubertheme's Data Migration tool.

Any thoughts or ideas would be greatly appreciated.

many thanks.


texts: is there any restriction on specifying new theme name?

texts: Is there any restriction on specifying theme name? theme name should always be in lowercase or we can give as per our choice in magento 2?


texts: What does the STATUS_NOT_ACTIVE status in newsletter mean?

texts:
In the Magento2 newsletter, there are 4 statuses. Here's my interpretation of them:

STATUS_SUBSCRIBED - User has confirmed and subscribed to newsletter
STATUS_NOT_ACTIVE - ???
STATUS_UNSUBSCRIBED - User may or may
    not have confirmed his email address but is certainly not subscribed
    to newsletter
STATUS_UNCONFIRMED - User has subscribed to newsletter but has not
confirmed his email address

Is my understanding of the statuses correct? And what does STATUS_NOT_ACTIVE mean?


texts: Product import csv images not getting imported

texts:
I have been trying to import products CSV to my magento store.

I did import the products without the images and it was successful.

But now when I try to import the product with image column I am not able to see any images getting imported.

I tried storing the images in various places such as "var/media/import", "media/catalog/products" and gave the path in the CSV but nothing seemed to work.


texts: Require js didn't load my Js in custom module

texts:
I'm working on a custom module for GTM.

The last part I facing issue is with require js.

I want to trigger a custom JS on "add to cart" click.

I made a requirejs-config.js file in Vendorname/modulename/view/frontend
with this :

alert("Hello");
var config = {
    map: {
        '*': {
            "catalogAddToCart":    'Vendorname_modulename/js/customCatalogAddToCart'
        }
    }
};

If I clear cache deploy static content (with -f mode as I'm in developer mode) I got my alert.

But in my Vendorname/modulename/view/frontend/web/js/customCatalogAddToCart.js
I add

alert("world");

In the network panel, I didn't see the file customCatalogAddToCart.js and also didn't get the second Alert.

Do you know what's wrong?


texts: My magento 2 is not working after install japanese locale file

texts:
I have a trouble with my Magento 2 - 500 page error in front and backend.

Error log:

2016/05/29 21:28:00 [error] 2681#2681: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/var/page_cache" is not writable in /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php:209

Stack trace:
#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')
#1 /var/www/html/lib/internal/Cm/Cache/Backend/File.php(82): Zend_Cache_Backend_File->setCacheDir('/var/www/html/v...')
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)
#4 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Factory.php(154): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true)

My Server Centos 7
Nginx 1.10
Php7
Mysql 5.6

I have already changed 777 page_cache directory.

Can anyone help me to solve this problem?


texts: Magento2 ui component binding issue for file uploader in knockout template

texts:
I am using knockout file uploader in one of checkout step, please check below screenshot:

below is my code to initialize file uploader but somehow its not working:
<div class="reference-document-upload-wrapper" id="reference-document-upload-wrapper" data-bind="scope: 'reference-document-uploader'" afterRender="refreshDiv">
     <!-- ko template: getTemplate() --><!-- /ko -->
</div>

<script type="text/x-magento-init">{".reference-document-upload-wrapper": {
                           "Magento_Ui/js/core/app": {
                               "components": {
                                   "reference-document-uploader": {
                                       "component": "Expresskitchen_OrderDocuments/js/form/element/file-uploader",
                                       "template": "ui/form/element/uploader/uploader",
                                       "allowedExtensions": "jpg jpeg gif png pdf doc docx xlsx xlx",
                                       "isMultipleFiles":true,
                                       "maxFileSize":2097152,
                                       "previewTmpl":"Expresskitchen_OrderDocuments/form/element/uploader/preview"

                                   }
                               }
                           }
                       }

}

this code is inside .html knockout template but somehow i cannot see browse button of file uploader, can anyone let me know how can i resolve this issue? i also tried to force apply knockout binding in its component js file but it did not work


texts:
How do i change this text and colour it?

  "Buy 20 for £13.90 each and save 14%"

I've changed its place from "/catalog/products/view.phtml" but the text is not able to change from this file...

Thanks.


texts: Change layout just for one cms page - for instance “customer-service”

texts:
I'm using the pages that come with the default installation of Magento. The customer wants to have different contents on the right column of those pages. For instance, on the "customer-service" page they want to have the top FAQ's but on "contacts" they want to have the telephone and mail information.

How can I achieve that? I've been trying to change the 2columns-right layout, on the right column, to each page but I was unable to find a way to do that.


texts: How to remove shipping from Cart (Magento 2.4)

texts:
I am trying to remove the Shipping & Coupon container from the /checkout/cart page. I tried to copy the XML file into layout/override/base and edit it, but then I get blank page on /cart.
A simpler way would be by hiding it via CSS, but I am trying to do it programatically and proper way.
Currently I have following container as shown in the image, which I want to disable from the cart page.

And the code to show this container exist in vendor/magento/module-checkout/view/frontend/layout/checkout_cart_index.xml , I also tried to comment out the block inside this file, but then everything gets messed up i.e. checkout process too.
UPDATE
I was able to do it by following this however, I had to edit the actual XML file, if I place the code in override/base/XML then it doesn't work, and I get a blank page. Why is that?


texts: .htaccess redirect samplesitex.com to samplesitey/alias-page in both https and http variants

texts:
I am trying to redirect an alias url to a different url path. (it wont let me do this in cpanel for some reason)

Example:
SiteX.com > SiteY.com/this-page

I have tried

RewriteCond %{HTTP_HOST} ^sitex.com [NC]
RewriteRule ^(.*)$ https://www.sitey.com/this-page $1 [L,R=301,NC]

At the moment I can only work out to redirect sitex.com to sitey.com

Everything I try wont let me point to SiteY.com/this-page

So the result is that SiteX after redirect just goes to the base url for SiteY.com

I am sure its very easy to achieve but all answers I find are regarding sub folders and not url-friendly sub paths.


texts: Display Custom Module Template After Product Title

texts:
I want to display my custom module template after Product title.

here's the code which I'm using currently.

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="content">
            <block type="core/template" as="shippingestimate" template="shippingestimate/shippingdate.phtml" />
        </reference>
    </default>
</layout>

  Config.xml code

<frontend>
        <routers>
            <shippingestimate>
                <use>standard</use>
                <args>
                    <module>Wtw_Shippingestimate</module>
                    <frontName>shippingestimate</frontName>
                </args>
            </shippingestimate>
        </routers>
        <layout>
            <updates>
                <shippingestimate>
                    <file>shippingestimate.xml</file>
                </shippingestimate>
            </updates>
        </layout>
</frontend>

Just before Qty block.

Thanks


texts: Magento 2 Customer account custom tab not loading properly

texts:
I'm trying to add a custom tab to the Customer account page. I followed the Mageplaza guide here, however I'm having two issues.

First the menu item is added properly, but it points to routename/customer/index/ instead of the correct path (I changed it in the customer_account.xml file).

If type out the correct link, the page loads, but it bring up my second issue.
On the page I'm getting an undefined error:

  Exception #0 (Exception): Notice: Undefined property: Magento\Framework\View\Element\Template::$getProductCollection in D:\xampp73\htdocs\testm2\app\code\Msquared\CustPriceRange\view\frontend\templates\custpricerange.phtml on line 22

Here's a link to the module GitHub repo.

I'm running a local XAMPP copy of M2.3.4 on PHP 7.3.

Any help would be appreciated.


texts: Magento2 - Wait for checkout page completely loaded and fire JS code

texts:
The goal is to add a piece of JS to manipulate a datepicker on the checkout page. I use a OSC (OneStepCheckout from mageplaza). So far I've followed this documentation and added this mixin:

var config = {
  config: {
    mixins: {
      'Magento_Checkout/js/action/set-shipping-information': {
        'Vendor_Module/js/action/set-shipping-information-mixin': true
      },
    }
  }
}

in this file:

define([
  'jquery',
  'mage/utils/wrapper',
], function ($, wrapper) {
  'use strict';

  // the html is not there so this is empty
  var datepicker = $('#datepicker')

  return function (setShippingInformationAction) {
    return wrapper.wrap(setShippingInformationAction, function (originalAction) {

      // ... some custom code ... //
      return originalAction();
    });
  };
});

When I load the page the datepicker var has no HTMLElements, the reason is because the checkout is loading all the checkout components. So how can I tell the mixin to wait until the checkout components are completely done/loaded.

Maybe it shouldn't be a mixin?


texts: checkout shipping page add custom field in magento 2.3.5

texts:
Now i added custom field checkout shipping page but issue add custom module custom.js and define layout checkout_index_index.xml but it's not working

checkout_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
     <link src="VendorName_ModuleName::js/custom.js"/>
</head>

app/code/Vendor/Module/view/frontend/web/js/custom.js

require([
"jquery"
], function($){
    $('.dropdown select').on('change',function(){
        $('.dropdown select').find(":selected").text();
        if ($('.dropdown select').find(":selected").text() === 'Test'){
            $('.customfields').show();
        } else {
            $('.customfields').hide();
            console.log($('.dropdown select').find(":selected").text());
            $('.customfields input').val($('.dropdown select').find(":selected").text())
        }
    });
  });

custom.js code not working checkout page knockout js issue


texts: Patch Installation - Security Patch SUPEE-10415 return 404 error Both Front-End & Back-End

texts: I try to install Security Patch SUPEE-10415, after successfully installed my front-end and back-end getting 404 error.


texts: I'm testing my shop: after the guest checkout, after the shipping method (step 4), the checkout goes to checkout/cart/ again. Anyone has an idea how to fix it? Vers. Magento 1.9.2.0 theme RWD


texts: is it possible to create android shopping app for magento 1.9.2

texts:
I am new to magento.I have looked through the internet.There is a lot of rest API's available for Magento version 2.0. but not for the V 1.9.2.
I have looked through below link: http://devdocs.magento.com/guides/m1x/api/rest/introduction.html

But there are only few REST Api's. I would like to know whether I can create fully functional shopping app using MAGENTO v1 1.9.2 Rest Api's or not?


texts: How to get last order id in Magento 2.3?

texts: I want to get last order's order id at any page?


texts: How to give browser specific styles in magento

texts:
I want to give browser specific styles in magento. The menus in the header are given margin-top:-3px; It works well in chrome. But in firefox I need to give margin-top:-40px;
Someone kindly help me.
I also tried :
    @-moz-document url-prefix() {
 #custommenu { margin-top:-40px; }
 }


texts: Can not delete notifications or messages from the admin notifications inbox

texts:
If I go to SYSTEM > NOTIFICATIONS > INBOX and click the "REMOVE" link next to any of the active messages, the page refreshes and the message no longer appears in the listing indicating it has been successfully permanently "REMOVED".

The next day the message reappears as if it had never been removed. Is that normal behavior or should a massage PERMANENTLY be removed when clicking "remove"?

I also attempted to select all 248 messages in my admin inbox and remove them all. They appeared to be removed and the inbox showed that there were zero messages left in it (see image)

The next day all 248 messages will reappear in the inbox like they were never removed.

How can this problem be corrected so when I remove all of the messages in my inbox, they stay permanently removed and never reappear.

This happens every single time I try and delete any of the messages in the inbox.

It has been three days now and the messages remain deleted thanks to Jonathan's insight into the problem. It was in fact the cache maintenance script that I was running every night via cron. It would reset the red/deleted flag and the messages would all reappear as though they were never removed or read.


texts: Is there an email template extension for Magento 2?

texts: Is there a responsive email template extension for Magento 2?


texts:
I am trying to bring a live site on the localhost I am following these following steps but it gives error at the install time.
Step 1: I have downloaded the live site
Step 2: Then I have created a blank database and imported my DB into that
Step 3: Deleted the local.xml
Step 4: Then restart the installation
It gives error on 99% that no administrator role is found
[ERROR] Exception: No Administrators role was found

Any solution for this?


texts: Getting error when I try to add image to product

texts:
It's a simple product. It saves but when I try to add an image I get the
parameter theme_dir not passed. I am using the magento blank template. It's a fresh 2.1 install and the magento blank template is selected as the theme for the website.

==> stage.blaircorner.com/html/var/log/exception.log <==
[2016-08-08 19:47:24] main.CRITICAL: exception 'InvalidArgumentException' with message 'Required parameter 'theme_dir' was not passed' in /chroot/home/blaircornerc/stage.blaircorner.com/html/vendor/magento/framework/View/Design/Fallback/Rule/Simple.php:61


texts:
After installing SUPEE-8788 on Magento 1.8, a file is created in app/code/local/Mage/Core/functions.php.
Why Mage file is here instead of app/code/core ?


texts: Magento 2 load component composer dependencies

texts:
I am trying to develop simple Magento 2 module. Accoding to Composer integration guide I had to put all my dependencies into composer.json file into my module root. According to Default File Structure Guide I had to put my code in app/code directory (on development stage, before release). So the question is how to enable magento to load me dependencies from app/code/vendor-name/package-name/composer.json file?

If I run

  bin/magento setup:upgrade

my module is enabled, but dependencies are not loaded to /vendor

If I run

  composer update

from magento root dir, my module dependencies are still not loaded

If I run

  composer install

from app/code/[my module dir], dependencies are loaded into app/code/[my module dir]/vendor, but not into [magento root]/vendor dir

What is the best practice for module development with composer dependencies?


texts: M2: Product reviews and configurable products

texts:
Let's say I sell a bike in two variations (black and white). That's 3 products in total: 1 configurable product and 2 simple products.
When a seller goes to the bike's configurable product page to write a review, the review is assigned to the configurable product. That is not ideal, because Google Merchant Center wants me to export reviews at variation-level. However, if I collect reviews at variation-level, the reviews won't be showing at the configurable product page.
My questions:

Is it possible to give the visitor an option to leave a review for a specific variation?
Is it possible to make a configurable product collect all reviews of its attached simple products?


texts:
Good morning community.
Yesterday my Magento went WSoD on me, while trying to make some changes so it works the way my boss wants it to.
The problem started appearing after I turned on the "add storecode to URL" option.
At first I noticed the extension "Advanced Permissions with Multi-Vendor" wasn't working properly anymore (user login produced PHP error all of a sudden).
After trying to fix the problem by disabling the storecode-option again, I got the WSoD.

What I've tried so far:
Clearing and disabling Cache; Disabling compiler, edit index.php (display_errors and memory_limit), check the XML files for changes in the last 15 minutes.

Obviously nothing has worked so far. I've downloaded my system.log and mostly cleared it.
Yes, I do have the old version still, but I uploaded the almost empty one, so I could actually find the log entry.
After reloading the page, here it is:

2014-10-28T08:00:48+00:00 ERR (3): Notice: Use of undefined constant tmp - assumed 'tmp'  in /home/.sites/147/site9663270/web/shop/lib/Zend/Cache.php on line 153
2014-10-28T08:00:48+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 108: parser error : Opening and ending tag mismatch: value line 108 and image  in /home/.sites/147/site9663270/web/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2014-10-28T08:00:48+00:00 ERR (3): Warning: simplexml_load_string():                 &lt;action method=&quot;setElementClass&quot;&gt;&lt;value&gt;newsletterimage&lt;/image&gt;&lt;  in /home/.sites/147/site9663270/web/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2014-10-28T08:00:48+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /home/.sites/147/site9663270/web/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450

Anyone know what this means? I suppose something with xml-files.

edit01: After some help from Stefan Gregori, I fixed the tmp-folder warning, here's the new log:

2014-10-28T09:20:02+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 108: parser error : Opening and ending tag mismatch: value line 108 and image  in /home/.sites/147/site9663270/web/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2014-10-28T09:20:02+00:00 ERR (3): Warning: simplexml_load_string():                 &lt;action method=&quot;setElementClass&quot;&gt;&lt;value&gt;newsletterimage&lt;/image&gt;&lt;  in /home/.sites/147/site9663270/web/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2014-10-28T09:20:02+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /home/.sites/147/site9663270/web/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450


texts: Export to csv showing undefined index UiComponentFactory.php

texts:
I have used the below code in view :

<exportButton name="export_button">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="selectProvider" xsi:type="string">pos_outlet_listing.pos_outlet_listing.pos_outlet_columns.ids</item>
                </item>
            </argument>
</exportButton>

Got Error:

Notice: Undefined index: attributes in /home/yaboow/public_html/demo/vendor/magento/framework/View/Element/UiComponentFactory.php on line 176

version 2.3

Is there anything i have missed!!?


texts: What is the maximum capabilty of Magento 2 CE?

texts:
I'm just curious about the capacity of my M2 website on the below;

How many concurrent users do I have?
How much load does it take?
How many transactions can it handle?
etc....

My Server Specs

SSD Web Space    -   160 GB

Data Transfer   -    5 TB

CPU Power       -    Quad-Core 2.5GHz

RAM Availability    - 8 GB ECC

I'm new to the website optimization area. Any help would be appreciated.


texts: Magento2 : Will cacheable = "false" invalidate cache in varnish cache?

texts: I have store in Magento2 and planning to integrate varnish cache. Want to confirm if there is an issue with cacheable="false".


texts: intergating mastercard paymet with http://www.mastercard.com.au/

texts:
I want To integrate http://www.mastercard.com.au/ master card payment within Magento. is there any free module to do that .or any build in method to do that

Edit
I found some paid extension.VkWD9b_CeiE I want to know it is ok for this


texts: Integrate or enable ElasticSearch with Magento 2.3.3

texts:
I am using Magento's latest community version Magento 2.3.3. I am very new to ElasticSearch. I want to integrate Elasticsearch with Magento, So I took reference from here https://www.tigren.com/magento-2-elasticsearch/ and install Elasticsearch on the localhost.

According to my screenshots, I think, I set up elasticsearch successfully on my local machine but unfortunately, I can't see better search result on the frontend (I mean quick result). On the frontend side, it still takes lots of time for showing results.

Any idea where I am wrong?

and How can I check on frontend elastic search working or not?


texts: Change Magento 2 theme without using admin panel?

texts:
Switched to the default Blank theme this morning for a demo and was immediately locked out of both admin and front-end with a bunch of errors.

Is there a way to toggle the theme through the config files?


texts:
This error appears in the admin when adding shipping tracking information.  The actual file/location is public_html/includes/src/Mage_Core_functions.php on line 247.

When I went to find the file, it didn't exist.  I'm not good with php and am not sure if there is suppose to be a file.

History: I had the new host company move the site from the old host company.  This error happened when we started selling again on the new host.  I'm wondering if files are missing?  I noticed in the include file a lot of files are not there under the new host compared to the old host.  But I don't know when these files are created.

My host company tried to resolve the issue.  No success. What they tried was upgrading php, flush cache on server, increase the limit to 600 seconds. However this did not resolve the issue with the PHP error. After they refreshed the page though, the shipping code was added successfully. But the error message came up again the second time around.


texts: "quoteBaseGrandTotal is not defined" error during Checkout in Shipping Block

texts:
In my magento website running ver. 1.9.1.0 when I add any product to cart and go to checkout then the checkout page seems fine, but on the checkout page when I select "Shipping Methods" radio button then I get error in the console saying "quoteBaseGrandTotal is not defined".

Below is the website product-list link, add product to cart(by drag-drop), click on "Checkout" and check it yourselves:
http://115.112.143.170/ECO/mag/cookpack/cookpack-recipes/diet/paleo-diet.html

Any help/suggestion is greatly appreciated.

It's very urgent.


texts: Magento 2 checkout without processing payment

texts:
I'm looking for a way to use Magento 2 without the payment processing functionality, but instead just keep the details of the order within the backend where it will be processed off-line via direct communication with customer. Are there any easy ways of accomplishing this? I know one option is to enable COD for orders - but I'm looking for something a bit more elegant.
Thanks.


texts: CSV product Import stuck on Please wait..." hang

texts:
I have a problem with Magento 2 import section.

I am trying to import a product from CSV, the page stop loading but the loading icon is always present and Magento don't check data.

what is the problem? I haven't getting any error in the web console. The server is ok, other functions work correctly.

What is the problem? Please help me to solve.

Thanks


texts: I am trying to add start date and end date in admin for each custom option. I need a starting point because I don't have any idea how to proceed.


texts: Magento 2 Error in browser console Expected to start loader but did not find one in the dom

texts:
I have developed site in Magento 2.2.0 and created custom product listing page.

I have used add to cart functionality using ajax but in console giving error:-

  "VM1386:5 Expected to start loader but did not find one in the dom"

Any help will appreciate. Thanks.


texts:
I've just installed magento 2 based on Windows using Xampp .. and it is working fine. my problem is, i purchased a domain name for it and put it in httpd-vhosts but i can't access it from outside (WAN).

Note: i can access the xampp dashboard page through https://domainname/dashboard but when i type  https://domainname/magento to access magento it is loading for 1-2 Mins and change the url in the browser to the localip! like this: http://localhost/magento and for sure i can't access Magento server local IP or  localhost from outside
I think there is an issue in file located in magento folder that cause the redirection problem.


texts: display product name in custom page in admin grid in magento2

texts:
I want to display product name in the custom page in admin grid it displaying in the grid but I want to display in the custom page which will open on view click

<field name="customization_attachment">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">file</item>
                <item name="label" translate="true" xsi:type="string">Attachment</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">Product</item>
                <item name="disabled" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">70</item>
                <item name="dataScope" xsi:type="string">customization_attachment</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">false</item>
                </item>
            </item>
        </argument>
    </field>


texts: Magento 2 is getting installed with older version

texts:
I have cloned from https://github.com/magento/magento2.git. When I install this I am getting Magento Version Magento ver. 2.0.13. I am not getting any Magento ver. 2.1.x.

Why I am getting the older one as the repository is getting updated regularly?


texts: Magento Category collection missing custom attributes

texts:
I am currently developing for a shop that doesn't use the product page. On every category with sub categories the sub categories are shown until there are no more sub categories, then the products in that category are shown. Downside of this workflow is the really large category tree.

To speed things up i added all calculated from prices to the category using a custom attribute "from_price" and i'm trying to replace the category load with the category collection.

When i preform a load on the category the data my attribute is there.

example:

$category = Mage::getModel('catalog/category')->load(5);
var_dump($category->getData());

array (size=45)
  'entity_id' => string '6' (length=1)
  'parent_id' => string '5' (length=1)
  'created_at' => string '2012-08-02 08:28:34' (length=19)
  'updated_at' => string '2016-06-14 13:37:09' (length=19)
  'path' => string '1/2/5/6' (length=7)
  'position' => string '2' (length=1)
  'level' => string '3' (length=1)
  'children_count' => string '3' (length=1)
  'store_id' => string '3' (length=1)
  'extra_description' => string '' (length=0)
  'latijnse_naam' => string '' (length=0)
  'from_price' => string '4.09' (length=4)
  ...

But when i try to get the attribute using a collection my attribute is not added to the data.

example:

$collection = Mage::getModel('catalog/category')
    ->getCollection()
    ->addAttributeToSelect('*');

foreach ($collection as $category) {
    var_dump($category->getData());
}

array (size=36)
  'entity_id' => string '6' (length=1)
  'parent_id' => string '5' (length=1)
  'created_at' => string '2012-08-02 08:28:34' (length=19)
  'updated_at' => string '2016-06-14 13:37:09' (length=19)
  'path' => string '1/2/5/6' (length=7)
  'position' => string '2' (length=1)
  'level' => string '3' (length=1)
  'children_count' => string '3' (length=1)
  'store_id' => string '3' (length=1)
  'extra_description' => string '' (length=0)
  'latijnse_naam' => string '' (length=0)
  ...

The strange thing is the attributes "extra_description and "latijnse_naam" are added the same way as my "from_price" attribute and they both show up in the data collections.

My code to add  the attribute looks like this ( upgrade-2.0.0-2.0.1.php )

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

$entityTypeId     = $installer->getEntityTypeId('catalog_category');
$attributeSetId   = $installer->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$installer->addAttribute('catalog_category', 'from_price', array(
    'type'              => 'varchar',
    'label'             => 'From Price',
    'input'             => 'text',
    'source'            => 'eav/entity_attribute_source_boolean',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => false,
    'default'           => '0',
));
$installer->addAttributeToGroup(
    $entityTypeId,
    $attributeSetId,
    $attributeGroupId,
    'from_price',
    '25'
);

$installer->endSetup();

Things i have tried so far:

Removed and readded the attribute
comparing the inserted data in the eav_attribute,
catalog_eav_attribute, eav_entity_attribute with the data of the 2
attributes that do show up
Upgraded ( local ) magento from 1.8.1.0 to 1.9.2.4

Final thing i tried was turning on the flat category tables. When i have this option turned on i do get my attribute but i do not want to be depending on flat category tables and so i would like to fix this issue :).

Has any one else encountered this issue with magento or are there any suggestions in which direction i should look.

All answers are appreciated.


texts: How to import a >300Mb database using XAMPP?

texts:
Whenever I try to upload a large, I get this:

You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.

Is there by chance a way to change this? I've google it but nothing found (unless about old versions old xampp).


texts: Get "category level" for products in magento 2

texts: How to get Category level of product using product id ?


texts: Placing a HTML snippet on the Top bar in a Magento 2.3.5p2 site

texts:
How can I place a snippet to be of the top bar of a Magento 2.3.5. p2 site.
This is the area that has the store view drop down, languages drop down, etc.
See below


texts: Editing contact form's required field does not work

texts:
My client wants to have the comment in conatct form as optional. I changed the below code but then form does not work any more "Unable to submit your request. Please, try again later"!

     *<?php echo Mage::helper('contacts')->__('Comment') ?>

           <textarea name="comment" id="comment" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Comment')) ?>" class="required-entry input-text" cols="5" rows="3"></textarea>

to

    <?php echo Mage::helper('contacts')->__('Comment') ?>

         <textarea name="comment" id="comment" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Comment')) ?>" class="input-text" cols="5" rows="3"></textarea>


texts: Magento contact form encodes html entities

texts:
In Magento 2.1.1 the contact form seems to encode the html entities and special characters into entities and therefor corrupts the contact form contents.

I noticed that the Transport action sends the mail with type text instead of HTML and I couldn't find a way to set the type as setBodyHtml.


texts: In Magento1x we need to do make different api calls to create shipment and add tracking numbers to that shipment. In Magento 2x REST documentation it appears I could do both using the single POST api call. When i tried it was not allowing the tracks to have in the shipmentData then what is the purpose of having the tracks and Comments information in that API. Did anyone tried this?


texts:
We are using the following extension: https://www.magentocommerce.com/magento-connect/exit-intent-popup-2.html

Where should the following code be placed to only show the popup when users are not logged in:

if(!(Mage::getSingleton('customer/session')->isLoggedIn()))


texts: What is the purpose of http_cache_hosts entry in app/etc/env.php?

texts:
I have configured Varnish cache in the local Magento 2 environment and It is working fine.
I have added the below lines in the app/etc/env.php file.
'http_cache_hosts' => [
    [
        'host' => '127.0.0.1',
        'port' => '6082'
    ]
]

What is the real purpose of adding this configuration in Magento 2 env.php?
What do these configurations do?
How it affects Magento? Please Help me Out....


texts: magento 2 email issue variable not working {{htmlescape var=$order.getCustomerName()}}

texts:
All order emails sends in this way without getting customer name or any details should getting from email variable.

Hi, {{htmlescape var=$order.getCustomerName()}}

Also Payment method section its displayed as html

 Cash On Delivery

What is the issue?


texts: Is there any possibility to cancel the on hold orders magento1.9 soap API.


texts: programmatically adding product to cart returns every time diffrent quote id in android application

texts:
Below code work perfect on IOS application but now work in android application.

<?php
error_reporting(0);
include("../app/Mage.php");
umask(0);
Mage::app();

$store_id=$_POST["store_id"];
$valusof=$_POST["cartproduct"]; //$valusof=array(array("product_id"=>"32","quantity"=>"1","option_id"=>'4'),array("product_id"=>"12","quantity"=>"5"));
$result_array = array();

if(isset($store_id) || is_numeric($store_id)){
    $store=$store_id;
}
else
{
    $store="1";
}
if(!is_array($valusof) or empty($valusof) ){
    $result_array["message"]="Product quantity or Product Id or Option id is null add Quantity Or Not in Array Formate";
    $result_array["status"]="0";
    echo json_encode($result_array);
}
else
{
    foreach ($valusof as $value) {
        Mage::getSingleton("core/session", array("name" => "frontend"));
        $cart = Mage::getSingleton('checkout/cart');
        $product = Mage::getModel('catalog/product')
                         ->setStoreId(Mage::app()->getStore()->getId())
                         ->load($value["product_id"]);

        $cart->addProduct($value["product_id"], array(
                'qty' => $value["quantity"],
                'super_attribute' => array( 92 => $value["option_id"] )
                )
            );
    }

    $cart->save();

    $cart1=Mage::getSingleton('checkout/session');
    $cart1->setCartWasUpdated(true);
    $result_array["quoteid"]=$quoteid=$cart1->getQuoteId();
    $result_array["items_count"]=Mage::helper('checkout/cart')->getCart()->getItemsCount();
    //get quote using sales/quote
    $quote = Mage::getModel('sales/quote')->load($quoteid);
    $quote->setStoreId($store);
    $quote->save();

    $store_id=$quote->getStoreId();
    if(isset($store_id) || is_numeric($store_id)){
        $current_currency_code=Mage::app()->getStore($store_id)->getCurrentCurrencyCode();
        $currency_code=$current_currency_code;
    }else{
        $currency_code = Mage::app()->getStore()->getBaseCurrencyCode();
    }
    $base_currency_code=Mage::app()->getStore()->getBaseCurrencyCode();

    $base_grand_total=$quote->getBaseGrandTotal();
    $grand_total=Mage::helper('directory')->currencyConvert($base_grand_total, $base_currency_code , $currency_code);
    $base_subtotal=$quote->getBaseSubtotal();
    $subtotal=Mage::helper('directory')->currencyConvert($base_subtotal, $base_currency_code , $currency_code);
    $base_subtotal_with_discount=$quote->getBaseSubtotalWithDiscount();
    $subtotal_with_discount=Mage::helper('directory')->currencyConvert($base_subtotal_with_discount, $base_currency_code , $currency_code);

    $quote->setGrandTotal($grand_total)->setSubtotal($subtotal)->setSubtotalWithDiscount($subtotal_with_discount);
    $quote->save();

    $result_array["message"]="Product added to cart.";
    $result_array["status"]="1";
    echo json_encode($result_array);
}
?>


texts: what is cache.cfg file meant for? can we git ignore this file

texts: Why is the magento/downloader/cache.cfg file used for? can I ignore that file in the gitignore file


texts: Editing in UpgradeSchema.php method does not apply after running setup:upgrade

texts:
I have written a small module and I've made Setup classes include InstallData, InstallSchema, UpgradeData, and UpgradeSchema and put them in Setup folder, For the first time I did run setup:upgrade command everything was ok.

A table created and some data inserted. But then I tried to edit UpgradeSchema.php and UpgradeData.php to change table schema and data, but nothing happened.

I also changed module.xml and increase setup_version to 0.0.3 or 0.0.4, but it didn't work!

I commented the "if (version_compare($context->getVersion(), '0.0.2', '<'))" condition, but nothing changed after setup:upgrade again!

Please help me what to do.


texts:
I am using knockoutjs to send ajax call and successfully am able to do that but when I click on update button the text on button gets to hide.

    <button type="submit" data-bind="click: update" class="action">

    </button>

Can someone have any idea about this?


texts: How to change tire price when qty change event in Magento 2

texts:
I want to change tier price on change Qty.If i have change Qty automatically tier price change.
Please Help How to achieve this,
THANKS.


texts:
Got a basic question about handling Exceptions in Magento 2. I'm currently on Magento 2.2 with PHPUnit 6.2.4. I would like to write a test for a CouldNotSaveException.

Got the following code example

try {
    $this->customerDataResource->save($customerDataObject);
} catch (\Exception $e) {
    throw new CouldNotSaveException(new Phrase(
        'Unable to save customer with ID '. $customerData->getCustomerId()
    ));
}

Currently got the following usage from PHPUnit documentation

https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.exceptions.examples.ExceptionTest.php

/**
* Test save() method when exception is thrown
*/
public function testSaveException()
{
    $this->expectException(CouldNotSaveException::class);
}

I'm mocking my objects using the createMock() method. Don't really know how to write the rest of the code.

If someone could help me out that would be great.
Thanks in advance!


texts: Large Configurable Products (10,000 SKUs)

texts:
I am creating a jewellery store in Magento 2, and I am having doubts about the way to best create products.

A worst case scenario product; a ring can come in numerous metals, finger sizes, depths and widths. Just with these options alone I end up with nearly 10,000 simple products for a single configurable product. Each of these options effect the price, weight and image of the product. Excluding finger size, where it only changes the price and weight after a certain point, for example finger sizes between 3 and 8 (US) or F and P (UK) are one price and weight, and sizes between 9 and 13 (US) or Q and Z (UK) are another price and weight.
I plan on having about 4 configurable products around this size, and another 100 or so with slightly less options.

The main issue I run into is the page size and load time, which I can only assume is down to the large amount of javascript that is on the page, containing all the prices and image locations for each combination of options, to allow for the price to be updated. Currently using the blank theme with only a single image per product option I get page load times of between 4 and 6 seconds and a page size of around 800kb, but ideally I would have three images per product option, so I can only imagine these will get worse. This is also when the page has been cached, if I refresh the cache the page load time drops to over 30 seconds.

As a side note, I have also changed the way Magento fetches the product images when an option is changed, by default it performs an ajax call to get the data, but this was taking around 10 seconds to complete. So I rewrote the javascript to fetch the image urls from the large pool of javascript already on the page, just like the way it fetches the price, which allows for instantaneous image updating.

Another issue I am facing is when trying to make a change to the configurable product in the admin panel, my browser tends to crash which I can only assume is down to the 10,000 simple products that are trying to be loaded in to the configurations panel.

Does anyone have any suggestions on how else I can create these products, or any way to improve page size and load time with such large configurable products?

Thanks in advance,
Chris.