texts: require-js: shim doesn't seem to work properly, fails with "jQuery is not defined"

texts:
Im trying to integrate the popular stellar.js-module into my theme.

I go with the following. In my requirejs-config.js I have:

var config = {
    map: {
            '*': {
                'stellar': 'js/jquery.stellar.min'
            }
        },
        "shim": {
                "stellar": ["jquery"]
            }
};

and I utilize it by doing it this way:

require(['jquery', 'stellar'], function($) {

However, in my console I get this:

Uncaught ReferenceError: jQuery is not defined
    at jquery.stellar.min.js:2

Whats wrong here? The stellar plugin hasn't got modified from me.


texts: Error 503: Service Temporarily Unavailable

texts:
I am getting this error on the homepage and the admin page after trying to install an extension that failed.

I have attempted the fixes on the other questions, but I am still getting the error.

I have searched the entire site for a maintenance.flag file but it doesn't exist. I have also deleted the session data and cache manually within FTP.

I am still getting this error. Any ideas as to why?


texts: How to set Index, Follow tag for all pages by default

texts: I just installed MageWorx SEO extension for Magento 2.3.3 p1 and it set Noindex Nofollow for all pages by default. can you please tell me how to convert it to Follow & Index because I cannot do it manually as site has hundreds of categories and thousands of configurable products.


texts:
I have an existing module with code like this:

$attribute = $customerUpgrade->getEavConfig()->getAttribute(Customer::ENTITY, 'my_custom_attribute')
    ->addData([
        'attribute_set_id' => $attributeSetId,
        'attribute_group_id' => $attributeGroupId,
        'used_in_forms' => [],
    ]);

$attribute->save();

Because $attribute is an instance of AbstractModel, the save() function is deprecated. The recommendation from what I can tell is to use ResourceModel instead, but getAttribute() returns an AbstractModel type, and I can't find an easy way to use ResourceModel here.

What would be the correct (non-deprecated) way to add data to the custom attribute in this case?


texts: Magento2 + Custom option price not included in price sorting

texts:
By default magento include minimum price from custom option in product listing price sorting but in my case this functionality isn't working.

any one have idea which settings i need to update?

I'll try to explain...

Product 1: price 100 EUR
Product 2: price 90 EUR + 1 required custom option 20 EUR
Product 3: price 130 EUR

It should see like this:

Product 2: 100 EUR
Product 1: 90 EUR
Product 3: 130 EUR

but it's showing like this

Product 2: 90 EUR
Product 1: 100 EUR
Product 3: 130 EUR


texts: How to add a custom link to product page magento 2

texts:
I want to add custom link in More Information tab.
See attached screenshot:
I want to give a link instead of text


texts:
What I'm doing is

$quote->getShippingAddress()->addData($shipping->getData());

where

$shipping = $customer->getDefaultShippingAddress();`

However, I'm getting Please specify a shipping method. on quote save. I've also tried to do

    $quote->getShippingAddress()->setCollectShippingRates(true);

    $quote->setTotalsCollectedFlag(false)->collectTotals();

But it's not helping. Any idea what I'm missing? It's a custom module I'm trying to fix.


texts: Magento2 currency switcher using rest API for mobile app

texts:
I am creating a Magento website with currency switcher, It works fine in webview. I need the same for mobile app. If the user changed the currency once, all the prices should change to selected currency.

Is there any default API for this functionality?


texts: Custom phtml not getting called from the Block magento

texts:
On a button click, when my controller redirects to a new form, i want my custom phtml file to be called from the block.

But neither my Block or my phtml does seem to be called.

I guess I have missed some link somewhere

I have done as below:

config.xml

<config>
<modules>
    <Vendor_Recipe>
        <version>1.0.0</version>
    </Vendor_Recipe>
</modules>
<global>
    <blocks>
        <vendor_recipe>
            <class>Vendor_Recipe_Block</class>
        </vendor_recipe>
    </blocks>

    <models>
        <vendor_recipe>
            <class>Vendor_Recipe_Model</class>
            <resourceModel>vendor_recipe_resource</resourceModel>
        </vendor_recipe>

    </models>

</global>
<frontend>
    <routers>
        <vendor_recipe>
            <use>standard</use>
            <args>
                <module>Vendor_Recipe</module>
                <frontName>vendor_recipe</frontName>
            </args>
        </vendor_recipe>
    </routers>
    <layout>
        <updates>
            <vendor_recipe>
                <file>vendor_recipe.xml</file>
            </vendor_recipe>
        </updates>
    </layout>

</frontend>

I have a button here:

\app\design\frontend\base\default\template\vendor_recipe\recipe\customer\comment\list.phtml

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

  <form action="<?php echo $this->getUrl('vendor_recipe/manageRecipe/addRecipe') ?>" method="post" id="form-validate" autocomplete="off">

    <button type="submit" class="button" title="<?php echo $this->__('Add New Recipe') ?>">
        <?php echo $this->__('Add New Recipe') ?>
    </button>
</form>

Where in :

\app\code\local\Vendor\Recipe\controllers\ManageRecipeController.php

  <?php
 class Vendor_Recipe_ManageRecipeController extends  Mage_Core_Controller_Front_Action
 {
 public function addRecipeAction()
{
    //echo 'Add recipe';
    $this->loadLayout();
    $this->renderLayout();
}

}

Calling addrecipe.phtml from layout as:

\app\design\frontend\base\default\layout\vendor_recipe.xml

<vendor_recipe_recipe_customer_manage translate="label" module="vendor_recipe">
    My Recipes
    <update handle="customer_account"/>
    <reference name="my.account.wrapper">
        <block type="vendor_recipe/recipe_customer_managerecipe" name="customer_recipe_add" template="vendor_recipe/recipe/customer/managerecipe/addrecipe.phtml"/>
    </reference>
</vendor_recipe_recipe_customer_manage>

\app\code\local\Vendor\Recipe\Block\Recipe\Customer\ManageRecipe.php

class Vendor_Recipe_Block_Recipe_Customer_ManageRecipe extends Mage_Customer_Block_Account_Dashboard
{

  protected function _construct(){
      echo 'Block ';
  }

}

\app\design\frontend\base\default\template\vendor_recipe\recipe\customer\managerecipe\addrecipe.phtml

<?php
    echo 'ADD';die;
?>


texts:
Magento 2.0.10, I want to allow customers to order a product when its not in stock (i.e. when the available stock quantity is =< 0). I have set Allow quantities below 0 but the storefront doesn't show an add to cart button. If I set the product to 'in stock', the add to cart button is shown, but it also displays the product as In Stock. What I need is for the add to cart button to be shown, but the stock status to display as 'out of stock'. Any ideas how I do this?

Update - I have now found and edited the list.phtml & listing.phtml template files so that the in/out of stock status and the add to cart button is shown, but if the product is out of stock and I add it to the shopping cart, I get a validation error stating that the product is out of stock (and the item is not added to the cart). I must be missing a setting somewhere, otherwise backorders aren't possible in Mag 2, which I don't think is the case. Help.


texts: What are the best way to customize Magento 2 core

texts:
How I can customize Magento 2  core module?

Can I create new module or override core modules?


texts: What's the best way to add css to vendor module?

texts:
I download via composer a module and I need to add some CSS to it.
What's the best way to add that css? Adding to my theme, extending the module css and add more css there? I've seen some ways but what's the best one?
If it is extending how to I extend css it? Do I need to override the whole css file or I can add, for example, a custom.css to it in my app/code or app/design?
Thanks :D


texts: Product image not showing into after upload to server - magento-2 data migration

texts:
Recently I have migrated the magento-1 (ver: 1.9.1.1) data to magento-2 (Ver: ver: 2.1.7) fress version using data migration tool. And it working perfectly in our local computer (localhost).

I found an issue after upload it to server m2.hiddencamera.com.au that some product image (thumbnail and in details view) not showing instead it showing blank image (http://m2.hiddencamera.com.au/hidden-cameras?cat=84).

Then I have removed the cache, reindex, upgrade (setup:upgrade, indexer:reindex, cache:clean, cache:flush) using SSH. Even I have flushed Catalog Images Cache for pregenerated product images files from Dashboard -> System -> Cache Management. But no luck.

After inspecting the blank image that the image (url) are not serving from pub/media/catalog/product/cache/ instead it serving from pub/static/. But in localhost all product image source is pub/media/catalog/product/cache/.

Finally, I have contacted with the hosting support about the issue but, unfortunately they failed to fix the issue. They didn't found any error from error log. They also try to solve the issue using setup:upgrade, indexer:reindex, cache:clean, cache:flush etc but no luck.

I am requesting for help from the experts to resolve the issue.

Regards,


texts: How to target a specific Admin Config section with a layout update

texts:
It is relatively easy to target the adminhtml_system_config_edit node with layout updates in a layout.xml file by using:

<adminhtml_system_config_edit>
    <reference name="head">
        <action method="addJs"><file>jquery/jquery-1.9.1.min.js</file></action>
        <action method="addJs"><file>jquery/jquery-migrate-1.1.1.min.js</file></action>
    </reference>
</adminhtml_system_config_edit>

However, I would like to target a specific configuration section instead. Something along the lines of (I know this is totally incorrect and doesn't follow the module/controller/action naming, simply to clarify the intent):

<adminhtml_system_config_edit_my_section>
    <reference name="head">
        <action method="addJs"><file>jquery/jquery-1.9.1.min.js</file></action>
        <action method="addJs"><file>jquery/jquery-migrate-1.1.1.min.js</file></action>
    </reference>
</adminhtml_system_config_edit_my_section>

But alas, this does not work. How can I target my specific section with layout XML?


texts: Magento redirects to index.php/install/ (PHP 7)

texts:
I'm installing Magento for the first time, on a MAMP stack.

I've downloaded version 1.7 from the magento site (under RELEASE ARCHIVE).

I've unzipped it and pointed my Apache webserver root at the unzipped folder, but when I browse to http://localhost:8000 (for that is the port I am running it on), it redirects to http://localhost:8000/index.php/install/ which says "This page isn’t working" (HTTP ERROR 500).

In my PHP log it says :

  [15-May-2017 03:43:46 UTC] PHP Fatal error:  Uncaught Error: Function
  name must be a string in
  /installdir/magento1.7.0.2/app/code/core/Mage/Core/Model/Layout.php:555
  Stack trace:
  #0 /installdir/magento1.7.0.2/app/code/core/Mage/Core/Controller/Varien/Action.php(390):
  Mage_Core_Model_Layout->getOutput()
  #1 /installdir/magento1.7.0.2/app/code/core/Mage/Install/controllers/WizardController.php(120):
  Mage_Core_Controller_Varien_Action->renderLayout()
  #2 /installdir/magento1.7.0.2/app/code/core/Mage/Core/Controller/Varien/Action.php(419):
  Mage_Install_WizardController->beginAction()
  #3 /installdir/magento1.7.0.2/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250):
  Mage_Core_Controller_Varien_Action->dispatch('begin')
  #4 /installdir/magento1.7.0.2/app/code/core/Mage/Core/Controller/Varien/Front.php(176):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  #5 /Users/newnrg/Projec in /installdir/magento1.7.0.2/app/code/core/Mage/Core/Model/Layout.php
  on line 555

(Note: I have tried $ chmod 777 var app media var/* app/* media/* var/.htaccess which I read about somewhere, but it made no difference for me)

Why is magento redirecting to /index.php/install/ out of the box?

And what do I do to fix it?


texts: Observer or event not working in checkout

texts:
Hello I'm trying to use the event "checkout_submit_all_after" but it doesn't work.

I'm using the OneStep Checkout by Amasty in Magento 1.9.1

Here is my config.xml

<config>
<modules>
    <SegundoPlano_CustomerPrescription>
        <version>0.1.0</version>
    </SegundoPlano_CustomerPrescription>
</modules>
<frontend>
    <routers>
        <segundoplano_customerprescription>
            <use>standard</use>
            <args>
                <module>SegundoPlano_CustomerPrescription</module>
                <frontName>customerprescription</frontName>
            </args>
        </segundoplano_customerprescription>
    </routers>
    <layout>
        <updates>
            <module>
                <file>CustomerPrescription.xml</file>
            </module>
        </updates>
    </layout>
    <events>
        <checkout_type_onepage_save_order_after>
            <observers>
                <segundoplano_customerprescription>
                    <class>SegundoPlano_CustomerPrescription_Model_Observer</class>
                    <method>savePresciption</method>
                </segundoplano_customerprescription>
            </observers>
        </checkout_type_onepage_save_order_after>
    </events>
</frontend>

My etc/modules/SegundoPlano_CustomerPrescription.xml

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

And My Observer.php

<?php

class SegundoPlano_CustomerPrescription_Model_Observer{

    public function savePrescription($observer){
        $order = $observer->getEvent()->getOrder();
        $order->savePrescription();
    }
}

Thanks for your help!


texts: Magento 2: Getting error "Unable to find tier for customer "Customer name". Please check tier configuration." while shipping an order in the backend

texts: I am getting the error while shipment order in the backend. I am using Magento 2.3.1 version. I am not using the tier price in my products. Still, I am getting this error.


texts: System log giving Recoverable Error: Argument 1 passed to Mage_Catalog_Helper_Image

texts:
We get a strange error in our system.log that says the following:

2015-06-04T07:45:25+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Catalog_Helper_Image::init() must be an instance of Mage_Catalog_Model_Product, null given, called in /home/tablet/domains/fooss.nl/public_html/app/design/frontend/default/default/template/catalog/product/list.phtml on line 104 and defined  in /home/tablet/domains/fooss.nl/public_html/app/code/core/Mage/Catalog/Helper/Image.php on line 139

this is what showon on line 104 in list.phtml

                        <?php
                         $product = Mage::getModel('catalog/product')->load($_product->getId());
                         $helper = Mage::Helper('catalog/image');
                            $imgi = 0;
                            foreach ($product->getMediaGalleryImages() as $image) {
                                if($imgi < 5) {
                                    echo 'getId() . '" data-url="' . $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $image->getFile())->resize(157) . '" class="hoveroverimagethumb ' . $_product->getId() . '-' . $imgi . '" href="' . $_product->getProductUrl() . '" title="' . $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) .'">helper('catalog/image')->init($this->getProduct(), 'thumbnail', $image->getFile())->resize(157) . '"/>';
                                }
                                $imgi++;
                            }
                        ?>

Does someone know how to fix this?


texts:
I am getting this error

Database server does not support the InnoDB storage engine.

with MySQL 5.6 on my MAC OSX Maverick

mysql> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                          | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO


texts: Mage2: configurable product on one "store", but simple products on a different store?

texts:
So we are implementing Magento as a replacement to what we have now. The exciting part is that we can keep multiple different "stores" or front end interfaces with a single backend. So we have our Consumer customers and products and then we have similar products but we have our Wholesale customers.

It seems to me that each product can be set to display on certain stores, as well as categories and the like. In fact there are tons of settings to differentiate functionality between stores.

But in my example I have one product that has 3 scents and comes in 4 sizes, so I've created that as a configurable product, which of course is made up of Simple products, one for each combination of options. For our consumers we want to display this as just one item with options, it keeps it simple and allows them to find it and make a selection.

However, on our wholesale store, our customers like to just go down the page and click and buy each item that they want. So it seems based on this use, it would work best to display 12 products instead of 1 product with 12 product option combinations.

Is this possible? It seems to me that I can control what is being displayed on either store, but there is no control to define if an item is displayed in the catalog at the store level, it either is for all stores or it isn't.

If it is possible I'd love to have someone at least point me in the right direction. I can't seem to put together a qualified search to get the results I want.


texts: Changing/Modifying Magento 2 Rest Api call from url

texts:
I want to use magento2 rest api of products to get list of details of products based on some criteria. For example -

http://localhost:8080/magento/index.php/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]=2016-06-01 10:38:52&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&fields=items[id,sku,name,price,created_at,updated_at,custom_attributes]

Above url get list of products whose updated date is after or equal to 2016-06-01 10:38:52.
Here is the small part of sample output -

"items": [
    {
      "id": 54,
      "sku": "MH01-XS-Orange",
      "name": "Chaz Kangeroo Hoodie-XS-Orange",
      "price": 52,
      "created_at": "2016-06-01 10:38:52",
      "updated_at": "2016-06-01 10:38:52",
      "custom_attributes": [
        {
          "attribute_code": "description",
          "value": "
Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.
\n
&bull; Two-tone gray heather hoodie.
&bull; Drawstring-adjustable hood.
&bull; Machine wash/dry.
"
        },
        {
          "attribute_code": "image",
          "value": "/m/h/mh01-orange_main.jpg"
        },
        {
          "attribute_code": "small_image",
          "value": "/m/h/mh01-orange_main.jpg"
        },
        {
          "attribute_code": "thumbnail",
          "value": "/m/h/mh01-orange_main.jpg"
        },
        {
          "attribute_code": "color",
          "value": "56"
        },
        {
          "attribute_code": "options_container",
          "value": "container2"
        },
        {
          "attribute_code": "required_options",
          "value": "0"
        },
        {
          "attribute_code": "has_options",
          "value": "0"
        },
        {
          "attribute_code": "msrp_display_actual_price_type",
          "value": "0"
        },
        {
          "attribute_code": "url_key",
          "value": "chaz-kangeroo-hoodie-xs-orange"
        },
        {
          "attribute_code": "tax_class_id",
          "value": "2"
        },
        {
          "attribute_code": "size",
          "value": "167"
        }
      ]
    },

I want to filter the output by some attribute code. for example i want to get Products with particular color , products with particular materials.

How can i do this?


texts: Magento save Transaction ID and Customer Detail from Payment Gateway into Order Details

texts:
I had used the following code to add attributes to the Order table:

<?php

$installer = new Mage_Sales_Model_Mysql4_Setup;

$attribute1 = array(
    'type' => 'text',
    'backend_type' => 'text',
    'frontend_input' => 'text',
    'is_user_defined' => true,
    'label' => 'Transaction ID',
    'visible' => true,
    'required' => false,
    'user_defined' => false,
    'searchable' => false,
    'filterable' => false,
    'comparable' => false,
    'default' => ''
);
$installer->addAttribute('order', 'new_transaction_id', $attribute1);

$attribute2 = array(
    'type' => 'text',
    'backend_type' => 'text',
    'frontend_input' => 'text',
    'is_user_defined' => true,
    'label' => 'Customer ID',
    'visible' => true,
    'required' => false,
    'user_defined' => false,
    'searchable' => false,
    'filterable' => false,
    'comparable' => false,
    'default' => ''
);
$installer->addAttribute('order', 'customer_id', $attribute2);

$attribute3 = array(
    'type' => 'text',
    'backend_type' => 'text',
    'frontend_input' => 'text',
    'is_user_defined' => true,
    'label' => 'MTID',
    'visible' => true,
    'required' => false,
    'user_defined' => false,
    'searchable' => false,
    'filterable' => false,
    'comparable' => false,
    'default' => ''
);
$installer->addAttribute('order', 'mt_id', $attribute3);

$attribute4 = array(
    'type' => 'text',
    'backend_type' => 'text',
    'frontend_input' => 'text',
    'is_user_defined' => true,
    'label' => 'MITEM',
    'visible' => true,
    'required' => false,
    'user_defined' => false,
    'searchable' => false,
    'filterable' => false,
    'comparable' => false,
    'default' => ''
);
$installer->addAttribute('order', 'mitem', $attribute4);

$installer->endSetup();
?>

And to save the details I have used the below code, but nothing gets saved and I do not even get any error, I am unable to find the issue.

$order->setNewTransactionId($trx_id);
$order->setVleId($cust_id);
$order->setMtrxId($mtid);
$order->setMitem($mitem);
$order->save();

Could anyone please suggest what I have implemented wrong.


texts: csv header naming convention to import products with multiple categories and images in magento

texts:
I am trying to import products through system->import/export option. I have created a custom attributes also.

While creating the csv file some attributes are having underscore prefix. For example type is as _type, _product_websites etc. Some of them are not having the prefix.

If I change _type as type it is not working.

How can I decide the attribute should have underscore prefix or not?


texts: Magento 2: Apply coupon code programmatically

texts:
I want to apply coupon code programmatically when the condition is true. If condition false coupon code should be not applied.

Please help me.


texts:
I want to call a function in a Helper file, from js file using ajax.

In my config.xml

<global>
    <helpers>
        <customname>
            <class>...

In js file:

jQuery.ajax({

url: "Mage::helper('customname')->getPricesAjaxCall()"
type: "POST",
data: {key: 'value'},
success: function(productId){
    console.log('check 11');
}
});

But I don't know what i should put in the url to correctly call it. Any idea?


texts:
I want to import product or create them via the BO.

Before, it's was OK, but, I don't know why, suddently, it's impossible to me to create product.

Each time, I got this error :

  SQLSTATE[42S02]: Base table or view not found: 1146 Table
  'xxx.catalog_product_entity_Magento\' doesn't exist, query was: INSERT
  INTO catalog_product_entity_Magento\
  (row_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?,
  ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?) ON DUPLICATE KEY UPDATE value =
  VALUES(value)

But this table catalog_product_entity_Magento\ not exist and have no reason to exist. No occurence in my code use this table. I don't understand what's happening.

Any idea about what's happend and how fix it ?


texts:
Scenario:
One user places an order with multiple products using an online payment method (which one, not important).
This payment method has the action set to authorize_capture (which ideally should not change).
Requirement:
For the placed order, multiple invoices need to be created based on some custom product grouping rules.
The problem
For an payment method that has the action authorize_capture magento automatically creates one and only one invoice.
Backtrace

Magento\Sales\Model\Service\OrderService::place()
Magento\Sales\Model\Order::place()
Magento\Sales\Model\Order::_placePayment()
Magento\Sales\Model\Order\Payment::place()
Magento\Sales\Model\Order\Payment::processAction('authorize_capture',
$order);  Magento\Sales\Model\Order\Payment::capture(null); //there is
acomment on this method saying " Requires an invoice. If there is no
invoice specified, will automatically prepare an invoice for order"
Magento\Sales\Model\Order\Payment\Processor::capture($payment, null);
Magento\Sales\Model\Order\Payment\Operations\CaptureOperation::capture($payment,
null);

Here is where the magic happens:
    if (null === $invoice) {
        $invoice = $this->invoice($payment);
        $payment->setCreatedInvoice($invoice);
        if ($payment->getIsFraudDetected()) {
            $payment->getOrder()->setStatus(Order::STATUS_FRAUD);
        }
        return $payment;
    }

the call to $this->invoice($payment) generates the invoice and it returns it.
I could hook into this system and generate multiple invoices, but it feels like I might be breaking something since this the result of the created invoice is attached again to the payment instance, so "there can be only one".
Question.
Is there a way to generate multiple invoices for an order for a specific payment method without changing the payment action and without breaking the flow that expects a single invoice?
Note: I don't need the code to generate multiple invoices (I have that). Just don't know where / how to call it in a safe way.


texts: Any other methods instead of magento cron job

texts: Now I am using Magento Cron job for a different purposes, but it's not working properly. Could you tell me any other method?


texts: Magento2: How can I implement varnish cache for magento?

texts:
I want to install varnish cache for my Magento site on Centos 6 Apache2.

Please share me link and its advantages.


texts:
I have this error when I add special characters to menu or categories like "&"
It's from module Ves Megamenu.

  Warning:
  Invalid argument supplied for foreach() in /var/www/html/app/code/Ves/Megamenu/Model/Config/Source/StoreCategories.php on line 284

Warning Line:

$categoriesTrees = $this->getCategoriesTree();
foreach ($categoriesTrees as $category) {
    $this->generatCategory($category);
}


texts: How can Tax Labels be Enabled for Prices Magento 2

texts:
I want to add a label for VAT on product prices on a store. I was going to do it simply with css rule like below:

.price-final_price.tax .price::after {content: "ex. vat"; font-size: small;}

However i can see the below code within 'vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml' that seems to be ready for  labels:

    <?php echo($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>

However i cannot find how to set the labels so they show on the frontend?


texts: Create Permanent Redirect for old URL does not seem to work

texts:
Magento 1.9.1
Porto theme

I have the "Create Permanent Redirect for old URL" checked but Google found 922 Site not found Crawl Errors (they come up with "404
You might want to check that URL again or head over to our homepage." message on the site when you go to that URL).

We did change the category structure recently and I re-indexed after that.

When I go to CATALOG - URL REWRITE Management - it shows 322505 records. (I edited this a few days later and it now has a Total 330684 records found an increase of 8000+ records in 2 days - why is that? What does this mean? And what do I need to do with it?)

What does this mean and how can it be fixed?


texts: Magento2: Flat rate and table rate shipping not showing at backend

texts:
I'm using magento version 2.1.4 for my one of the eCommerce website. I've enabled flat rate and table rate from backend. It works perfectly when placing order from frontend. However, when I try to create order from backend, it doesn't show those methods and instead showing message "Sorry, no quotes are available for this order."

Does anyone knows the fix for this?

Thanks in advance!


texts:
HI am getting this error while more columns to sales_order and quote table
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
even though i have text fields still am getting the issue below is my code
class InstallSchema implements InstallSchemaInterface
{
    public function install(
        SchemaSetupInterface $setup,
        ModuleContextInterface $context
    ){
        $setup->startSetup();

        $quote = $setup->getTable('quote');
        $salesOrder = $setup->getTable('sales_order');

        $setup->getConnection()->addColumn(
            $quote,
            'shippingaccntno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Shipping Carrear Account No'
            ]
        );

        $setup->getConnection()->addColumn(
            $quote,
            'dropdown',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Drop Down'
            ]
        );

        $setup->getConnection()->addColumn(
            $quote,
            'deliverytelephoneno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Delivery Tele Phone Number'
            ]
        );

        $setup->getConnection()->addColumn(
            $salesOrder,
            'shippingaccntno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Shipping Carrear Account No'
            ]
        );

        $setup->getConnection()->addColumn(
            $salesOrder,
            'dropdown',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Drop Down'
            ]
        );

        $setup->getConnection()->addColumn(
            $salesOrder,
            'deliverytelephoneno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Delivery Tele Phone Number'
            ]
        );

        $setup->endSetup();
    }
}

am not very much familiar with linux and starting to get used to this so please explain me about this issue


texts: mage/translation not working magento 2 (translation issue)

texts:
I am working on pdp page (mobile view), in drop down i need to show out of stock if qty is out of stock and low stock if qty is low stock, it is working as expected but it is not getting translated to other language (translation issue). My file is SwatchRenderer.js (D:app\design\frontend\Alshaya\mcmenablank\Magento_Swatches\web\js\SwatchRenderer.js)

define(['jquery', 'underscore', 'jquery/ui', 'mage/translate'], function ($, _) {
    'use strict';
     //code here
     .......
     .......
                if (stockStatus === undefined) {
                    label += ' - ' + $.mage.__('Out of stock');
                }
                if (stockStatus) {
                    /* Display Low stock message */
                    if (stockStatus['qty'] <= stockStatus['notifyQty']) {
                        label += ' - ' + $.mage.__('low stock');
                    }
                }
        ............................
        ...............................


texts:
Invalid base url type

Trace:
#0 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Store.php(620): Mage::exception('Mage_Core', 'Invalid base ur...')
#1 C:\xampp\htdocs\magento\app\Mage.php(382): Mage_Core_Model_Store->getBaseUrl('validation', NULL)
#2 C:\xampp\htdocs\magento\app\code\core\Mage\Page\Block\Html\Head.php(250): Mage::getBaseUrl('validation')
#3 C:\xampp\htdocs\magento\app\code\core\Mage\Page\Block\Html\Head.php(206): Mage_Page_Block_Html_Head->_prepareStaticAndSkinElements('<link rel="styl...', Array, Array, NULL)
#4 C:\xampp\htdocs\magento\app\design\frontend\templatemela\MAG110227_1\template\page\html\head.phtml(63): Mage_Page_Block_Html_Head->getCssJsHtml()
#5 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Template.php(241): include('C:\\xampp\\htdocs...')
#6 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\templa...')
#7 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#8 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Abstract.php(923): Mage_Core_Block_Template->_toHtml()
#9 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Abstract.php(641): Mage_Core_Block_Abstract->toHtml()
#10 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('head', true)
#11 C:\xampp\htdocs\magento\app\design\frontend\templatemela\MAG110227_1\template\page\1column.phtml(40): Mage_Core_Block_Abstract->getChildHtml('head')
#12 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Template.php(241): include('C:\\xampp\\htdocs...')
#13 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\templa...')
#14 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#15 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Block\Abstract.php(923): Mage_Core_Block_Template->_toHtml()
#16 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Layout.php(556): Mage_Core_Block_Abstract->toHtml()
#17 C:\xampp\htdocs\magento\app\code\local\Mage\Core\Controller\Varien\Action.php(389): Mage_Core_Model_Layout->getOutput()
#18 C:\xampp\htdocs\magento\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#19 C:\xampp\htdocs\magento\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#20 C:\xampp\htdocs\magento\app\code\core\Mage\Cms\controllers\IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#21 C:\xampp\htdocs\magento\app\code\local\Mage\Core\Controller\Varien\Action.php(417): Mage_Cms_IndexController->indexAction()
#22 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#23 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#24 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#25 C:\xampp\htdocs\magento\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#26 C:\xampp\htdocs\magento\index.php(82): Mage::run('', 'store')
#27 {main}


texts:
How style-m.css and style-l.css files are generated in Magento2?

In theory style-m.css should have less code and to have styles only for mobile devices than style-l.css in order to load on mobile devices faster.

How you define in less file if part of code should be part of style-m.css or style-l.css?

The following links and source code didn't help me to understand it.

Resources:

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css-preprocess.html
Magento2: Best practice to modify css files
http://inchoo.net/magento-2/css-preprocessing-in-magento-2/


texts:
How to add product using REST api.

Getting below error -

Invalid auth/bad request (got a 500, expected HTTP/1.1 20X or a redirect)
Service temporary unavailable

I tried,

 $oauthClient->fetch($resourceUrl, array(), 'GET', array('Content-Type' => 'application/json', 'Accept' => 'application/json'));

For above error Solution

In admin,

 System -> Permissions -> Users -> Rest Role -> Select Admin.


texts:
Help for deploying Magento2 on AWS

-

Implanted the following project

http://648050603631-test-webapp011.us-east-2.elasticbeanstalk.com/

By accessing

http://648050603631-test-webapp011.us-east-2.elasticbeanstalk.com/magento/

The home page should be displayed but the installation page is loaded even though the files

app/etc/config.php
app/etc/env.php

According to the documentation at https://devdocs.magento.com/guides/v2.3/config-guide/config/config-php.html

-

Another thing I noticed is that when executing the command ./bin/magento as images in the local environment the "cache" option is displayed but in AWS or any server this command possibility is not displayed

https://imgur.com/IoZznX7
https://imgur.com/hcxYlpW

-

If necessary, you can confirm the presence of the files by accessing the

http://648050603631-test-webapp011.us-east-2.elasticbeanstalk.com/backdoor/commando/

and running

cat /var/app/current/magento/app/etc/config.php
cat /var/app/current/magento/app/etc/env.php

-


texts: get compared products and count in header

texts:
I have a need to show products and count in header.phtml file [Magento_Theme/templates/html/header.phtml] file.

How to access those products count and data staying in header.phtml file.

What i tried :

$this->helper('Magento\Catalog\Helper\Product\Compare')->getCompareProducts();


texts: Minicart doesn't show any products on homepage

texts:
Somehow, the cart is empty in homepage even when I add the products. Cart display all the content on all the other pages.

I have the theme to default luma theme (we have extended the luma theme) then the minicart shows the added items. Why the cart isn't showing the products while apply the extended theme?

Could anyone please help me with this?


texts: how can I make website field required in product form magento 2?

texts: I would like to prevent users from saving a product without first assigning a website to them. I was thinking I need to customize the product_form.xml ui component however I can't find any reference to the website field.


texts: Best practice for fixing multiple URL's for same product issue in Magento1?

texts:
This Magento1 website has 5 different URL's for each product that are indexing in Google. Examples below:

www.url.com/category1/product-name.html
www.url.com/brands/product-name.html
www.url.com/product-name.html

etc..

Thought process for best way to resolve is truncate the core_url_rewrite table

Then re-index URL's and allow the table to rebuild from scratch?

How then to ensure that the category's, search pages and brand pages all link to the same product URL?

The chosen ideal structure that the canonical will be on is below:

www.url.com/product-name.html

The site has 1 store, and circa 2000 products, and around 300 categories, and 40 brands.

Really looking to create best practice, and order of events to work through to resolve issue. With the last ones being re-generate sitemap, submit new sitemap to Google Webmaster tools.


texts:
I just enabled the smtp pro module and Go to configuration->SMTP pro option
and click the Run Self Test in logging and Debugging i got following error.

can you please help..


texts:
I have been trying figure out past 3 days but in vain, iam looking to send a reminder email to customers to reorder their previous purchase. Magento reorder function works with logged in customers with www.yourdomain.com/sales/order/reorder/{order_id} which adds the items from their previous orders to their shopping cart. But if the customer is not signed in it redirects to a guest form. i want to load items from a previous order to their shopping cart even if they are not logged in. so when customer clicks a link, he is then redirected to the checkout/cart page with all items from their previous order. i tried using the following code

<?php
include_once 'app/Mage.php';
Mage::app();
$orderId= '2986';
$quote = Mage::getModel('sales/order')->load($orderId);
$cart->init();
$cart = Mage::getModel('sales/quote')->load($quote);
$cart->save();
Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
$this->_redirect('checkout/cart');
?>


texts:
I am  new in magento extension development.

I have some confusion in  how to  use jQuery on all pages.


texts:
I want a custom category list template for just 1 category.

In the layout update I've added:

<reference name="category.products">
    <action method="setTemplate">
        <template>catalog/category/custom_view_list.phtml</template>
    </action>
</reference>

This replaces the category/view template but I actually want to replace the catalog/product/list template


texts: How to add the store view to my module admin grid

texts:
I ve been looking around for a good solution to display the store view in a column of my admin grid.

I have the following in my grid

class NsTest_Test_Block_Adminhtml_Testimonial_Grid extends Mage_Adminhtml_Block_Widget_Grid {
...

  protected function _prepareCollection()
  {
      $collection = Mage::getModel('test/testimonial')->getCollection();

    $this->setCollection($collection);
    return parent::_prepareCollection();
}

...

I read it is possible to add the store view with this code from some block on internet

$collection = Mage::getModel('tc_storeview/stores')->getResourceCollection();

foreach ($collection as $view) {
    if ( $view->getStoreId() && $view->getStoreId() != 0 ) {
        $view->setStoreId(explode(',',$view->getStoreId()));
    } else {
        $view->setStoreId(array('0'));
    }
}

But how to use this? I think the code would show the store view, but how about my data.
Is there a way to join both, store and my model ?

Seems like below code is working, still dont really understand how that can work.

class NsTest_Test_Block_Adminhtml_Testimonial_Grid extends Mage_Adminhtml_Block_Widget_Grid {
...

  protected function _prepareCollection()
  {
      $collection = Mage::getModel('test/testimonial')->getCollection();

foreach ($collection as $view) {
    if ( $view->getStoreId() && $view->getStoreId() != 0 ) {
        $view->setStoreId(explode(',',$view->getStoreId()));
    } else {
        $view->setStoreId(array('0'));
    }
}

    $this->setCollection($collection);
    return parent::_prepareCollection();
}


texts: remove an image that appear on all pages

texts: This image appears on every page created except for the checkout page and the home page. I want to remove it or at least hide it. The image is not clickable.


texts:
This is my class for add some custom totals to invoice:

class Devpassion_Rowtotal_Model_Order_Invoice_Total_Totalpopust extends Mage_Sales_Model_Order_Invoice_Total_Abstract{

public function collect(Mage_Sales_Model_Order_Invoice $invoice)
{

    $order = $invoice->getOrder();
    $items  = $invoice->getAllItems();

    foreach ($items as $item){
            $subtotaldisc = $item->getRowTotal() + $item->getTaxAmount() + $item->getHiddenTaxAmount() - $item->getDiscountAmount();
        }

    $invoice->setTotalpopustAmount($subtotaldisc);

    return $this;
}

   public function fetch(Mage_Sales_Model_Quote_Address $invoice)
{
    if ($invoice->getTotalpopust() > 0)
    {
        $invoice->addTotal(array(
            'code'  => $this->getCode(),
            'title' => Mage::helper('rowtotal')->__('Test tekst'),
            'value' => $invoice->getTotalpopust()
        ));
    }
    return $this;
}

}

And this is my inittotals() function:

class Devpassion_Rowtotal_Block_Sales_Total_Totalpopust
extends Mage_Core_Block_Abstract{
public function initTotals()
{
    $parent = $this->getParentBlock();

    $value = $parent->getSource()->getTotalpopust();

 //   if ($value > 0)
 //   {
        $total = new Varien_Object(array(
        'code'  => 'totalpopust',
        'value' => $parent->getSource()->getResult(),
        'base_value' => $parent->getSource()->getResult(),
        'label' => $this->__('Cijena sa popustom'),
        'field' => 'totalpopust'
        ));
        $parent->addTotal($total, 'totalpopust');
 //   }
    return $this;
}

}

Please can someone advice what is wrong in definition of this classes, because nothing shows up on Invoice, neither on print pdf (I have defined in config.xml to show in pdf), neither on adminhtml (I have defined layout for adminhtml).


texts: Magento - Many unique 404 requests crashes php-fpm / server

texts:
One of my Magento servers crashed the other day and I had to restart php-fpm before it would recover. Looking into the problem, I noticed a lot of HTTP requests (around 40) for random file names (tar, zip, gzip, dmp etc) which resulted in the standard 404 page getting returned.

I assume this was a script kiddie looking for source code, or database dumps that a developer may have created. No file was found, but the number of unique 404 requests did crash php-fpm.

What is the best preventative action I could take to stop this type of attach taking out the server again?

The fact that each of the URLs was unique means that none of the page were cached and Magento code had to run which is quite slow. At the moment, the 404 page returns the content of the home page.

Is there a better 404 page that I could use that would not create as much of a load on the server?


texts: Get current customer id in "Customer Information section" backend?

texts: How to get current customer id in "Customer Information section" backend ?


texts:
I know this question has been asked before:

Add video to product programatically
Magento 2.2.5 : Add video to product programmatically
Importing product videos
maybe others

but I need something different.
The answers in the questions linked above suggest using some core methods that (all of them) load the full product and save the full product, either via repository or via the load/save deprecated methods.
I have a lot of products. Somewhere between 5k and 10k.
Going through all of them with load/save it is not really a viable option.

Any other suggestions?


texts: Adding a bundled product to a cart using SOAP V2

texts:
We're running a magento enterprise v1.13 store and are currently creating a mobile app for it using SOAP v2.

When trying to add a bundled product to a cart using shoppingCartProductAdd using this request:

  <urn:shoppingCartProductAddRequestParam>
     <sessionId>986d4ea8336a286448c443da7e8547a6</sessionId>
     <quoteId>100</quoteId>
     <productsData>
        <!--Zero or more repetitions:-->
        <complexObjectArray>
           <!--Optional:-->
           <product_id>6426</product_id>
           <!--Optional:-->
           <sku></sku>
           <!--Optional:-->
           <qty>1</qty>
           <!--Optional:-->
           <options>
              <!--Zero or more repetitions:-->

           </options>
           <!--Optional:-->
           <bundle_option>
              <!--Zero or more repetitions:-->

           </bundle_option>
           <!--Optional:-->
           <bundle_option_qty>
              <!--Zero or more repetitions:-->

           </bundle_option_qty>
           <!--Optional:-->
           <links>

           </links>
        </complexObjectArray>
     </productsData>
     <!--Optional:-->
     <store>2</store>
  </urn:shoppingCartProductAddRequestParam>

we get the error:

  <SOAP-ENV:Fault>
     <faultcode>1022</faultcode>
     <faultstring>Please select options for product.</faultstring>
  </SOAP-ENV:Fault>

Any idea where to get those options from? catalogProductInfo returns has_option as true but I can't find those options anywhere!


texts:
I am trying to index my online store pages when I generate the sitemap for my online store the only pages that are indexed are cart, checkout, login, create account pages. I have already enabled the sitemap options from system configuration and made necessary changes that are required in order to generate the sitemap.

P.S. I want it to be automatically generated and what I have noticed is the links that are listed in the sitemap are of 1 column layout. Does that have anything to do with column layout as catalog.xml has seo sitemap set for one-column layout?

Update to my question: With some conclusion I have drawn from the LINKS DEPTH on the xml generated sitemap is that the pages indexed are of link depth one (and so I think that does not have anything to do with the column layout)and it is not generating sitemap for pages that have link depth more than one would like to add I am using a custom mega menu) instead of the default menu that and when I disable the mega menu the sitemap generates the way it is expected to.


texts: Magento2: send a password reset url with customer's email

texts:
I would like to send customer a link to have their password reseted.

=> Code :

$customerFactory = $objectManager->get('\Magento\Customer\Model\CustomerFactory');
    $customer=$customerFactory->create();
    $customer->setWebsiteId(1);

$customer->loadByEmail($email);// load customer by email address

    $data= $customer->getData();
    print_r ($data);

However I cannot see any info here like a url that I can generate to then send to the customer.

Is there anyway to do this?


texts: Access denied, unable to find the controller

texts: I'm getting access denied when I want to change the order status in adminpanel. The url of the page is .../index.php/admin/advancedorderstatus_grid/mass/action/change_orde_status. I tried to find the controller and add the isAllowed function, but can not find it. Is there any simple way to locate its controller?


texts: Magento installation: Getting Fatal error

texts:
I am facing a issue while trying to install magento.
I am getting the following errors. Plz can any one help me...!

OS: Ubuntu 16.0.4
apache: 2.4.18
php: 7.0.8
mariaDB: 10.1.16

Fatal error: Uncaught Magento\Framework\Exception\FileSystemException: The file "/opt/lampp/htdocs/magento/var/.regenerate" cannot be deleted Warning!unlink(/opt/lampp/htdocs/magento/var/.regenerate): Permission denied in /opt/lampp/htdocs/magento/vendor/magento/framework/Filesystem/Driver/File.php:382 Stack trace: #0 /opt/lampp/htdocs/magento/vendor/magento/framework/Filesystem/Directory/Write.php(173): Magento\Framework\Filesystem\Driver\File->deleteFile('/opt/lampp/htdo...')
#1 /opt/lampp/htdocs/magento/vendor/magento/framework/Code/GeneratedFiles.php(98): Magento\Framework\Filesystem\Directory\Write->delete('/var/.regenerat...')
#2 /opt/lampp/htdocs/magento/vendor/magento/framework/App/ObjectManagerFactory.php(114): Magento\Framework\Code\GeneratedFiles->cleanGeneratedFiles() #3 /opt/lampp/htdocs/magento/vendor/magento/framework/App/Bootstrap.php(385): Magento\Framework\App\ObjectManagerFactory->create(Array) #4 /opt/lampp/htdocs/magento/vendor/magento/framework/App/Bootstrap.php(362): Magento\Framework\App\Bootstrap- in /opt/lampp/htdocs/magento/vendor/magento/framework/Filesystem/Driver/File.php on line 382


texts: Magento not sending any email's (eg,order,invoice,send email )

texts:
I am using magento 1.9.0.1 and using SMTP Pro Magento SMTP Email free extension i have configured it in right way before days ago my email was working good.but now after creating new oreder , invoice and after opening a order detail page and click on send email tab its giving message The message has been sent. and also after order opening its showing message the invoice email was sent can any body will tell me why this happening.

I have tried the bellow thing at my end.

1)I have checked all back end settings.

2)disabled extensions.


texts: Magento 2 : What is The _flag Table in Database

texts:
I have a problem with Catalog Price Rules not being applied in my store.  Some work and some don't.  I have searched for solution, and I finally found one that I have never heard of before.

Magento tells me to apply modified catalog price rules but there are no rules at all

I have searched but could not find any description of the flag table and what it does, or does not do.  If deleting an entry in this table fixes the price rules, then Magento is doing a terrible job of explaining things, such as this table.

Can someone explain the flag table, or point me to a reference that explains the table and codes found in it?


texts: Merge different language csv to determine which phrases missing a translation

texts:
Currently we have our shop only in English language and want to add an Italian one. So we have collected all phrases with bin/magento i18n:collect-phrases --magento --output="en_EN.csv".
We installed this package to get Italian translations. Obviously the package doesn't cover all our phrases. Is there already a way or package to merge the Italian translations into the English ones? Our goal is to have one file with all phrases and the Italian translation behind it if present. If there is no Italian translation it should be only displayed the Phrase.

I already tried bin/magento i18n:pack --mode=merge -d it_IT.csv en_EN but i think i don't get right what the command does. I think it only writes the translations from the  (it_IT.csv) into all translation files of en_EN in all packages.


texts: Minify inline javascript in magento 2.1 EE

texts:
I found a solution to minify javascript using the following link

https://gist.github.com/lewisp6/b7c50b4d82ef4d3d5d6dc888e8d1bdba

At what path should I place this script?


texts: how to create custom product options that there price is dependent on another?

texts:
Is there a way to create custom product options in a way that the one's price is dependent on another (without using the configurable product) ? and i'm using only custom options.

Like for example we have product that have a custom option Print Type a radio input having some options [A-Type, B-Type, C-Type] and one more option Sizes [XXX,XX,X,L,X,S].

And my question:
If we change Print Type, the price of sizes should reflect according to the selected Print Type. Should i have to use a observer to bind option prices to each other ??


texts: How to get next and previous product on detail page and change product in Magento 2?

texts:
How to navigate NEXT and  PREVIOUS products in product detail page.
I tried with below code, it's showing the NEXT and  PREVIOUS product's link but it's not changing the product.

Please do the needful.

I refered this code from arun

function getNextProductUrl($category, $currentProduct) {

    $productPositions = $category->getProductsPosition();
    asort($productPositions);
    $sortedCatProductIds = array_keys($productPositions);

    $currentProductCategoryIndex = @array_search($currentProduct->getId(), $sortedCatProductIds);

    $nextProductIds = array_slice($sortedCatProductIds, $currentProductCategoryIndex + 1, count($sortedCatProductIds)); //+1 for next product, -1 for previous product

    foreach ($nextProductIds as $productId) {
        $product = Mage::getModel('catalog/product')->load($productId);

        if ($product && $product->getId() && $product->isVisibleInCatalog() && $product->isVisibleInSiteVisibility()) {
            return $product->getProductUrl();
        }
    }

    return false;
}

This is how I am calling the url.

<a href="<?php $this->helper('Company1\Module1\Helper\Data')->getPreviousProduct() ?>">Previouse

<a href="<?php $this->helper('Company1\Module1\Helper\Data')->getNextProduct() ?>">Next


texts:
I'm trying to find the best setup for one really slow site.
For education purpose.

I set with AWS CloudFront like full page cache, not only static files.
Also Varnish and Redis, and performance are good now.

But I'm trying again to install one by and measure one by one and calculate what part giving more.

And I concluded that Redis does not improving at all. I tried with different pages, and nothing better. I also modified AWS Redis instance type to much stronger, and the same like the smallest one.
I checked and keys are stored in database 0 and 1.

Also metrics show that hits are OK

But when I try to test with jmeter, and hit 10 different links with 5 users, MySQL CPU load are go up to 100%.
I understand that main purpose of Redis is to serve cached query results to webserver, instead for every request to contact database server.

This is htop from mysql

Magento is 1.9.3.8
app/etc/modules/Cm_RedisSession.xml is set to true
And this is local.xml file regarding redis:

     <cache>
      <backend>Mage_Cache_Backend_Redis</backend>
      <backend_options>
        <server>xxxx.tapkyx.0001.euc1.cache.amazonaws.com</server>
        <port>6379</port>
        <persistent>cache-db0</persistent>
        <database>0</database>
        <password></password>
        <force_standalone>0</force_standalone>
        <connect_retries>1</connect_retries>
        <read_timeout>10</read_timeout>
        <automatic_cleaning_factor>0</automatic_cleaning_factor>
        <compress_data>1</compress_data>
        <compress_tags>1</compress_tags>
        <compress_threshold>20480</compress_threshold>
        <compression_lib>gzip</compression_lib>
      </backend_options>
    </cache>

 <session_save>db</session_save>
    <redis_session>
        <host>xxxx.tapkyx.0001.euc1.cache.amazonaws.com</host>
        <port>6379</port>
        <password></password>
        <timeout>2.5</timeout>
        <persistent>cache-db1</persistent>
        <db>1</db>
        <compression_threshold>2048</compression_threshold>
        <compression_lib>gzip</compression_lib>
        <log_level>4</log_level>
        <max_concurrency>6</max_concurrency>
        <break_after_frontend>5</break_after_frontend>
        <break_after_adminhtml>30</break_after_adminhtml>
        <bot_lifetime>7200</bot_lifetime>
    </redis_session>

So questions are, what kind of improvements I can expect with using redis? And why is MySQL CPU overloaded even I call with Jmeter the same 10 pages?
Or what I forgot to do :).


texts:
I have tried to regenerate urls for categories and products after migration from Magento 1.9.x to Magento 2.2.x through following modules:

Url Regenerator 1
Url Regenerator 2

These 2 generates the urls for categories and products but in frontend, I am getting 404 error when click on products from Homepage, search result page, any widgets etc. Product urls works fine when going from category pages but not for all categories. From some of the categories its shows 404.

Good thing is that all category urls are working perfectly. But not the product urls.

I have multiple stores. Anyone have the same issues?


texts: what is /media/catalog/product/N/o/NoImages100_184x.jpg and why is it growing?

texts:
We were running out of space on our server so we did a search for large files we could delete and found one in htdocs/media/catalog/product/N/o/ called "NoImages100_184x.jpg" which was 112MB. It was also present in our test environments in sizes varying from 60-240MB. My web guy and I had no idea what this was, so we downloaded the file to both a Mac and PC and tried to open it. No luck. Said that file was corrupt or the wrong file type. So, we deleted the file. And it reappeared with 600 permissions and owned by the webserver user. Instantly. Small, just a couple of k. Then it started growing. 5k, 6k, 7k, 8k, 9k, etc. I did a tail -f on the file and there was a line getting written to it just about every second. Most of the lines looked like this:

"YToxOntzOjI6ImlkIjtzOjg6Ilc5SE03SDhCIjt9LS1hOjA6e30="

with 10 characters to the right of center changing each time it was written, but the rest of the line remaining the same. The file has no header, just starts right in with those cryptic lines, just like a log file.

I ran ClamAV and found no viruses or anything. I grepped my Magento installation looking for a file that referenced the jpg filename, but found nothing.

Finally I just changed permissions on the file to 400, and it stopped growing.

I did tail -f on the file in one of our test environments and it was static. Of course, the test environment doesn't have traffic and cron is not running. Even so, I tried loading some webpages, and running cron.php from the browser, and the file remained static.

Web searches for the filename, the directory name, related keywords, stuff like "growing JPG file yielded no results. We searches for some of the strings inside the file likewise were fruitless.

Can anybody shed some light on this. I'm more than a little freaked out.


texts: Show all error messages in one place in one page checkout

texts:
I want to show validation messages in one place.

for example.

<div class="checkout-error-message">
* Please fill address field
* Please fill email field
* Please check agreement and term
</div>

But, I couldn't find out how to do this.
What should I do for it?
Thanks.


texts: Magento2 checkout break after migration. The attribute 'ifconfig' is not allowed.

texts:
After migrating Magento. I have error only in checkout and checkout\cart Element 'referenceBlock', attribute 'ifconfig': The attribute 'ifconfig' is not allowed.  exception
in    /magento-root/vendor/magento/framework/Config/Dom.php(116).


texts: how to make Ui admin form field disable dynamically

texts:
I have ui componenet form i want to disable one field dynamically when add only.
 <field formElement="select" name="classification" sortOrder="40">
        <settings>
            <dataType>text</dataType>
            <label translate="true">Classification</label>
            <disabled>true</disabled>
            <dataScope>classification</dataScope>
            <validation>
                <rule name="required-entry" xsi:type="boolean">true</rule>
            </validation>
        </settings>
        <formElements>
            <select>
                <settings>
                    <options class="Vendor\Module\Model\Object\Source\DivisionAgeFrontEndClass"/>
                </settings>
            </select>
        </formElements>
    </field>

<disabled>true</disabled> this line disable for all action.
i have refer this link but not getting idea how to use this
Here is Dataprovider.php code
public function getData()
    {
        if (isset($this->loadedData)) {
            return $this->loadedData;
        }
        $items = $this->collection->getItems();
        foreach ($items as $model) {
            $this->loadedData[$model->getId()] = $model->getData();
        }
        $data = $this->dataPersistor->get('pacreg_team');

        if (!empty($data)) {
            $model = $this->collection->getNewEmptyItem();
            $model->setData($data);
            $this->loadedData[$model->getId()] = $model->getData();
            $this->dataPersistor->clear('pacreg_team');
        }

        return $this->loadedData;
    }


texts: getItemCollection() returns null always magento 2.3

texts:
i have created an remove wishlist rest api,
i am passing customerid & productid to "removeWishlistForCustomer()"
but getItemCollection() always returns null, so i can't delete wishlist items.
Please take a look at the below code & share your thoughts on this.
<?php

namespace Vueapi\Wishlist\Model;

use Vueapi\Wishlist\Api\WishlistManagementInterface;
use Magento\Customer\Model\CustomerRegistry;
use Magento\Framework\Exception\LocalizedException;
use Magento\Wishlist\Controller\WishlistProvider;
use Magento\Wishlist\Controller\WishlistProviderInterface;
use Magento\Wishlist\Model\Item;
use Magento\Wishlist\Model\ResourceModel\Item\CollectionFactory;
use Magento\Wishlist\Model\WishlistFactory;

/**
 * Defines the implementaiton class of the WishlistManagementInterface
 */
class WishlistManagement implements WishlistManagementInterface
{

    /**
     * @var WishlistProviderInterface
     */
    protected $wishlistProvider;
    private $wishlist;
    /**
     * @var CollectionFactory
     */
    protected $_wishlistCollectionFactory;
    /**
     * @var CustomerRegistry
     */
    protected $_wishlistFactory;
    /**
     *@var \Magento\Catalog\Model\Product
     */
    private $_objectManager;

    protected $_productload;
    /**
     *
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storemanagerinterface;
    protected $customerRegistry;

    public function __construct(
        CustomerRegistry $customerRegistry,
        \Magento\Framework\ObjectManagerInterface $objectmanager,
        WishlistProviderInterface $wishlistProvider,
        \Magento\Catalog\Model\ProductFactory $_productloader,
        \Magento\Store\Model\StoreManagerInterface $storemanagerinterface,
        \Magento\Wishlist\Model\ResourceModel\Item\CollectionFactory $_wishlistCollectionFactory,
        \Magento\Wishlist\Model\WishlistFactory $wishlistFactory,
        \Magento\Wishlist\Model\Wishlist $wishlist

    ) {
        $this->_objectManager             = $objectmanager;
        $this->wishlistProvider           = $wishlistProvider;
        $this->wishlist                   = $wishlist;
        $this->_productloader             = $_productloader;
        $this->_wishlistFactory           = $wishlistFactory;
        $this->_wishlistCollectionFactory = $_wishlistCollectionFactory;
        $this->storemanagerinterface      = $storemanagerinterface;
        $this->customerRegistry           = $customerRegistry;
    }

    public function removeWishlistForCustomer($customerId, $productId)
    {
        $wish  = $this->wishlist->loadByCustomerId($customerId);
        $items = $wish->getItemCollection();
        foreach ($items as $item) {
            if ($item->getProductId() == $productId) {
                $item->delete();
                $wish->save();
                return 'Product removed from wishlist';
            }
        }
    }

}


texts: Displayed Error Message in Shipping Method not updating after save

texts:
I've updated all scopes for FedEx for example. I've cleared cache and updated indexes and still no changes.

Any idea what I'm missing?

This is what's displaying when message applied:

  This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.


texts: Magento 1.9.2.3 - TTFB slowness on some pages

texts:
I have a quick question for you, maybe some of you will have some leads.
On the site of one of my customers I have problems related to the TTFB. I explain myself, on a major part of the pages we have TTFB of 387ms (homepage for example). On other pages this TTFB is at 9.7sec, no particular reason and we have no idea why this happens on these pages more than on others.
Without any apparent reason or explanation, if some people have tracks / ideas, I'm interested, thanks in advance to those who will bring me tracks of reflection or a solution.


texts:
Magento 2 renderers cart items using renderer list
<block class="Magento\Checkout\Block\Cart" name="checkout.cart.form" as="cart-items" template="cart/form.phtml" after="cart.summary">
<block class="Magento\Framework\View\Element\RendererList" name="checkout.cart.item.renderers" as="renderer.list"/>

<referenceBlock name="checkout.cart.item.renderers">
    <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="cart/item/mobile.phtml">
        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.default.actions" as="actions">
            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.default.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.default.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
        </block>
    </block>
    <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="cart/item/mobile.phtml">
        <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.simple.actions" as="actions">
            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.simple.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.simple.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
        </block>
    </block>
</referenceBlock>

So i want to keep the form.phtml to render things, but i also want to use another template, (for example form2.phtml) and use same renderers.
So i tried to do this (here i changed form.phtml to mobile.phtml):
<container name="checkout.cart.mobile.container" htmlTag="div" htmlClass="checkout-cart__container_mobile" before="checkout.root">
    <block class="Magento\Checkout\Block\Cart" name="checkout.cart.mobile" as="checkout-cart-mobile" template="cart/mobile.phtml">
        <block class="Magento\Framework\View\Element\RendererList" name="checkout.cart.item.renderers" as="renderer.list"/>
    </block>
</container>

Now magento yells at me with this:

Renderer list for block "checkout.cart.mobile" is not defined

So, how to define a renderer list for this block? How to make it work anyway?


texts: Create a custom tab layout for admin page

texts:
I'm trying to create an admin page separated into tabs that displays some custom phtml.
I thought about using a ui_component form, but this requires a datasource which I don't have/need for this page.
What would be the best way to accomplish this ?
EDIT
I've tried fidgeting with how the customer roles page is implemented :
layout.xml
<?xml version="1.0"?>
<page layout="admin-2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="left">
            <block class="vendor\module\Block\Adminhtml\CustomerGroups\Tabs" name="adminhtml.user.edit.tabs"/>
        </referenceContainer>

    </body>
</page>

tabs class
<?php

namespace vendor\module\Block\Adminhtml\CustomerGroups;

class Tabs extends \Magento\Backend\Block\Widget\Tabs
{
    protected function _beforeToHtml()
    {
        $this->addTab(
            'global_stats',
            [
                'label' => __('Customer groups stats'),
                'title' => __('Customer groups stats'),
                'content' => $this->getLayout()->createBlock(
                    \vendor\module\Block\Adminhtml\CustomerGroups\Tabs\GlobalStats::class,
                    'user.orders.stats'
                )->toHtml()
            ]
        );
        return \Magento\Backend\Block\Widget\Tabs::_beforeToHtml();
    }
}

tab content
class GlobalStats extends Template
{
    protected $_template = "groups_stats.phtml";

template.phtml
hi

But it gives this result

So I'm guessing I'm close, but I can't quite find what's wrong with all this


texts: grunt exec command not working in magento2 - Unable to find local grunt

texts:
Today I am trying to execute grunt exec:all and grunt exec commands. Unfortunertly it shown me a error. Earlier it was working fine.
Later I had try to install new Magento 2 setup. Still the error is same:

I stuck over here.

I tried following with the help of devdocs:

re-install nodejs
re-install npm
re-isntall grunt-cli
re-install grunt

Other tools/commands are working fine for grunt like grunt less:luma and at all. Only the issue is into grunt exec.

Can anyone suggest me what is going wrong here? in magento 2?


texts:
config.xml for adding event:-

<events>
        <checkout_cart_product_add_after>
            <observers>
               <Mymodule_Cart_Model_Observer>
                  <type>singleton</type>
                  <class>Mymodule_Cart_Model_Observer</class>
                  <method>modifyPrice</method>
               </Mymodule_Cart_Model_Observer>
           </observers>
        </checkout_cart_product_add_after>
</events>

Observer.php:-

<?php

class Mymodule_Cart_Model_Observer

{

public function modifyPrice(Varien_Event_Observer $obs)

{

// Get the quote item

$item = $obs->getQuoteItem();

            // Ensure we have the parent item, if it has one
            $item = ( $item->getParentItem() ? $item->getParentItem() : $item );

            // Load the custom price
            $price = $this->_getPriceByItem($item);

            // Set the custom price
            $item->setCustomPrice($price);
            $item->setOriginalCustomPrice($price);
            // Enable super mode on the product.
            $item->getProduct()->setIsSuperMode(true);

        }

        protected function _getPriceByItem(Mage_Sales_Model_Quote_Item $item)
        {
            $qty = $item->getQty();
            $product = $item->getProduct();
            $finalprice = $product->getFinalPrice();

            $productOptions = $product->getTypeInstance(true)->getOrderOptions($product);

            foreach ($productOptions['options'] as $key => $value) {

                $product = Mage::getModel("catalog/product")->load($product->getId());

                $flag = 0;
                foreach ($product->getOptions() as $o) {
                    $values = $o->getValues();
                    if ($o->getTitle() == 'Package Options') {
                        foreach ($values as $v) {
                            if ($value['option_value'] == $v->getOptionTypeId()) {

                                $pkg_price = round($v->getprice(), 2);

                                $pkg_weight = intval(preg_replace('/[^0-9]+/', '', $v->getTitle()), 10);

                                if($pkg_weight != 0){
                                $flag = 1;
                                if($qty > $pkg_weight){

                                    if($qty % $pkg_weight == 0){

                                         $pkg_count = $qty / $pkg_weight;

                                    }else{

                                        $pkg_count = floor($qty / $pkg_weight) + 1;

                                    }

                                }else{

                                     $pkg_count = 1;
                                  }

                                }
                            }
                        }
                    }
                }

            }

            if(isset($pkg_count) and $pkg_count != 1){

            $newPkgPrice = $pkg_count * $pkg_price;

            $newPkgPriceSplitted = $newPkgPrice / $qty;
            $newPkgPriceSplitted = $newPkgPriceSplitted;
            $finalprice = $finalprice - $pkg_price;
            $newFinalPrice = $finalprice + $newPkgPriceSplitted;
            }
            if($flag > 0){ return $newFinalPrice; }

        }

    }

?>

Here I could change amount in unit price.But i want to add amount to subtotal instead of unit price.


texts: Is there any way to delete multiple products by filtering with SKU? I have around 1000 products that I want to delete.


texts: Magento2: Sometime js load sometime js not load properly

texts:
I got the JS error in console. Sometime when page load got the JS error and Sometime when page load it is working. I don't know what's the exact issue. I disabled all 3rd party extension after that got the same error on the website.
Please let me we need to upgrade jquery version.
Please see the screenshot below.

Please help me on this.


texts: My Magento page shows content above the header

texts:
I have added a new template file between cart page and checkout.The issue I am facing is that the content of the file is shown above the header please help me to solve this issue

public function linkAction()
{
$this->loadLayout();
$this->renderLayout();
echo $this->getLayout()->createBlock('core/template')->setTemplate('vatexempt/checkout/onepage/vatexempt.phtml')->toHtml();
}

This is how I call the template file in my controller.

Following is the code in my xmo file

<vatexempt_index_link> <!-- frontendname_controllername_actionname -->
    <reference name="content">
       <block type="core/template" name="vatexempt" template="vatexempt/checkout/onepage/vatexempt.phtml" />
    </reference>
</vatexempt_index_link>

Please Help me I am using magento 1.8 default theme


texts: edit contact us to send email to an address based on drop down

texts:
I am using Magento CE 1.9.1 and want to have a drop down added to the contact us page labeled "subject" then based on what subject was selected would determine which email address the contact us page sends an email to.

So What I have done is added the below code to my form.phtml page

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

                        <select name="subject" id="subject" title="<?php echo Mage::helper('contacts')->__('Subject') ?>">
                             <option value="or@foo.com">Order Information</option>
                             <option value="pro@foo.com">Product Information</option>
                             <option value="acct@foo.com">Account Information</option>
                             <option value="support@foo.com">Wholesale Information</option>
                             <option value="retail@foo.com">General Feedback or Question</option>
                        </select>

I then copied
app/code/core/Mage/Contacts/controllers/IndexController.php
to
app/code/local/Mage/Contacts/controllers/IndexController.php

I then edited the code to reflect the below

             $emailthisto = $post['subject'];
            /* @var $mailTemplate Mage_Core_Model_Email_Template */
            $mailTemplate->setDesignConfig(array('area' => 'frontend'))
                ->setReplyTo($post['email'])
                ->sendTransactional(
                    Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
                    Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
                    /* Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT), */
                    $emailthisto,
                    null,
                    array('data' => $postObject)
                );

However my code does not seem to work in the sense that the correct email address does not get sent the email??


texts: Magento 2.4 | Cron job getting missed multiple times

texts:
Please review the attached screenshot.
After upgrading Magento with latest version, we are facing this issue with cron. Cron getting missed multiple times. We have follow the below steps but still same result.

Updated the cron timing.
Disabled third party extension crons.
Disabled the third party extensions as well.
Updated server memory limit.

Please let us if any one has faced same issue before.
Thanks in advance.


texts: Check length of Text Field - Custom Option

texts:
For Magento 1.9 Product page, In custom option- text field,
I try to list out the number of character for user-input on the text field, but with no success.


texts: Logo is indicating base instead my custom theme?

texts: I am implementing my custom theme in magento. All required settings are done in admin panel and on FTP all structures are fine, but when I inspect logo, its indicating base theme src URL.


texts: module magento 1.x smtp for microsoft exchange

texts:
We are looking for a module for magento 1.7 who can manage SMtp for a microsoft exchange mail.

Do you know a module for that?


texts:
Magento 1.7 or 1.9 have the facility of Save CC but it is not in Magento 2.

Please guide to create or if there are any extension available?


texts: Elasticsearch setup:upgrade error: No handler for type [text] declared on field [search]

texts:
I am trying to install smile/elasticsuite using composer but I am getting a really strange error.

To install the module I used:

  composer require smile/elasticsuite:2.6.0

And got successful response:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
  - Installing react/promise (v2.7.0): Loading from cache
  - Installing guzzlehttp/streams (3.0.0): Loading from cache
  - Installing guzzlehttp/ringphp (1.1.1): Loading from cache
  - Installing elasticsearch/elasticsearch (v5.3.2): Loading from cache
  - Installing smile/elasticsuite (2.6.0): Loading from cache
Package sjparkinson/static-review is abandoned, you should avoid using it. Use phpro/grumphp instead.
Writing lock file
Generating autoload files

Then run following:

  bin/magento setup:upgrade

  bin/magento cache:flush

Now, on the front-end, I get the following error message:

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Smile_ElasticsuiteCatalog data: current version - none, required version - 1.5.0
Smile_ElasticsuiteCatalogRule data: current version - none, required version - 1.0.0
Smile_ElasticsuiteCatalogOptimizer data: current version - none, required version - 1.1.0
Smile_ElasticsuiteSwatches data: current version - none, required version - 0.0.1
Smile_ElasticsuiteThesaurus data: current version - none, required version - 1.0.0
Smile_ElasticsuiteTracker data: current version - none, required version - 1.2.0
Smile_ElasticsuiteVirtualCategory data: current version - none, required version - 1.3.0

Updates the Magento software doesn't do anything.

Any ideas?

UPDATE

After adding the missing configurations, I get an error on bin/magento setup:upgrade:

{
   "error": {
      "root_cause": [
         {
            "type": "mapper_parsing_exception",
            "reason": "No handler for type [text] declared on field [search]"
         }
      ],
      "type": "mapper_parsing_exception",
      "reason": "No handler for type [text] declared on field [search]"
   },
   "status": 400
}

UPDATE 2:

Result of curl:

{
  "name" : "Squidboy",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "0L1pnmTiQBaWL21J5p5iPw",
  "version" : {
    "number" : "2.4.5",
    "build_hash" : "c849dd13904f53e63e88efc33b2ceeda0b6a1276",
    "build_timestamp" : "2017-04-24T16:18:17Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.4"
  },
  "tagline" : "You Know, for Search"
}


texts: Product Url Key is not generated on edit product

texts:
I have the following scenario:

  I have created a new product.
  I have left the url-key field blank.
  If url-key field kept blank, then on product saving, it will set url key value automatically based on the product title.
  The url-key value is generated for the new product as expected.
  Now I have edited the same product and changed the title. Cleared the url-key field value.
  This time on saving it won't set the new url key value automatically based on the new product title.

Steps to replicate:

Create a new product
Enter title, and other details except for url key. Keep url key blank.
Save the product.
Now edit the same product.
Change the title of the product which will be different than previous
Clear the url key field value.
save the product

Actual result:
Url key value is blank

Expected result:
url key value should be updated as per new product title

Is this a Magento's default behavior or its a core bug on the product edit?


texts:
I am trying to add additional filters to a collection after the collection seems to of been generated. In catalogue product list.phtml there is the following line of code:

$_productCollection = $this->getLoadedProductCollection();

When I var_dump this it does report back as a collection (Mage_Catalog_Model_Resource_Product_Collection). However if I try to add:

$_productCollection->addAttributeToFilter('attr_handle', array('eq' => 155));

directly after the first line, the resulting collection is still exactly the same. How can I modify what is in $_productCollection in list.phtml?

Any help is appreciated

---- UPDATE ----

I notice that in the List.php block the collection is loaded in the _beforeToHtml method:

$this->_getProductCollection()->load();

I am assuming therefore I have to "unload" (?) it and then apply my filters in the view and then re-load it (?)


texts: How do I enable version 1.9 maintenance flag with admin access

texts: Because I do not see Maintenance Mode in the version 1.9 UI System > Configuration, I dropped a maintenance.flag file in the site root. However that also blocks my admin panel access. Can someone tell me how to maintain site maintenance mode with admin access?


texts: How can I add a block with an attribute value under the price in the category grid / list?

texts:
I have an attribute I want to display on the category page.  I am able to get it to show up between the "Add To Cart" button and the wishlist icons, but I can't move it up to underneath the price.

Here is the code i'm using:

catalog_category_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <referenceBlock name="category.product.addto">
      <block class="Magento\Catalog\Block\Product\ProductList\Item\Container" name="attr" template="Sigma_Catalog::attr.phtml" />
    </referenceBlock>

</page>

attr.phtml

    <?php
        //

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $product = $block->getProduct();

        $credit_hours = $product->getCustomAttribute('ce_ceu')->getValue();

        if ($credit_hours != null){
            echo 'Credit Hours - ' . $credit_hours . '';
        }

    ?>

I've tried using the  command but it either doesn't show my block, or it breaks the attribute loading functionality ($product is null)


texts: Error while getting the access token(oAuth based authentication) through postman in magento v2.2

texts:
I must include oauth_verifier request parameter in the Authorization header in the postman call to get access token from request token through postman in magento v2.2,

I could generate the access token and access token secret using integration (keeping the Callback and Identity link URL blank). But I dont want to use that way. I want to use POST APIs to get request token and access token

I am trying to get the access token using POST /oauth/token/access which requires oauth_vefirier as one of the parameter.

I got this error

oauth_problem=oauth_verifier+is+a+required+field.

Where does the oAuth verifier token come from ???

First Step I did

Sample Response

Second Step that I got error

Error Message


texts: Magento 2.3 - Does default search suggestion doesn't suggest product names?

texts:
Can anyone tell me what does the default magento 2.3 search suggestion suggests?
Am using default elastic search engine for search.
Can I able to suggest product names?


texts: sql query in cms_block table in magento 2

texts:
I have to write insert query for Magento 2 cms_block table,
for ex:-  cms_block table, what should i write for the column created_in , updated_in , creation_time , update_time

row_id  block_id  created_in  updated_in   title   identifier   content
  254      254        1       2147483647  Designer  designer  "

"

creation_time          update_time          is_active
2018-08-21 00:21:47   2018-09-18 01:00:07       1

These are the entries which are already there in cms_block, I have to create a msyql script insert queries so that i can run it on mysql console.
What does created_in = 1 mean? similarly what is updated_in= 2147483647 mean
looking at their data types they are bigint(20) unsigned.
for creation_time and update_time i will use timestamp, but what to use for created_in and updated_in in my sql query.

And if there is another approach to achieve that,
I looked on this link:-
Magento 2: How to insert data into custom table in model file?

But my requirement is to run insert query on the MySQL terminal for
Magento 2, and for that, I don't the meaning of two columns created_in, updated_in and if that's epoc time then how to do that in MySQL query

UPDATE
WHEN I MANUALLY INSERT VALUE FOR ALL COLUMNS , following error occurs

ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`webster`.`cms_block`, CONSTRAINT `CMS_BLOCK_BLOCK_ID_SEQUENCE_CMS_BLOCK_SEQUENCE_VALUE` FOREIGN KEY (`block_id`) REFERENCES `sequence_cms_block` (`sequence_value`) ON DELETE CASCADE)


texts: gitignore only user contents and temporary files

texts:
There are some sample .gitignore files on web +, + for magento projects, but I want only ignore user contents and cache files, here is my current .gitignore:

/var/  # for temporary files
/media/ # for user contents

Now I would like is it enough?


texts: I'm having problems with creating configurable products in magento 2.0.5. As in, I create the product, I set up the configurations ( by color) yet when I try to save the configurable product and its variations I can't because I am asked to set up a color for the configurable product itself. Which can't be done because that box is greyed out.


texts: Magento 2 : How to get the product attributes based on attribute set id on listing page

texts:
I am trying to get product attribute in product listing page based on attribute set id but its not working properly. can anyone help on this.

 $attributes = $_product->getAttributes();

  foreach ($attributes as $attribute) {
// var_dump($attribute->getAttributeModel());
   $value = $attribute->getFrontend()->getValue($_product);
   if ($attribute->getIsVisibleOnFront()) {
       echo $attribute->getFrontendLabel().' : '.$attribute->getFrontend()->getValue($_product) . '';
   }
  }


texts: Get Customer Login into Magento1.9.x mobile app using REST api

texts:
I have a magento website and I am trying to make a android app for it. I have configured the oauth authentication to consume magento rest api and also tested it with postman. Till now everything is fine after that when I am trying to login from my app I have to go to a page to authenticate the customer email id and password. Here problem arises when a customer want to login he has to be redirected to one page for authentication.

For resolving this issue I tried one extension from magento connect which is also seems to be not working. Please suggest some solutions for how to achieve this?
Check the Extension here


texts: Unable to add images in Magento 1.9. Is it possible to create a new product, upload the photo to a folder & reference photo directly in the database?

texts:
Magento 1.9.1 Porto theme

We had a major problem, had to do a full restore but ever since we are not able to work with product images on the backend.

This is not the issue with flash/browser. It is a long story that is detailed here:

Unable to see the actual images in the back end

What I'm after now is a work-around. We need to add new products to the site urgently. Can I create a product, upload the product photo directly into a folder on the server via FTP and then go to the database, find the correct row and add the reference to the photo's location directly in there? How would one do that?

Updated February 11th:

I've decided to do what was suggested by HelgeB and that is:

I did an All Products export using Dataflow
I then deleted all but the new products
I found the column labeled: image - since there was the following in there:

I created an import directory under media and then /i/m/ folders and I've put the product photos in there named exactly the same: such as /i/m/images2_2_1.jpg

I ran the import, deleted All Cache and re-indexed but the product photos did not appear.

What am I doing wrong?

I went into the database and found the product and it actually has the correct file name and path to the image:

That is the correct ID and all - yet the product does NOT show on the product on the front end.


texts: Is it possible to remove extension installed via composer without composer?

texts:
I've got a problem with a website that i have inherited from another developer, it's Magento 2.3.2 with quite a few extensions installed...
The majority of the extensions are installed at /app/code - so manually installed via FTP but 1 extension is installed at /vendor - so installed via composer and the server doesn't have composer installed?
I am guessing the previous dev started work on the site on a server with composer and then moved it to a server without composer... anyway the 1 extension in the /vendor folder (a Sagepay payment processing extension) is causing problems and needs updating or removing and the new version installing via FTP - but how??


texts: Magento 2.2.3 an unspecified error occurred please contact us for assistance at customer login

texts: I am unable to login to customer account it is giving error 'an unspecified error occurred please contact us for assistance'. I have checked my customer_entity table has columns 'failures_num' and 'first_failure'. Still the issue is there.


texts: Magento Calendar 1.9 show alert display its saturday n day on select date

texts:
function setcal(n) {
    var dated = document.getElementById('inspectiondate' + n).value;
    Calendar.setup({
        inputField: "inspectiondate" + n,
        ifFormat: "%Y-%m-%e",
        showsTime: false,
        range: "currentYear",
        button: "Idate" + n,
        align: "Bl",
        singleClick: true,
        dateStatusFunc: function(date) {
            var now = new Date();
            if (date.getFullYear() === now.getFullYear()) {
                if (date.getMonth() < now.getMonth() && date.getFullYear() == now.getFullYear()) {
                    return (true);
                } else {
                    if (date.getDate() < now.getDate() && date.getMonth() == now.getMonth() && date.getFullYear() == now.getFullYear()) return (true);
                    else return (false);
                }
            }
            onSelect: function(dateText, selectedDate) {
                alert(selectedDate);
            }
            if (date.getDay() == 0 || date.getDay() == 6) {
                return true;
            } else {
                return false;
            }
        }
    });
}


texts: Error in validating minimum length for text field

texts:
I have used the below

<input type="text" value="" class="input-text required-entry validate-number  validate-length minimum-length-4 maximum-length-8" title="Purchase Order" name="custom1" id="custom1">

For validating length the maximum-length-8 works.
But minimum-length-4 not working.
Somebody please let me know if you have any solution


texts:
The Magento 2 documentation here states that you can use the custom Knockout JS scope binding in the standard format:

But also in the format:

<scope args="'name.of.component'"></scope>

While the standard format is working fine, I'd like to use the <scope> format for a more 'containerless' approach, but I'm not having any joy.  Has anyone got this working?


texts: How to get data-attribute in custom block include cms page?

texts:
I have create module.
i call it int cms page.

{{block class="Namespace/Module/Block/Custom" template="Namespace_Module::html/my.phtml" custom_id=1}}

how to get custom_id value? in Namespace/Module/Block/Custom or in my.phtml?


texts: Shipping costs remove in cart grand total in magento 1.9

texts: I have add product in cart after that i have checkout page, now in checkout page i will fill the all details also select shipping method but not proceed order.after that i have going on cart then my grandtotal showing with shipping cost so i have to remove this shipping cost in my cartgrand total because customer can confusion how that total will increase.so i will only show product total with text in cart if i am select shipping method they can't be display in cart only show at checkout time. Is this possible in magento 1.9 ?


texts: Catalog Price rule special price date field

texts:
Trying to create a catalog rule where all products not on an existing sale would be discounted by X%. Here is what i have so far: http://prntscr.com/h8d2ae

Everything works fine, except for the line that looks at the expiration date of existing special price. It should only apply the discount for products with expired special prices, but the system is not recognizing the "Greater than/less than" operator for dates.

Am I doing something wrong or is there another work around?