texts:
I am trying to update my magento from 2.1.5 to 2.3.4 and during run my commands i get this error when trying to open admin page,

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'comforte_comfkh.admin_analytics_usage_version_log' doesn't exist, query was: SELECT `log_table`.* FROM `admin_analytics_usage_version_log` AS `log_table` ORDER BY `log_table`.`id` desc

please advice


texts: Magento Catalog search returns blank page

texts:
I am having a strange issue.

I am working on developing a theme based on out of the box Luma theme for a Magento 2 site.

For the default page in theme, I am overriding it to use 3-column layout.

I am not overriding or rewriting anything in Magento_CatalogSearch. So, the Problem : Whenever I try to search any term on the site, it returns nothing but the blank page.

Upon checking the html, it generates up to blank side-bar div then closes the page abruptly, Note: it is not terminating the page, but ends it with the closing of tags.

I checked the Magento logs, as well as the Apache and the PHP logs, but I could not find any error message related in there.

Please, let me know if you have faced a similar issue or if I am missing any place to debug / dig into to solve the issue / dig out more information .

Thanks in Advance,


texts: How can I create a product which can be shipped or downloaded?

texts:
I want to  create a single product in Magento 2 which can be shipped or downloaded by user choice on frontend.

Till now, I've used this "trick" in Magento 1 but it's really inconvenient because I need to create 3 different products for each single product every time to make it works:

1 Grouped Product visible in catalog and search which contains 1 Simple Product not visible individually and 1 Downloadable Product not visible individually.

Is there a way to achieve something like that without this hassle? Should I create a new product type based on Configurable Product type which allows the download?


texts: Shipping Cost and Tax not working after installing amazon payments extension in magento2.2.4?

texts: I have to enable amazon payments module and if I enable this module shipping cost and tax are not displaying at the one step checkout page. I don't know how to implement this task. Please find this link https://prnt.sc/kwwn90 Could you please help me?


texts: How to enable asynchronous indexing in production mode?

texts:
I want to enable the asynchronous indexing, but the option is inside the Admin menu below, which is available just in developer mode.
Stores > Settings > Configuration > Advanced > Developer > Grid Settings > Asynchronous indexing
Do I need to put my store in developer mode, then change it to then return it to the production mode?


texts:
I have created a form when I submitting it going on 404 :
Form file

            <form id="vendor_register" method="POST" autocomplete="off" enctype="multipart/form-data" action="<?= $block->getUrl('vendor/index/post'); ?>">
                <?= $block->getBlockHtml('formkey') ?>

                        First name *
                        <input type="text" class="form-control" name="firstname" id="firstname" data-validate='{"required":true}'>

                        Last name *
                        <input type="text" class="form-control" name="lastname" id="lastname" data-validate='{"required":true}'>

                                <button type="submit" class="action submit primary" title="Create an Account">
                                    Create an Account
                                </button>

            </form>

Controller file
<?php
/**
 * Copyright ©  All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Test\Works\Controller\Index;

use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\View\Result\PageFactory;

class Post implements HttpPostActionInterface
{

    /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * Constructor
     *
     * @param PageFactory $resultPageFactory
     */
    public function __construct(PageFactory $resultPageFactory)
    {
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Execute view action
     *
     * @return ResultInterface
     */
    public function execute()
    {
        die("works");
        return $this->resultPageFactory->create();
    }
}


texts: User Error: DDL statements are not allowed in transactions Magento 2.2.6

texts:
I want to achieve following functionality:

Whenever user tries to insert new data, i want to remove all old data from my custom table and insert new data.

For this, i want to use truncateTable() method. i am using code from below link:

Truncate table using resource model in Magento 2

But i am getting below error when i run code:

  Something went wrong while saving this configuration: User Error: DDL statements are not allowed in transaction

Is there anyway we can truncate table using code?

Note: It works with delete but reason to use truncate is to reset my custom table's auto-increment key.


texts: How to get ordered items associated with tracking numbers?

texts: How I can get collection of items associated to that particular tracking numbers for each shipment of order using order id?


texts: Customer Address Attributes aren't saved in sales_flat_order_address

texts:
I am using Enterprise, so I added some new Customer Address Attributes.

<?php $addressAttributes = $this->getChild('customer_form_billing_address_user_defined_attributes');?>
            <?php if ($addressAttributes): ?>
                <?php $addressAttributes->setEntity($this->getAddress())->setEntityType('customer_address');?>
                <?php $addressAttributes->setFieldIdFormat('billing:%1$s')->setFieldNameFormat('billing[%1$s]');?>
                <?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
            <?php endif;?>

This is the code from biling.phtml which renders my new fields. I was expecting that this would work by default..to save the data from form in database for my new fields. In sales_flat_order_address I don't see anything related to my fields. Am I missing something? Should I do something custom to save the fields and then to be displayed in view order order?


texts: how to render final_price of configurable child products in magento 2 REST API?

texts:
/V1/products-render-info endpoint provides product collection details along with price_info (i.e - final_price) based on the applied catalog price rules.

The same is not happening for associated products of the configurable products as the visibility set to "Not visible individually".

I can see that $this->collectionModifier->apply($productCollection); in vendor\magento\module-catalog\model\ProductRenderList.php is omitting those products based on the condition set in the di.xml as it is not recommended to display those products in the front end.

<type name="Magento\Framework\Data\CollectionModifier">
    <arguments>
        <argument name="conditions" xsi:type="array">
            <item name="productVisibilityCondition" xsi:type="object">Magento\Catalog\Model\ProductVisibilityCondition</item>
        </argument>
    </arguments>
</type>

How to render the child products price_info (It may have some discounts based on catalog price rules) alone for the using /V1/products-render-info or any other custom endpoint?


texts: Magento 2: The command bin/magento i18n:collect-phrases does not work

texts:
I am having trouble using the magento i18n:collect-phrases command to collect phrases for translation.

When I use:

  php bin/magento i18n:collect-phrases -o
  "/app/i18n/test/xx_YY/dictionary.csv" -m

I get the error message:

  [RuntimeException] Not enough arguments

When I try to specify a location where to find phrases:

  php bin/magento i18n:collect-phrases -o
  "/app/i18n/test/xx_YY/dictionary.csv" /vendor/magento

I get the error message:  [InvalidArgumentException]  Specified path doesn't exist

I get the same message (Specified path doesn't exist) whichever path I chance the last part of the command into (app/design/frontend.... etc).

I took one csv file from one of the module categories, translated that into my language and tried to upload it using

php bin/magento setup:static-content:deploy

This worked and showed translation on the frontend as well. But it doesn't have all the phrases and if I add phrases to that file manually, it does not show those phrases on the storefront.

The website that uses Magento is an addon domain, so the server category structure is:

  /home/Maindomain/addondomain/app, bin etc.

Could this be the reason why I am not able to collect phrases for translation?

Any help would be greatly appreciated.


texts:
When I click on CATALOG>PRODUCTS then It's showing me the following message:

How can I solve this?


texts: Remove decimals from a product attribute and add suffix to its value

texts:
i copy weight attribute value to another product attribute named general_weight by this php code:

<?php
require_once  "app/Mage.php";
Mage::app("admin");
umask();

/*
 Step2: get Product Collection filter by Saleable
*/
$collection = Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('weight');

foreach($collection as $product){
$val=$product->getWeight();
/*$product->getWeight() is not given the value then used

$product->getResource()->getAttribute('weight')->getFrontend()->getValue($product-)

*/
$product->setGeneralWeight($val);
$product->getResource()->saveAttribute($product, 'general_weight');

}

my weight attribute has for decimals like: 90.0000 . i want to remove those decimals from general_weight attribute and add a suffix to it like (KG).
at the end i want 90.0000 from weight attribute to be copied to general_weight attribute this way: 90 KG


texts: creating a custom left tab to magento admin customer pages

texts:
I want to create an left tab to magento backend customer page.

I tried to add a module i found. but it doesnt work for Magento 1.9 version.

here's the LINK


texts: Remove the suffix from the url and set the same url for all products

texts:
Set the same url key for all products in magento 2.3

  Example : www.example.com/test/custom

  www.example.com/tested/custom

I want to set the same url for all products.

Can you please help me how to achieve this in magento 2


texts: How to Add tax value in Price filter magento2?

texts: I have 100 products and all products have different tax rule and i also do settings from backend to display tax inclusive price display in catalog product list now when i do the price filter its doing filter on normal price and shows the product above the price filter so how can i add tax value in my price filter for better understanding i attach the image.


texts: Magento2: Create a new order from Admin panel for particular customer

texts:
Create a new order from Admin panel for a particular customer. Magento default functionality is not working

When I add a new product and update to the shopping cart option then page refresh but the product does not add.


texts: Magento 2 help validate function to count bundle product child items of an order

texts:
I'm trying to write a function that takes an order object, and returns an array of sku => qty (key-value) showing how many of each sku was sold/shipped.

The tricky part is, magento formats line items differently on configurable and bundle products.

Example:

Line1: name shirt-X2, type bundle, ordered 2, shipped 2.
Line2: name shirt, type simple, ordered 4, shipped 0. // <-- my problem

I've written this code:

/**
 * @param \Magento\Sales\Model\Order $order
 * @return array
 */
public function getOrderData($order)
{
    $result = [];
    foreach ($order->getAllItems() as $item) {
        if ($item->getProductType() != 'simple') {
            continue;
        }
        $sku = $item->getSku();
        $orderedReal = $item->getQtyOrdered();
        $orderedB = $item->getQtyOrdered() - $item->getQtyRefunded() - $item->getQtyCanceled();
        $orderedB = max(round($orderedB, 8), 0);
        $invoicedB = $item->getQtyOrdered() - $item->getQtyInvoiced() - $item->getQtyCanceled();
        $invoicedB = max(round($invoicedB, 8), 0);
        $shippedReal = 0;
        $isShipped = false;
        if ($item->getParentItem()) {
            $parent = $item->getParentItem();
            if ($parent->getQtyOrdered() > 0 && $parent->getQtyOrdered() == $parent->getQtyShipped()) {
                $isShipped = true;
            }
        } else {
            if ($item->getQtyOrdered() > 0 && $item->getQtyOrdered() == $item->getQtyShipped()) {
                $isShipped = true;
            }
        }
        if ($isShipped) {
            $shippedReal = $orderedReal;
        }
        $result[] = [
            'sku' => $sku,
            'invoiced' => $invoicedB,
            'ordered' => $orderedB,
            'shipped' => $shippedReal
        ];
    }
    return $result;
}

Is this function valid, or could it be improved ?
Any help is appreciated.

Thanks


texts: How i can clean cache programmatically for only one store?

texts:
How i can clean cache programmatically for only one store ?

and refresh index for only one store ?


texts:
I'm planning to use NGINX rather than Apache as my webserver on my next Magento project and am wondering about the Use Web Server (Apache) Rewrites on the Magento installer wizard?

What exactly do Web Server Rewrites do? I believe they just remove
the index.php from the url? How important are they?
Should this option be checked when using NGINX? Do Magento Web
Server Rewrites work with NGINX


texts: Overriding a class : Mage_Catalog_Block_Product_View_Type_Configurable

texts:
I want to override Mage_Catalog_Block_Product_View_Type_Configurableclass.
I have created one module : Ved_Catalog
Here are my module files:
Code from config.xml :

<config>
<global>
        <blocks>
            <catalog>
                <rewrite>
                    <product_view_type_configurable>
                        Ved_Catalog_Block_Product_View_Type_Configurable
                    </product_view_type_configurable>
                </rewrite>
            </catalog>
        </blocks>
    </global>
</config>

code in Configurable.php :

class Ved_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Block_Product_View_Type_Configurable
{
...
}

But this code is not working. I am not getting what I am doing wrong here.


texts:
we are experiencing very slow performance in "add to cart" action and the cart page.
other pages are fine with apc, block cache, etc.

also, we have read online, and disabled rss module, download module, and only about 80-100 active shopping cart rules.

any help we can improve the "Add to cart" performance?
thx for help.

ed


texts: Magento 2 is not showing product in categroy pages

texts:
I use Magento 2.2.2 and since yesterday I can't see any products in category pages. products are available individually but not available in any category pages

I've done these solutions but still, it's not working.

1- php bin/magento indexer:reset
2- php bin/magento indexer:reindex
3- php bin/magento indexer:status

shows that some indexes are always in processing state

note. reindex takes almost 20 or 30 minutes which is not usual for us.
note. sometimes products just appear for like one minute after the reindex and they disappear again.


texts: Magento 2 apply discount on tax issue + FPT

texts:
Firstly I am using Magento 2.1.8 version

I'm facing an issue with tax total amount and discount from coupon code.
Whenever I apply a discount coupon on the cart, tax amount stays the same.
I have read a few posts saying that Magento 2 option:

My options:
Catalog Prices: Excluding tax (tried Including tax too)
Apply Customer Tax: After discount
Apply Discount On Prices Exclude tax (tried Including tax too)

Moreover, the product has FTP (Fixed product taxes) set.

Maybe someone knows this issue and have a fix for it?
Also, it would be great if someone could confirm that they also facing the same issue (add discount - tax stays the same, using FPT)

Thanks for any help


texts: Magento 2 add body class into as per current page using toolbar.php plugin for category and search results page

texts:
I have created plugin for toolbar.php
\Magento\Catalog\Block\Product\ProductList\Toolbar

protected function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('Category Page'));
    $this->pageConfig->addBodyClass('class'. $this->getCurrentPage() );
    $this->getLayout()->getBlock('page-title')->setPageTitle('Custom Title');

    return parent::_prepareLayout();
}

On product listing, need to add existing page number in body class.


texts:
I am facing below error in exception.log file. How can i resolve this error?
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [amxnotif_hide_alert_value]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v226","node":"YsQHRziLSUeMo8kQPmEqbw","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [hide_value]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [amxnotif_hide_alert_value]","caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [hide_value]"}}},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [hide_value]\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v226\",\"node\":\"YsQHRziLSUeMo8kQPmEqbw\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [hide_value]\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [hide__value]\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"no mapping found for field [amxnotif_hide_alert_value]\"}}},\"status\":400} at /vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []

and
Cannot search on field [upc_code] since it is not indexed


texts: Magento 2 product and customers not saving "No data to save"

texts:
I've have the following issue:
Customers are not save on Save and Continue Edit and redirect to the Customers overview page with the status code 301

Save Customer is working

On Products there is an similar issue
Save is not working and redirects also to the overview page, but with the error notice "No data to save"
This hapend to all product types

Other save methodes are working

I tried to increase several php configuration settings max_input_vars, opcache.max_accelerated_files etc.

Any ideas/advice on how to resolve this?


texts: How to stop magento to generate all types of images in cache on page visit

texts:
I'm using Magento 2.2.5 and when we visit listing or product page Magento creates the various sizes of images in pub/media/catalog/product/cache/ directory which I don't need except some.

I have checked file vendor/magento/framework/Config/etc/view.xsd but, nothing found related to stop/disable image generation.

As this creates lots of images and acquires disk spaces.

How to disable a particular type of image generation or anyone know the flow of image generation?


texts: I want to remove the SKU from the product display page. How can I do this?


texts: Compare Magento repository and production

texts:
I have to compare my production vs repository because there are much difference between both, but I do not know how to compare all files.

Please suggest me how to do?


texts: Magento 1.9.2.1 Stock availbility options not working

texts:
At admin backend, save product was giving SQL errors like :

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '1161-1' for key
  'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID', query was:
  INSERT INTO cataloginventory_stock_item (product_id, stock_id,
  qty, use_config_min_qty, is_qty_decimal,
  use_config_backorders, use_config_min_sale_qty,
  use_config_max_sale_qty, is_in_stock, low_stock_date,
  use_config_notify_stock_qty, use_config_manage_stock,
  stock_status_changed_auto, use_config_qty_increments,
  use_config_enable_qty_inc, is_decimal_divided) VALUES (?, ?, ?, ?,
  ?, ?, ?, ?, ?, '2016-01-06 15:56:50', ?, ?, ?, ?, ?, ?)

Error cames every first attempt to save, after giving error (SQL above) it gets saved in the second attempt, means I had to enter all the product detail again and second time it works.

It was fixed by changing
$product->save() to $product->getResource()->save($product)

Is it the right way to replace $product->save()?

but now it does not updates the stock detail [Quantity / in Stock], rest I can add new product, everything works but not the stock options.

Any hint will be helpful.


texts: Magento2 : checkout_cart_product_add_after Event not working with API

texts: I have created an observer on event "checkout_cart_product_add_after" and its working fine for web but not working with REST API.


texts: How to remove previous price of products

texts: I am using magento 1.9 , i want to know how to remove the previous strikethrough  price of products as shown here https://prnt.sc/orfv5b


texts: How to solve CRITICAL error of getimagesize() after data migration in Magento2.2.0?

texts:
After data migration process in Magento2.2.0,

When I open category page at frontend than I get this type of error in system.log file,

  [2018-01-02 11:56:58] main.CRITICAL: Warning: getimagesize(/var/www/html/namespace/module/pub/media/catalog/product/placeholder/default/default-image_1.jpg): failed to open stream: No such file or directory in /var/www/html/namespace/module/vendor/magento/module-catalog/Model/Product/Image.php on line 890 [] []

And also the product is not displayed on any category page.

Anyone has idea about this problem?


texts: After Magento2.2.0 upgrade: ReferenceError: initializeFieldsetDataByDefault is not defined

texts:
I've upgraded my magento version from Magento2.1.4 to Magento2.2.0 via composer. Everything seems to work fine so far. But when I browse the category at backend, it doesn't show the tabs after Content http://prntscr.com/h4su2f and it shows error in firebug i.e. ReferenceError: initializeFieldsetDataByDefault is not defined

I've installed fresh magento2.2.0 on local and it's working fine there.

Can anybody help me to get this fixed?

Thanks in advance!


texts: Magento: Difference between _redirectError and _redirect

texts:
I'm using in some Controller Code like:

Mage::getSingleton('core/session')->addError('Did you forget your password?');

$this->_redirect( 'customer/account/forgotpassword' );

I don't understand what's the difference between _redirect and _redirectError. Hope someone can give me a hint.

$this->_redirectError( 'customer/account/forgotpassword' );


texts: Magento 1.9.0.1: Email stuck in queque? 'This letter cannot be sent.'

texts:
something strange is going on with my Magento install. Everything with the emails used to work fine, but now I have these messages in my exception.log:

2015-05-11T10:00:02+00:00 ERR (3):
exception 'Exception' with message 'This letter cannot be sent.' in /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/core/Mage/Core/Model/Email/Template.php:399
Stack trace:
#0 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php(24): Mage_Core_Model_Email_Template->send('info@mysite.de', 'mysite', Array)
#1 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/community/Hackathon/MageMonitoring/Model/WatchDog/UberDog.php(108): Ebizmarts_Mandrill_Model_Email_Template->send('info@mysite.de', 'mysite', Array)
#2 [internal function]: Hackathon_MageMonitoring_Model_WatchDog_UberDog->triggerActiveDogs(Object(Mage_Cron_Model_Schedule))
#3 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/core/Mage/Cron/Model/Observer.php(325): call_user_func_array(Array, Array)
#4 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/core/Mage/Cron/Model/Observer.php(72): Mage_Cron_Model_Observer->_processJob(Object(Mage_Cron_Model_Schedule), Object(Mage_Core_Model_Config_Element))
#5 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/core/Mage/Core/Model/App.php(1338): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#6 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Cron_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#7 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#8 /var/www/vhosts/lvps91-250-119-53.dedicated.hosteurope.de/httpdocs/magento/cron.php(76): Mage::dispatchEvent('default')
#9 {main}

This is written to the log files every 5 minutes so I guess it must be the cronjob trying to send out mail and failing.

I tried tracking the problem and it was caused by this function in Template.php to return false:

$this->isValidForSend()

So following this advice I added this line to the function to figure out why it would return false. It just writes the results of isValidForSend to an email.log file.

Mage::Log(var_export(!Mage::getStoreConfigFlag('system/smtp/disable'),true).';'.var_export($this->getSenderName(),true).';'.var_export($this->getSenderEmail(),true).';'.var_export($this->getTemplateSubject(),true),null,'email.log');

The results from email.log:

2015-05-11T08:35:02+00:00 DEBUG (7): true;'MACHIMA';'info@mysite.de';NULL
2015-05-11T08:40:02+00:00 DEBUG (7): true;'MACHIMA';'info@mysite.de';NULL
2015-05-11T08:45:02+00:00 DEBUG (7): true;'MACHIMA';'info@mysite.de';NULL
2015-05-11T08:50:02+00:00 DEBUG (7): true;'MACHIMA';'info@mysite.de';NULL

So everything seems to be ok, just the last NULL value which is returned by

$this->getTemplateSubject()

causes the function to fail.

I checked the configuration about 10 times and don't find any emails that are being sent out and are missing a subject.

My thought now is that maybe there is an email stuck in a queque Magento keeps trying to send out every 5 minutes.

Is there a way to track down where this is coming from?

Thanks


texts: Magento 2: How to set default option in configurable options?

texts:
How to set drops downs on configurable products to be set to the first option rather than please select.

I have tried below code:

<script>
require(['jquery', 'jquery/ui'], function($){
  $('.product-add-form .field select').each(function(i, obj) {
    $(obj).find('option:eq(1)').prop('selected', true);
  });
});
</script>

However, this fails unless I time it out a bit which feels messy. It also does not update price when using this method.


texts: How to stop fake reviews and fake signups on Magento 1 and Magento 2?

texts:
We have 2 websites one is on Magento 1 and the second is on Magento 2 , In both websites we get fake reviews and fake signups everyday. Someone told me to add captcha which will not let bots or automated softwares to make fake reviews and fake signups. Any other solutions? or captcha is the best solution ?

If there are some extensions or any other solutions please give detail answer.


texts: Magento Reset Password Link not working after upgrade

texts:
My client had upgraded magento version in his site recently.

But after upgrade whenever the customers try to reset their passwords they get link in their email, and when they click on the link they are redirected to forgot password page with error "Your password reset link has expired".

I have checked in Admin panel at System > Configuration > Advanced > Admin > Admin User Emails > Recovery Link Expiration Period (days)

It is set to 2 days, still when customer open his reset password link in browser it shows the above error message.

I am sure no customer module overrides are there(community/local).

Current magento version running is ce-1.9.2.1.

Any suggestions please.


texts:
I just patched magento 1.9.3.6 to support php7.2. Now we are not able to login.

Here's the error:

Warning: session_start(): Failed to read session data: memcache (path: unix:///var/run/memcached-multi/site.com_sessions.sock?persistent=1&weight=2&timeout=10&retry_interval=10)  in /var/www/html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 134

Pls advice.
Thanks


texts: Magento 2: How can I change the Value in the Url of the paypal Button?

texts:
My problem is happening every time I click on the express checkout with PayPal.

I get an error that the link is not working, I found out that when you click the button the value is for example"(1,000)" and Paypal does not recognize the"," in the value.

If anyone would be so kind as to guide me or explain to me how can I change that so when it adds the value to the Paypal link is only like 1000 USD instead of 1,000.


texts: CMS Preview without styles when using custom theme

texts:
I use magento EE 1.13.1.0 with custom theme which is set in System->Configuration->Design->Default.

The issue appears when we use Magento CMS Preview. It is displayed without custom theme styles, because by default magento preview use base/default theme.

If I edit Design tab of CMS Page and set Custom Theme attribute to some custom theme everything will work. But not by default.

Had someone this issue before? Maybe I missed some configuration?

Anyway to fix this issue I created observer and attached it to cms_page_render event to check if Custom Theme attribute of CMS page is set. If not, then use real default theme:

public function setDefaultThemeForCmsPreview(Varien_Event_Observer $oObserver)
{
    $oRequest = $oObserver->getControllerAction()->getRequest();
    if (
        $oRequest->getControllerName() == 'cms_page_revision' &&
        $oRequest->getActionName() == 'drop'
    ) {
        $oCmsPage = $oObserver->getPage();
        if ($oCmsPage->getCustomTheme()) {
            list($sPackage, $sTheme) = explode('/', $oCmsPage->getCustomTheme());
        } else {
            $sPackage = Mage::getStoreConfig('design/package/name');
            $sTheme   = Mage::getStoreConfig('design/theme/default');
        }
        Mage::getSingleton('core/design_package')
            ->setPackageName($sPackage)
            ->setTheme($sTheme);
    }
}


texts: Change currency for quote in Onepage checkout

texts:
I want to change the currency to USD for a quote depending on shipping method in Onepage checkout. The new currency should be reflected in the order review before going to the payment provider. A bonus would be if both currencies can be shown in the review, but only USD is also fine.

Nothing I do seem to have any effect, even though I recompile and empty the cache between . This is my current attempt:

app/code/local/Mage/Checkout/controllers/OnepageController.php

/**
 * Save payment ajax action
 *
 * Sets either redirect or a JSON response
 */
public function savePaymentAction()
{
    if ($this->_expireAjax()) {
        return;
    }
    try {
        if (!$this->getRequest()->isPost()) {
            $this->_ajaxRedirectResponse();
            return;
        }

        $data = $this->getRequest()->getPost('payment', array());
        $result = $this->getOnepage()->savePayment($data);
        if ($data['method'] == 'ourpaymentmethodofchoice') {
            Mage::app()->getStore()->setCurrentCurrencyCode('USD');
        }
    // etc

I have also tried this:

            $currency = Mage::getModel('directory/currency')->load('USD')
            $quote = $this->getOnepage()->getQuote();
            $quote->setForcedCurrency($currency);
            $quote->save();
            $this->getOnepage()->saveOrder();

We are running Magento 1.9.

What is the best way to change the currency programatically?


texts:
I need to get Conditions of Product from Catalog Price Rule in my custom form. I went through core files to get it, but I was able to get Cart Price Rule Conditions by using

<container name="conditions_apply_to" sortOrder="10">
            <htmlContent name="html_content">
                <block name="conditions_apply_to" class="Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions" />
            </htmlContent>
        </container>

Can Any one help me out which class of core i can add to get product conditions. Thanks


texts: How to set up a user instead of using root Magento 2

texts: I'm using root user to do everything which is throwing up problems. I know this is not the right way to do things. How do I set up a new user and set permissions?


texts:
I am trying to use dompdf in magento for printing invoice.

So I am trying to include dompdf in magento but its not working.

I used following code in Mage.php before include_once "Varien/Autoload.php";.

include_once 'dompdf/autoload.inc.php';
spl_autoload_register('DOMPDF_autoload');

Its giving blank page.

Any help.


texts: Matching customer and product ID's to imported data

texts:
So, I am setting up a Magento store for a client, who currently has a few thousand products, customers and orders based in a Microsoft Access database and a basic web front end. Now I have access the the Access database, which is a mess, it has no relationships set up, and it integrates with eBay, successfully, to my surprise.

However, the customer has decided to upgrade the system, and I am basing it on Magento, and integrating with ebay via M2E.

I have managed to get all Customer and part data into a CSV, which I have imported into Magento successfully. However, as there was random missing ID's etc in the access database, there are dozens, if not more, customers and parts with a different ID in Magento, than what they had in the old system

I cleared the tables before importing the data, and reset the auto-increment. However, I need them to sync up, so when I import the order data, they actually match up.

Anyone got advice around this? It is too much data to do manually, so as I have literally just added products and customers, is there any way to edit the ID's, or even a better way to import it, and set the ID as a value given from the CSV file?

Appreciate help on this. Thank you.


texts: ask user input additional different product attributes based on a customized category

texts:
I want to add a new product attribute My Customized Attribute, based on the options user selected, I want to show user related attributes. For example if the user selected video games, then I want to show producer,game_type, if the user selected clothing then I want to show style,pattern,material as attributes.
This will be additional attributes based on default attributes, I am not creating additional attribute set in this case.


texts: Change value of custom category attribute in front end

texts:
I am installing a custom attribute through the normal Magento module install script. It is a simple select box with Yes or No:

<?php

$installer = Mage::getResourceModel('catalog/setup','catalog_setup');
$installer->startSetup();

$installer->addAttribute(
    'catalog_category',
    'my_attribute',
    array(
        'label'            => 'My attribute label',
        'group'            => 'My Group',   //will be created if necessary
        'type'             => 'int',
        'class'            => 'validate-number',
        'source'           => 'eav/entity_attribute_source_boolean',
        'required'         => false,
        'input'            => 'select',
        'global'           => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'          => true,
        'visible_on_front' => true,
    )
);

$installer->endSetup();

This is all good - it installs fine and if I change the value in the admin area the value gets saved correctly.

I also need a way to manually set that value via AJAX. This controller gets called correctly via a http://www.mywebsite.com/mymodule/setmyattribute/index/id/1:

<?php

class Mynamespace_Mymodule_SetmyattributeController extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {

        $categoryId = $this->getRequest()->getParam('id'); // Get id from params (1)

        $category = Mage::getModel('catalog/category')->load($categoryId); // Load category (loads fine)
        $category->setMyattribute(0); // <-- set Attribute
        $category->save(); // <-- save the category

        var_dump($category->getMyattribute()); // <-- Equals 0 here which is correct but doesn't equal 0 in the admin area

        /** Re-index the products and category EAV **/
        $process = Mage::getModel('index/process')->load(5); $process->reindexAll();  // Re-index category EAV
        $process = Mage::getModel('index/process')->load(6); $process->reindexAll();  // Re-index Category Products

        echo Mage::helper('core')->jsonEncode(array('status'=>'success'));

        die();

    }

}

Now the var_dump above does as expected and reports 0. However it doesn't seem to save it properly as in the admin area the value is still 1. Why is this and how do I make it save correctly?

In my stand-alone Magento scripts when I am setting category attributes I have to put this line at the top:

<?php

Mage::app('admin'); // And not ('default')

To set custom category attributes, how do I achieve the same with the above controller?


texts: Create category in in data-upgrade script

texts:
I try to create categories with the following code in a data-upgrade script.
The categories where stored in the database but the seo-urls are not working.

Instead of {HOST}/categoryA/categoryB the url is like {HOST}/catalog/category/view/s/categorB/id/152/

/** @var Mage_Catalog_Model_Category $rootCat */
$rootCat = Mage::getModel('catalog/category');
$rootCat->setPath('1/3')
    ->setIsActive('1')
    ->setName('foobar')
    ->save();

/** @var Mage_Catalog_Model_Category */
$category = Mage::getModel('catalog/category');
$category->setPath($rootCat->getPath())
$category->setName($page->getData('title'));
$category->setMetaTitle($page->getData('pagetitle'));
$category->setIsActive(1);
$category->setIncludeInMenu(1);
$category->setDisplayMode('PRODUCTS_AND_PAGE');
$category->setIsAnchor(0);
$category->setPageLayout($page->getData('root_template'));
$category->setMetaKeywords($page->getData('meta_keywords'));
$category->setMetaDescription($page->getData('meta_description'));
$category->setColor($page->getData('color'));
$category->setBackground($page->getData('background'));
$category->save();

Any ideas?

Thanks in advance!


texts: getLoadedProductCollection() on boolean module Google Tag Manager

texts:
When I open a product page, i see the error:

Fatal error: Uncaught Error: Call to a member function getLoadedProductCollection() on boolean in /vendor/magento/module-google-tag-manager/Block/ListJson.php:204 Stack trace:
#0 /vendor/magento/module-google-tag-manager/Block/ListJson.php(188): Magento\GoogleTagManager\Block\ListJson->_getProductCollection()
#1 /vendor/magento/module-google-tag-manager/Block/ListJson.php(238): Magento\GoogleTagManager\Block\ListJson->_getProducts()
#2 /vendor/magento/module-google-tag-manager/view/frontend/templates/impression.phtml(11): Magento\GoogleTagManager\Block\ListJson->getLoadedProductCollection()

#3 /home/mariana.nassar/var/www/enterprise-dutyfree/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/...')
#4 /vendor/magento/framework/View/Element/Template.php(255) in /vendor/magento/module-google-tag-manager/Block/ListJson.php on line 204

I don't know why, but I think was something with the category of product? All the product have the same error.


texts:
Why Form Key is added in every page In Magento 2 as a hidden input type.

<input type="hidden" value="dEOXfL0kxDc8W4Yt" name="form_key">

I observed how it is generated. Is there any specific reason for adding this ?

I found the related question here but no answer.

Any help.


texts: How to get cart quote item id in magento 2?

texts:
I tried,

 $items = $item->getQuote()->getAllItems();

 foreach($items as $item1)
 {
      $productId = $item1->getProductId();
      $itemId = $item1->getItemId();
 }

I am getting blank value.

Can anyone tell me how to call checkout_cart_add_product_complete event in observer ?


texts:
I have updated Magento to 1.9.2.2 via Connect Manager in my dev environment and so far I can't say that I am noticing any bugs related to the various changes outlined here: http://magento.com/security/patches/supee-6788-technical-details

However, before updating my live store I want to be perfectly sure, that no issues exist and am therefore looking for the best approach to modify all extensions with the new requirements.

1) APPSEC-1034, addressing bypassing custom admin URL

I have about 10 extensions in use which are not under the admin url, doing a search via FileExpress for

  custom_module after="Mage_Adminhtml"

within these extension yielded no results so I will have to modify all these extensions as described in the documentation.

2) APPSEC-1063, addressing possible SQL injection

Doing a search via FileExpress for

  $collection->addFieldToFilter('`

within all my extensions yielded a couple of results within the Ess M2E Pro extension, however an updated version has already been released which fixes this.

Doing a search via FileExpress for

  $collection->addFieldToFilter('(

within all my extensions yielded no results, so this shouldn't be a problem in my case.

3) APPSEC-1057, template processing method allows access to private information

Doing a search via FileExpress for

  {{config path=

within all my extensions yielded no results.

Doing a search via FileExpress for

  {{block type=

yielded a couple of results within the german locale pack. A few email templates will have to be modified.

EDIT:

All these blocks are core/template blocks so no modification should be required.

4) APPSEC-1079, addressing potential Exploit with Custom Option File Type

"This change will affect any customization that uses product custom options to save information as a PHP object. Such approach will no longer be possible."

I doubt this is the case with any of my extensions, but is there any way I can actually confirm this?


texts: Including newsletter block in a static block issue

texts:
I tried to include the newsletter block in a static block content, like:

  {{block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"}}

But it is not working. Can you give some ideas why and what else should I try ?

Thx


texts: Programmatically Export Sales order customer details to excel format

texts:
I tried to export sales order customer details, its working fine, but i want customer country code(country name) not id. below i mention my full code.

<?php
require_once("app/Mage.php");
Mage::app();
Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID);
$orders = Mage::getModel('sales/order')->getCollection();

$orders->addAttributeToFilter('grand_total', array('gt' => '0.00'));
$orders->addAttributeToFilter('status', Mage_Sales_Model_Order::STATE_COMPLETE);

$fp = fopen('file.csv', 'w');
foreach($orders as $order) {
    $fields = array($order->getId(), $order->getBillingAddress()->getFirstname(),$order->getBillingAddress()->getLastname(), $order->getBillingAddress()->getEmail(), $order->getBillingAddress()->getCity(),  $order->getBillingAddress()->getTelephone(), $order->getBillingAddress()->getCountryId(), $order->getStatus());
    fputcsv($fp, $fields);
}
?>


texts: Magento 2 ui form component switcherConfig value expression

texts:
Doe anyone know at all if possible to have expression to evaluate a value in rules E.G :

<switcherConfig>
   <rules>
       <rule name="0">
         <value>EXPRESSION HERE</value>
         <actions>
           <action name="0">
               <target>vendor_module_form_edit.vendor_module_form_edit.general.field</target>
               <callback>show</callback>
               </action>
             </actions>
         </rule>
     </rules>
  <enabled>true</enabled>
</switcherConfig>


texts: Orders are not caneled from the cron but working fine in controller

texts:
I am having cron which will basically fetchs pending orders and check some conditions and cancel the orders.my code is

$orders = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('status', 'pending');

foreach($orders as $order){
    // my code which check some conditions
     code ........

    // and variable is set to error
    if($validated == "error"){
        try {
            if(!$order->canCancel()) {
                Mage::log("Cannot Cancel",null,'neo_api.log');
            }else{
                Mage::log("Can Cancel",null,'neo_api.log');
                Mage::log($order->getStatus(),null,'neo_api.log');

                $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Cancel Transaction.');
                $order->addStatusToHistory($order->getStatus(),'Transaction ID', false);
                $order->save();
            }
        }catch (Exception $e) {
            Mage::log("ERROR: ".$e,null,'neo_api.log');
        }
    }
}

My orders are not canceled.

I had logged it is going into if then it is logging the messages as follows

1) Can Cancel

By same code is working when i write in the controller.

and code is not working when through cron.My code is in the Model/Observer.php


texts: Search category names in basic search and return matching products

texts:
I am associating my products with categories in Magento, and I'd like to modify the basic search so that products from category names that match the search query are included in the results.

Is there a buried option that allows that? Category is not an attribute as such, and I can't find an option in each category to include in search.


texts: Product show up in search, but not in category

texts:
Product show up as  search result , but not in category in the specific category.

Please help


texts: M2 - How to move banner image using XML file

texts:
I am using Magefan blog extension, in the article page i want to move my banner image under breadcrumbs,
Live demo : https://blog.demo.magefan.top/blog/post/fashion/our-favorite-blue-bags-for-fall-winter-2016-2017
how to achieve using XML file.
I did move the relevant product section from the bottom of the article to the sidebar using XML using
<move element="blog.post.relatedproducts" destination="blog.sidebar" after="blog.sidebar.search"/>

How to move my article banner image under the breadcrumbs


texts: I want to create a landing page which is to give some information to the customers saying this website is in working progress please visit our sister company websites, so the customer can only visit our sister companies. Thanks


texts: how to optimize storage problem in magento 2

texts:
magento ver 2.2.6

  i have 2,000 products but

  storage 16GB (pub/media folder 14GB)

  how i can optimize this storage problem..


texts:
In Magento ver. 2.2.4 when I try to make a payment with a credit card or by Bank Transfer this exception is generated. With PayPal this does not happen and I can place orders without problems.

  2018-07-11 13:50:40] main.CRITICAL: Rolled back transaction has not
  been completed correctly. {"exception":"[object] (Exception(code: 0):
  Rolled back transaction has not been completed correctly. at
  /home/wwwdos9/public_html/.../vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:270)"}


texts:
I have created a class Customcode_Sales_Model_Order that I want to rewrite a function in Mage_Sales_Model_Order with.

I have set up my config.xml in Customcode/Sales/etc as follows:

<config>
    <global>
        <model>
            <sales>
                <rewrite>
                    <order>Customcode_Sales_Model_Order</order>
                </rewrite>
            </sales>
        </model>
    </global>
</config>

and declared my class in Customcode/Sales/Model like this:

<?php

class Customcode_Sales_Model_Order extends Mage_Sales_Model_Order
{
    public function getShippingMethod()
    {
        /** my code here */
    }
}

I've also made sure to create Customcode_Sales.xml in etc/modules:

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

However, when I debug the original function still gets hit. Is there anything I might have missed or misspelled?


texts: updated rom 1.9.2.1 to 1.9.2.4 now Getting Fatal Error on my magento site Class 'Zend_Cache_Backend_File' not found also had numerous other files missing but cannot solve the Zend Cache Backend File issue


texts: Images not displayed in admin after manual upload in magento 1.9.1

texts:
Image thumbnails are not visible in admin.

I have manually uploaded images in admin. Images are visible in frontend. But not in admin.

It shows the text "roll over for preview", when rolled over it just become empty.

Changed media folder permission to 777. and I have removed .htaccess file from /media folder too...

Plz see the image.

But the thumbnails are visible for existing products.

This is the existing product page.


texts: How to add 6 more cross-sell items to ALL (1000) products at the same time?

texts:
I am using Magento 1.9.1 version I have 1000 products in my store.

Is there a script or something that I can run in order to add let's say 6 extra cross-sell products to ALL 1000 products? I don't want to do it 1 by 1 manually.


texts:
The default english transactional email from Magento that is sent out to the customer has a CSS error in it and I am not sure what the solution is.
None of the styles load and at the top of the email I see:

{Error in template processing} {{inlinecss file="email-inline.css"}}

At the bottom of the email I see:

{Error in template processing}

Does this mean the email-inline.css file is missing?
My french transactional email display properly with no errors. Where would I find this file or how would I got about fixing this error?


texts: I am using magento 1.9.2.3. Now I have to add some more languages like Hindi (India), Bengali (Bangladesh), Tamil (India). Is there any extension for those language or do we have to add it manually and how could I add those languages manually?


texts: Product View page error - Undefined class constant 'XML_NODE_PRODUCT_BASE_IMAGE_WIDTH'

texts:
I have an an error on some but not all product view pages. Does anyone have an idea what the problem is?

<img id="image-0"
             class="gallery-image"
             src="
Fatal error: Undefined class constant 'XML_NODE_PRODUCT_BASE_IMAGE_WIDTH'
in /var/www/vhosts/thesite.com/app/code/core/Mage/Catalog/Block/Product/View/Media.php on line 87

At that line is

$size = Mage::getStoreConfig(Mage_Catalog_Helper_Image::XML_NODE_PRODUCT_BASE_IMAGE_WIDTH);

There is a value of 1800 saved in System->Configuration->Catalog->Product Image->Base Image Width


texts: Import products via command line using Magento\ImportExport\Model\ImportFactory in Magento 2.3

texts:
I want to import products from .csv file using command line. Referring to this link: https://www.thirdandgrove.com/insights/importing-products-magento2-part2/ everything is working fine, except situation where i have some mistake in my .csv file. For example if my custom attribute has wrong value the script will not import products. Importing products from admin panel will skip wrong products and all correct will be imported. I tried to change the 'validation_strategy' but it did not help. Where is mistake in this script? What should i change?
I will be very grateful for any advices.


texts: write a php file in an extension that will always be included, no matter what

texts:
Lets say I want to set general php things, like register to a shutdown function or do some ini_set() calls, and I want it to always happen whenever my extension works.

How can I do it, eg tell Magento "If this package is enabled, you must always include this php file"?

Note that I don't want to edit index.php or any of those files, it needs to come from the extension itself.

I though about using require_once() at the beginning of my files, but putting it in every file is kind of ugly.

Any ideas?
Thanks.


texts:
A bit confused with the data migration tool.

As far as I know it will scan the whole database, including any new data that any extra modules have added in Magento 1 db, that is why we can add/ignore fields on the mapping config files so that all the fields are mapped.
But I'm not sure whether it creates or not the data schema of new fields in the Magento2 database or they have to be created manually beforehand?
Thanks


texts: Admin grid back button being added twice

texts:
See example:

In My_Module_Block_Adminhtml_Audit_Productnoimage I have

<?php

class My_Module_Block_Adminhtml_Audit_Productnoimage
    extends Mage_Adminhtml_Block_Widget_Container
{
    /**
     * Add buttons
     *
     * @return void
     */
    protected function _construct()
    {
        parent::_construct();
        $this->addButton('back', array(
            'label'   => $this->__('Back'),
            'onclick' => "setLocation('{$this->getUrl('*/*/')}')",
            'class'   => 'back'
        ));
    }

    /**
     * Header text getter
     *
     * @return string
     */
    public function getHeaderText()
    {
        return $this->__('Products Without Images');
    }

    /**
     * Grid contents getter
     *
     * @return string
     */
    public function getGridHtml()
    {
        return $this->getChildHtml();
    }
}

I'm trying to track down where the second Back button is coming from but I can't figure it out.  For some reason it's being returned in the getChildHtml() above but before the grid.phtml content.  Has anyone encountered this before?


texts: Configurable product select single each group

texts:
I need to make a custom listing where collection of all product. I try to

$collection = Mage::getModel('catalog/product');
      $col=$collection->getCollection();
      foreach($col as $c){
         $collection->load($c->getId());
         echo $collection->getName().'('.$collection->getSku().')<br>';
      }

It's give me nice output when simple product, But configurable product then make major problem. It's show like

French Cuff Cotton Twill Oxford(msj000)
French Cuff Cotton Twill Oxford(msj001)
French Cuff Cotton Twill Oxford(msj002)
Slim fit Dobby Oxford Shirt(msj003)
Slim fit Dobby Oxford Shirt(msj004)
Slim fit Dobby Oxford Shirt(msj005)
Plaid Cotton Shirt(msj006)
Plaid Cotton Shirt(msj007)
Plaid Cotton Shirt(msj008)
Sullivan Sport Coat(msj009)
Sullivan Sport Coat(msj010)
Sullivan Sport Coat(msj011)

But I need like this

French Cuff Cotton Twill Oxford(msj000)
Slim fit Dobby Oxford Shirt(msj003)
Plaid Cotton Shirt(msj006)
Sullivan Sport Coat(msj009)

How can I do this?


texts: Kick off MAGMI via command line and login automatically

texts:
Is it possible to kick off MAGMI via the command line and have it automatically log into MAGMI (ie suppress the usual login prompt)

eg I'm invoking IE from a C# app and passing in:

http://localhost:1234/magmi/web/magmi_run.php?mode=update&profile=MyMAGMIProfile&engine=magmi_productimportengine:Magmi_ProductImportEngine&CSV:filename=../../data/upload/muk_000000045_price.csv

but it then comes up with the Login Prompt:

Can this prompt be avoided somehow?

[UPDATE]

From C# I've tried this:

...
            var str = "my password";
            var sc = new System.Security.SecureString();

            foreach (char c in str)
            {
                sc.AppendChar(c);
            }

            try
            {

                using (var process = Process.Start("IExplore.exe", "-nomerge " + completeURL, "maguser676", sc, ""))
                {
                    // Capture output...
                }
            }
            catch(Exception ex)
            {
            }
...

But raises an error saying that the user name or password is incorrect.


texts: Command line enable / disable static blocks

texts:
I would like to be able to enable and disable static blocks via the command line, is there a utility that provides this functionality.
My use case is to configure a cron job to periodically enable then disable a static block.


texts: Magento 2 Rest api POST JSON TypeProcessor error

texts:
Have a problem with Magento2 rest APIs. I try to import some data to DB table im my module. I wrote rest api, that gets a JSON array and insert it in database table, but when i try to send this array

cities.json:

 {
        "cities":
                    [
                        {
                            "id":7,
                            "name":"Kyiv",
                            "ref":"a9280688-94c0-11e3-b441-0050568002cf",
                            "area_ref":"7150813b-9b87-11de-822f000c2965ae0e"
                        },
                        {
                            "id":10,
                            "name":"Moscow",
                            "ref":"96b8d7a4-be42-11e3-9fa0-0050568002cf",
                            "area_ref":"7150813d-9b87-11de-822f000c2965ae0e"
                        },
                        {
                            "id":11,
                            "name":"London",
                            "ref":"f7062316-4078-11de-b509-001d92f78698",
                            "area_ref":"7150812b-9b87-11de-822f000c2965ae0e"
                        }
                    ]
    }

i've got an error:

  {"message":"Internal Error. Details are available in Magento log file.
  Report ID: webapi-580e2fd764b10"}

in log file:
exception.log

  Next Exception: Report ID: webapi-580e2fd764b10; Message: Notice:
  Array to string conversion in
  /home/workuser/Projects/magentov/vendor/magento/framework/Reflection/TypeProcessor.php
  on line 505 in
  /home/workuser/Projects/magentov/vendor/magento/framework/Webapi/ErrorProcessor.php:195
  Stack trace:
  /home/workuser/Projects/magentov/vendor/magento/framework/Webapi/ErrorProcessor.php(139):
  Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Exception))
  /home/workuser/Projects/magentov/vendor/magento/module-webapi/Controller/Rest.php(219):
  Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Exception))
  /home/workuser/Projects/magentov/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37):
  Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
  /home/workuser/Projects/magentov/vendor/magento/framework/App/Http.php(135):
  Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
  /home/workuser/Projects/magentov/vendor/magento/framework/App/Bootstrap.php(258):
  Magento\Framework\App\Http->launch()
  /home/workuser/Projects/magentov/pub/index.php(37):
  Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
  {main} [] []

I'me looked into TypeProcessor.php on 505 line. When i disable this if:

if ($value !== null && !settype($value[$key], $arrayItemType)) {
                    throw new SerializationException(
                        new Phrase(
                            'Invalid type for value: "%value". Expected Type: "%type".',
                            ['value' => $value, 'type' => $type]
                        )
                    );
                }

everything work fine. I'll get json by POST, decode it and insert all data into DB table, but how can i do it without changing TypeProcessor.php?

I send JSON by curl:

curl -X POST "http://magentov.dev/index.php/rest/V1/NP/cities" -H "Authorization: Bearer uoj2to52kkn46hmdw0m5gh0oax7uoed9" -H "Content-Type:application/json" -d '@cities.json'

Please, help me.


texts:
I have a collection of related configs that i would like to be retrieved as an array.  Using store config, i can't see that this is possible.

Fore example i want the following:

array('myvals' =>
    array('key1' => 'val1'),    array('key1' => 'val2', 'key1' => 'val3'),

)

But i want this to be managed via store config and retrieved via Mage::getStoreConfig('myvals');

Is this possible in anyway?


texts: Magento 2.3. Need to grant access to customer for using some APIs

texts:
I have gone through from regular authentication process as a customer and successfully used some Magento Rest APIs. Some APIs are working fine and some apis are returning responses like that;

Example: I need to get details of a specific product:

Endpoint: /V1/products/{sku}

Response: {
"message": "Consumer is not authorized to access %resources",
"parameters": {
    "resources": "Magento_Catalog::products"
}}

As admin, I can access these resources. But I need to access these resources as a customer.

I am using community edition of Magento 2.3.

I need to ask how can I grant access to customer and guest user of these resources.


texts: Forgot username and password after installing magento cms on my local server xampp

texts: I've forgot my admin username and password. what should i do, please help. when i click forgot password. and after enter email address. I've not get email on my gmail account, because of magento is being installed on my local server xampp. what should i do?.


texts: Using vagrant and vm for a magento localhost on windows 8.1

texts:
When i visit my localhost:8080 i get the standard page like so:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

How come i'm not landing on the magento install page for EE?

I've tried changing my config.xml and local.xml files numerous times, but i guess i'm confused on what it should be.

Here is my config.xml file

        <default_setup>
            <connection>
                <host>127.0.0.1:8080</host>
                <username/>
                <password/>
                <dbname>magento</dbname>
                <model>mysql4</model>
                <initStatements>SET NAMES utf8</initStatements>
                <type>pdo_mysql</type>
                <active>0</active>
                <persistent>0</persistent>
            </connection>
        </default_setup>

my db name is magento. this is correct.

local.xml

<config>
    <global>
        <install>
            <date>{{date}}</date>
        </install>
        <crypt>
            <key>{{key}}</key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix>{{db_prefix}}</table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host>{{localhost}}</host>
                    <username>{{user}}</username>
                    <password>{{**********}}</password>
                    <dbname>{{magento}}</dbname>
                    <initStatements>{{db_init_statemants}}</initStatements>
                    <model>{{db_model}}</model>
                    <type>{{db_type}}</type>
                    <pdoType>{{db_pdo_type}}</pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
        </resources>
        <session_save>{{session_save}}</session_save>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName>{{admin_frontname}}</frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

my windows host file:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
#   ::1             localhost

when i'm in vagrant ssh and i go to etc/hosts

Here is what my file looks like:

vagrant@precise32:/etc$ cat hosts
127.0.0.1       localhost
127.0.1.1       precise32

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

The page i want to run magento off is this: localhost:8080

How do i edit the above to fix that... sorry for all the questions.


texts: Magento 2.1: Change increment ID for new orders

texts: Is there any way to change increment ID for new orders. For example if current last order ID is 1000. But for new orders, I want to start it from 1020


texts:
I am trying to set up a child theme of Luma but it's not appearing in the Admin area. I have checked I have it set up correctly, I think I have. Main area I'm worried about is that the original Luma files are in vendor/magento/theme-frontend-luma and I have set up the child theme in app/design/frontend. Does this make a difference? Should I be setting the child theme up in vendor also?
Files are as follows:
app/design/frontend/Mytheme/luma_child/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Luma Child</title>
    <parent>Magento/luma</parent>
    <media>
        <preview_image>media/preview.png</preview_image>
    </media>
</theme>

app/design/frontend/Mytheme/luma_child/registration.php
<?php \Magento\Framework\Component\ComponentRegistrar::register(\Magento\Framework\Component\ComponentRegistrar::THEME, 'frontend/Mytheme/luma_child', __DIR__);

app/design/frontend/Mytheme/luma_child/composer.json
{
    "name": "Mytheme/theme-frontend-luma-child",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0",
        "magento/luma": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

Within Mytheme/luma_child I also have web folder with css, image, fonts and js folders, just copied from the vendor luma folder.
I have run composer update and magento setup:upgrade and a variety of other command line operations over the last few days since I set this up and it hasn't appeared.
What am I missing? Thanks!


texts: rewrite ` Magento\Catalog\Model\ResourceModel\Product\Collection` showing error `Select' not found`

texts:
I am trying to override the class Magento\Catalog\Model\ResourceModel\Product\Collection

On overwrite class, i got the error

  Fatal error: Class
  'AmitBera\CoreRewrite\Model\Rewrite\Catalog\ResourceModel\Product\Select'
  not found in
  /var/www/html/magento215sample/vendor/magento/framework/Code/Generator/EntityAbstract.php
  on line 333

I  have tried to call $this->getSelect() at a function of overwrite class

<?php
namespace AmitBera\CoreRewrite\Model\Rewrite\Catalog\ResourceModel\Product;

class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
{

    protected $appState;
    public function __construct(
        \Magento\Framework\Data\Collection\EntityFactory $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        \Magento\Eav\Model\Config $eavConfig,
        \Magento\Framework\App\ResourceConnection $resource,
        \Magento\Eav\Model\EntityFactory $eavEntityFactory,
        \Magento\Catalog\Model\ResourceModel\Helper $resourceHelper,
        \Magento\Framework\Validator\UniversalFactory $universalFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Module\Manager $moduleManager,
        \Magento\Catalog\Model\Indexer\Product\Flat\State $catalogProductFlatState,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory,
        \Magento\Catalog\Model\ResourceModel\Url $catalogUrl,
        \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\Stdlib\DateTime $dateTime,
        \Magento\Framework\App\State $appState,
        \Magento\Customer\Api\GroupManagementInterface $groupManagement,
        \Magento\Framework\DB\Adapter\AdapterInterface $connection = null
    ) {
        parent::__construct(
                $entityFactory,
                $logger,
                $fetchStrategy,
                $eventManager,
                $eavConfig,
                $resource,
                $eavEntityFactory,
                $resourceHelper,
                $universalFactory,
                $storeManager,
                $moduleManager,
                $catalogProductFlatState,
                $scopeConfig,
                $productOptionFactory,
                $catalogUrl,
                $localeDate,
                $customerSession,
                $dateTime,
                $groupManagement,
                $connection
            );
        $this->_appState = $appState;

    }

   public function setOrder($attribute, $dir = Select::SQL_DESC)
   {

    /* gettign the error at getSelect() */
    echo $this->getSelect()->__toString();
    exit;

    if ($attribute == 'sort_by_stocks'){
            $select =$this->getSelect();
            $select->joinLeft(
                array('stock_qty' => $this->getTable('cataloginventory/stock_status')),
                'e.entity_id = stock_qty.product_id AND stock_qty.website_id='.$this->_storeManager->getStore()->getWebsite()->getId(),
                array(
                    'salable' => 'stock_qty.stock_status',
                    'qty' => 'stock_qty.qty'
                )
            );

            $reverseDir = ($dir == 'ASC') ? 'DESC' : 'ASC';
            //this is optional - it shows the in stock products above the out of stock ones independent if sorting by position ascending or descending
           $this->getSelect()->order('salable DESC');

            return $this;
     }else{
        return parent::setOrder($attribute,$dir);
     }

   }
}

Question:

Why i am getting the error 'Select' not found when call at $this->getSelect()  but at parent class  $this->getSelect()exits but At rewrite class why we are not able to call on rewrite class`


texts: Shipping Table rates Weight vs Destination Ranges

texts:
I have this CSV

I have imported it into Store->Configuration->Sales->Shipping Methods->Table Rates successfully

But when I buy an item weighing 60 kg and the shipping address is Sevilla, shows me the price of the first row (11,00 €) instead of the second (25,00 €)

Can you help me, please?


texts: Magento 2 GetFinalPrice issue to fetch correct price

texts: When passing the Id of Simple product then it's working fine but when passing the Id of child product then it's not working, It will not show the correct price of the product


texts:
I've installed magento extension IWD OnePageCheckout on my site. All links leading to checkout are properly redirecting to onepage checkout. However the link in the header cart is still linking to old checkout page. When I checked topcart.phtml page, I found this code written in it for cart page:

 <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>

        Total <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?><?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?> / <?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?><?php endif; ?>
        <button class="checkout" onclick="setLocation('<?php echo $this->getCheckoutUrl ?>')"><?php echo $this->__('Checkout') ?></button>

<?php endif ?>

I think the onclick="setLocation('<?php echo $this->getCheckoutUrl ?>')" part is causing the problem here. What should I write here so that it also properly redirects to One Page Checkout, instead of the default checkout page.


texts: How to securely upgrade from 1.6.x to 1.9.3.1

texts:
A customer asked us today if we can update his Magento 1.6.x system.

I'm afraid that it is a little more different then updating from 1.9.x to 1.9.3.1.

What do I need to take care of? Are there any Database upgrades I need to do before? Or can I simply put the new files just on top of the former installation?


texts: How to save customer in database after billing info step on onepage checkout?

texts:
I would like to save customer in database, when someone filled billing information and hit the 'continue' button. Does anyone know how to do it?
I am using magento 1.9.2 and i tried with event "controller_action_postdispatch_checkout_onepage_saveBilling" but its not working over there, nothing happen with event or observer.
After saving customer in database i would like to logged in with that customer id, and need to refresh the page, or any other way is welcomed.
I would like to know how to do this ? if any idea please share here.
code as below :

  create Utsav_Customersave.xml in app/etc/modules/

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

  in app/code/local/Utsav/Customersave/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
    <Utsav_Customersave>
        <version>1.0.0</version>
    </Utsav_Customersave>
</modules>
<global>
    <events>
        <sales_quote_address_save_after>
            <observers>
                <auto_register_shipping>
                    <type>singleton</type>
                    <class>Utsav_Customersave_Model_Observer</class>
                    <method>autoRegisterBilling</method>
                </auto_register_shipping>
            </observers>
        </sales_quote_address_save_after>
    </events>
</global>
</config>

  in app/code/local/Utsav/Customersave/Model/Observer.php

<?php
class Utsav_Customersave_Model_Observer {

    public function autoRegisterBilling($evt){
        if(!Mage::helper('customer')->isLoggedIn()){
            $data = $evt->getEvent()->getControllerAction()->getRequest()->getPost('billing', array());
            $customer = Mage::getModel("customer/customer");
            $email = $data['email'];
            $websiteId = Mage::app()->getWebsite()->getId();
            $store = Mage::app()->getStore();
            $pwd = $data['customer_password'];
            $customer->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);

            if (!$customer->getId()) {
                 //Code begins here for new customer registration
                $customer->website_id = $websiteId;
                $customer->setStore($store);
                $customer->firstname = $data['firstname'];
                $customer->lastname = $data['lastname'];
                $customer->setEmail($email);
                $customer->setPassword($pwd);
                $customer->sendNewAccountEmail('confirmed');
                $customer->save();
                   }
           }
    }
}


texts: I'm looking for a module that can create good reports for orders and order items: revenue, totals for payments and costs, total items, missing values, per year or month, per shop, etc. Which modules can do this?


texts: How can I use partial (code block) in multiple templates?

texts:
I have a specific block of code which is a newsletter subscription form with a script. I have to use this code on multiple templates.

Currently I am using it on these two templates

app\design\frontend\base\default\template\fekete\Newsletter2Go\customer\form\newsletter.phtml
app\design\frontend\base\default\template\fekete\Newsletter2Go\subscribe.phtml

-

<!-- Partial A -->
<form id="subscribe" ...>
    <input ...>
</form>
<script>
  ...
</script>

Of course I could just copy & paste this code to all needed templates. But the maintenance effort would be extremly high if I would have to edit the code, because I would need to edit it in all templates.

Is there a way to save that code block and use it in multiple templates?


texts: Magento Update to 2.3.3 backend after login Specified invalid parent id Magento_Analytics

texts:
i have a problem while upgrading Magento from 2.3.2 to 2.3.3. The update works fine and i have all done which mentioned here: https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html

After it, Magento Backend dont work correctly. The Loginform can be loaded but after login there comes an error:

  There has been an error processing your request

  Exception printing is disabled by default for security reasons.

  Error log record number: 1078057989546

The Erorr Log says:

  {"0":"Specified invalid parent id (Magento_Analytics::business_intelligence)","1":"#1 Magento\Backend\Model\Menu\Builder\Interceptor->___callParent('getResult', array(&Magento\Backend\Model\Menu#000000005d9d073500000000399c9a80#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]\n#2 Magento\Backend\Model\Menu\Builder\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Backend\Model\Menu#000000005d9d073500000000399c9a80#) called at [vendor/magento/framework/Interception/Interceptor.php:153]\n#3 Magento\Backend\Model\Menu\Builder\Interceptor->___callPlugins('getResult', array(&Magento\Backend\Model\Menu#000000005d9d073500000000399c9a80#), array(array('SetupMenuBuilder'))) called at [generated/code/Magento/Backend/Model/Menu/Builder/Interceptor.php:26]........

i dont really know why, when i switch to 2.3.2 it works fine. Frontend works in both Versions fine, only backend in 2.3.3 have this issue. Update done with composer.

Do someone knows how to fix it?

Thanks for any help.


texts: Magento2 What's the point of having both InstallSchema and UpgradeSchema

texts:
If UpgradeSchema/UpgradeData are executed when installing and upgrading a module what's the point of having InstallSchema/InstallData (besides just having a well-named file that is only executed once). We could handle the install part in the Upgrade file as well - we could check !$context->getVersion().

This raises another question about the correct workflow for the lifetime of a module.

Do we create the Install* script only once and then never change it? I've seen third party modules changing this file between versions. In that case I assume they also track the same changes in Upgrade* (hence duplicating code).

Am I missing something here?
Thanks!

UPDATE: I understand the role of each file and the differences between Schema and Data. I'm interested to find out about best practices. My understanding is we're allowed to update Install* as long as the module is in development but once it's made public we're not allowed to change this file ever again. From that point on we should only use versioned Upgrade* scripts. Is this correct?


texts: Magento 2 how to stop decreasing stock qty while placing an order in magento 2 via REST API

texts:
how to stop decreasing stock qty while placing an order in Magento 2 via REST API
Which plugin or which observer we have to use to stop decreasing stock qty?
I am using event "checkout_submit_all_after"
events.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
     <event name="checkout_submit_all_after">
        <observer name="stop_decrease_qty" instance="CompanyName\ModuleName\Observer\StopDecreaseQty"/>
    </event>
</config>

StopDecreaseQty.php
<?php
namespace CompanyName\ModuleName\Observer;
class StopDecreaseQty implements \Magento\Framework\Event\ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
       /** @var \Magento\Quote\Model\Quote $quote */
       $quote = $observer->getEvent()->getQuote();
       $quote->setInventoryProcessed(true); //not effect inventory
       return $this;
    }
}

But it is not working


texts: Magento 2: Top Nav Menu is not appearing in Home Page

texts:
As the title. I've installed a fresh Magento CE 2.1.7

Opted out from installing sample data (no sample data)
Luma theme is selected by default (Luma logo appears)

Steps made:

Created a subcategory as sub-child of Default Category
Made sure both Default Category and subcategory are enabled from Admin >> Products >> Categories:

Enable Category = Yes

Include in Menu = Yes
Display Setting for category

Anchor = Yes

Make sure Default Category is selected from Admin >> Stores >> All Stores >> Main Website Store

Root Category = Default Category (selected from the drop-down)
I ran the following commands to clean cache and reindex:

    php bin/magento indexer:reindex;
    rm -R pub/static/*;
    rm -R var/view_preprocessed/*;
    php bin/magento cache:flush;
    php bin/magento cache:clean;

Purged and disabled Varnish cache on the server level
Restarted Apache
Upgraded Magento CE from 2.1.7 to 2.1.9

Expected result:

To see top navigation menu in all pages

Actual results (menu shows on all pages except home page):

Top navigation menu does not appear on Home Page

Picture 1. Homepage. Menu not showing:

Top navigation menu, however, appears correctly on other pages such as Customer Login and Create New Customer Account pages

Picture 2. Create a new customer account page. The menu is showing:

I feel like I'm missing something obvious just under my nose.

How to display the top navigation menu on the home page?


texts: Magento 2 : Wrong order created and updated date in rest api response

texts:
I am fetching the orders using Magento 2 REST api services. I am using IST timezone the dates saved in the database are in correct timezone. I have set timezone to "Asia/Kolkata". On customer dashboard and in admin panel orders pages dates are getting displayed in IST. But when I fetch the order using the REST api I am getting the dates in UTC timezone.

"created_at": "2017-08-11 06:04:18" this is what I am getting for created at in response.

2017-08-11 11:34:18 this is what the actual time is saved in database.

Can someone help me here to get the created time in correct timezone?


texts: Module developement update composer config

texts: During module developement (module is palced in app/code) after adding new package to composer.json, how can i make magento to install that package ?


texts: magento email template format for contact page comment text area field

texts:
In my webshop I have contact form and it is submitted successfully, but Comment text area field content show in one line. Suppose customer write like this(with line break) -

Hello, I would like to get a price for the product XY.

I am using this code

{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}

Please tell me what i do ?


texts: How to get a Product ID after a product post via REST api to update product category

texts:
I want to insert products from a csv-file into the Magento DB via the REST API.
First I try to update one single product.

The product is inserted into the db but this product needs to be assigned to a category.

How do I get the productID from the result?

// post method
$restClient->setMethod('POST');
$restClient->setRawBody(json_encode($data));

//Make REST request
$response = $restClient->send();

Because I have to make another call for the catagory.

$restClient->setUri($apiURL . '/products/' . $id . '/categories');
$restClient->setRawBody(); //will be filled with the categoryID

When I dump the $response, the content is protected and gives me a lot of questionmarks.
When I say: var_dump($response->getBody());
The body is empty = ''

I don't think it would be necessary to make another call for getting the last product update/insert


texts: Magento 2 File Permissions after Deploying live and in production mode?

texts:
What should be file permissions in Magento 2 after deploying website to live and website is in production mode.

I have read many forums and found that the file permissions of folders generated,var and pub should be 777 but in Magento 2 documentations it is different.This create a little bit confusion so please let me know if anyone have idea about this.

When you are ready to deploy your site to production, you should remove write access from files in the following directories for improved security:

vendor
app/code
app/etc
lib
pub/static
Any other static resources
generated/code
generated/metadata
var/view_preprocessed

https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html

We are getting issue that permissions changed automatically to root and website stopped to work.We are not able to run the Magento command without sudo.

Currently we are having ubuntu user and www-data group.

Please share your thoughts how to run Magento command without using sudo in details.We are using AWS server.

I have followed answer of this question but still permission are changed for cache and page_cache folder.It is still creating with user www-data.


texts:
I'm trying to display tier pricing on the cart page. I followed this: Magento display tiered pricing for each product on cart page

It works but the thing is that, what every product is shown first in the cart i.e. the one on top position,  all the rest get the same tier pricing, it just repeats the first position tier price to any other products added to the cart.

What is making it repeat the tier price to the rest of the products and how can I fix it?


texts: Magento2 - How to get product additional options from quote_items_options using product id

texts:
I have successfully saved product additional options in "quote_items_options" table .
Now I want to retrieve those options using product_id.

Can anyone help me how can I get additional options?

Thanks in advance..!


texts: Magento 2 how to add new custom price type in the Customizable Options?

texts:
I would like to create a new custom option price type for the products in the 'Customizable Options' section. Could you please help me out how to add? Is it a possible to add this in Magento 2.x ? if possible could you please explain how to add.

Please find the below screenshot:


texts: Magento fetch product description in tabs via Ajax

texts: I want to fetch the product description via Ajax in Magento product details page. Please guide me how I can do it. I am using Magento CE 1.7


texts: Magento 2 How to remove menu item in admin portal?

texts: There are some menu items that are unnecessary for us. How can I remove them? Thanks.


texts: Decrease TTFB on Magento 1.9 store with 600k SKUs

texts:
We recently have jumped our total number of SKUs from ~5,000 to ~600,000 on our Magento 1.9 store. There will be a chance for us to increase these numbers in the near future, but we need to nail down fixes for our performance issues first.

Currently we're hosting our PHP on an AWS instance with Cpanel installed. Our database is contained by itself on an RDS T2.Large instance (8gb RAM 2vCPU).

We get about 100-200 pageviews per day but this will probably increase quite a bit, but when a customer does a search they're getting TTFB times of around 5 seconds.

What sort of specs do we need to get a faster performing database with this total number of SKUs? This is a question that assumes total traffic to the site will not increase.

What are the questions I should be asking to get the answers I need?

Are there any case studies available for Magento 1x websites that had roughly this amount of SKUs or more?


texts: Cron Task Scheduler Issue - Last heartbeat is older than x minutes

texts:
We are using AOE cron scheduler from Fabrizio Branca. My scheduled tasks are loading, cron working fine etc. When I look at the timeline or list view, the jobs are loading successfully. But all of a sudden we are seeing the error message:

Last heartbeat is older than 37 minutes for example.

So the heartbeat scheduled task is not running at all currently. Any ideas how to begin debugging to try to work out the cause? I have looked at the log files which are giving no clues. I can manually run the task, but that is obviously not a solution. Any advice or ideas would be appreciated. Thanks.


texts: Where can I find Magento 2 product view page?

texts: I want to change my product list view. But I can't find the file . I used sm himarket theme anyone have idea where I need to change?


texts: Plugin intercept before place order for PayPal method on Magento2

texts:
In my Magento2 instance, I created a Plugin interceptor for run custom validation before process the payment. Works for all payment methods but PayPal Express or PayPal Standard.

di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Quote\Api\CartManagementInterface">
        <plugin name="myvalidation_before_order_place" type="Myvendor\Myvalidation\Plugin\MyvalidationBeforePlaceOrder" sortOrder="1" disabled="false" />
    </type>
</config>

MyvalidationBeforePlaceOrder.php

class MyvalidationBeforePlaceOrder
{
    public function __construct(
        // my construct
    ) {
        // my construct
    }

    public function beforePlaceOrder(CartManagementInterface $subject, $cartId, PaymentInterface $paymentMethod = null)
    {
        // my custom validation logic
        throw new PaymentException(__('TEST'));
    }
}

Looks like Magento2 PayPal module ignore Magento\Quote\Api\CartManagementInterface

Ideally, when customer click on "Place Order" button in checkout, Myvalidation script should be executed and then the payment processed (in the case of PayPal, execute Myvalidation then redirect to PayPal website). Any suggestion of which interceptor should I use?


texts: Bundle Products not adding to the cart in magento1.9.1.0

texts:
I am tackling with a strange problem in magento 1.9.1.0, the bundle products in my magento store are not being added to the cart instead when I click on the 'Add To Cart' button it's showing-

  Error 503 Service Unavailable

  Service Unavailable Guru Meditation:

  XID: 2050290084

  Varnish cache server

All the other types of products are working fine and being added to cart normally. There's a paypal checkout button on my product view page also which is also showing the same 503 error, so i checked the form but that just looks same as the others on simple or configurable products. When I used the same theme on localhost fresh installation it just worked fine and every product or even bundle product is being added to the cart.

I searched over internet regarding this error and implemented almost every way to resolve it, i disabled shopping cart rules, changed my bundle.xml with the default one, disabled other extensions, checked my view page but none of these helped. I have also installed Mgt Commerce Varnish in my magento, may be that's generating the error. Hence I am not much familiar with the varnish, so I am not so sure about that.

So please somebody help me in resolving this issue.

Thanks


texts: When saving a customer via the admin, the created_at value of all its addresses change

texts:
When saving a customer from the admin, the created_at value of all the addresses belonging to the customer are changed by a number of hours.

The number of hours that the created_at value changes depends on the configured timezone for the store:

When using Pacific Standard Time (America/Los_Angeles), which is UTC/GMT-7, the created_at value is increased by 7 hours on each save.
When using W.Europe Standard Time (Europe/Berlin), which is UTC/GMT+2, on each customer save, the created_at value is decreased by 2 hours on each save.
When using UTC (Etc/GMT), the created_at value stays the same on each save.

What could be the cause of this?


texts: Magento 2 data migration triggers table missing in M1

texts:
We have successfully migrated data from M1 to M2 using the data migration tool. We have a custom table called  md_cybersource which is mapped to magedelight_cybersource in map.xml

When we run delta migration getting below error message

' Base table not found 1146 table m1_compressed.m2_cl_md_cybersource'  doesn't exist query was m2_cl_md_cybersource where ('processed'=1)

Base table view not found 1146 table m1_compressed.m2_cl_md_cybersource doesn't exit'

Observation is Searched trigger table in M1 which is not created. Please suggest or advise how to fix & why it is happen?


texts: Magento Paid user registration for Customer Group

texts:
I have different types of Customer group (General, School, Publisher, Corporate). Customer select our Customer group on registration page from frontend.

But I need charge some amount ($100) when customer register as Publisher.

Please give any suggestion that how to implement.

Thanks.


texts: How to use checkbox from product/edit page on Magento configurationn page?

texts:
I want to use such checkbox instead of Yes/No select in magento 2 module configuration:

How can I achieve this? Maybe there is some tutorial?


texts:
I've translated the string "Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please click here." in app/locale/it_IT Mage_Customer.csv

"Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.","Conferma account richiesto. Per favore, controlla la tua e-mail per il link di conferma.. Per rinviare l\'email di conferma  clicca qui."

But I still get it in english...
As far as I see it's the only string that I don't get translated in italian, why is that?


texts: Order stuck on processing - how to set order status to complete manually

texts:
One order is still set to "processing" although the payment was captured and received by authorize.net. I did some research and learned that a shipment and an invoice must exist before an order can be set to "complete".

In my case the invoice was missing. I creatd an invoice manually in backend but when I hit the "capture" button I did get following error:

Credit Card: xxxx-1234 amount $10.89 capture - failed. Authorize.Net Transaction ID 1234567890. Gateway error: The transaction cannot be found.

This is odd because the payment went already through. So I even don't want to capture the payment again. But I also can't set the status to complete in backend.

What do you suggest in this case?

I could set the status to "complete" by running following queries - but I feel like its not the best way to get it fixed.

UPDATE sales_flat_order SET state = 'completed', status = 'completed' WHERE increment_id IN (1234567);
UPDATE sales_flat_order_grid SET status = 'completed' WHERE increment_id IN (1234567);

Thanks!


texts: Magento 1.9.3.8 bug: Random address in order

texts:
In my Magento 1.9.3.8 installation. The following happens:
1. Customer signs in
2. Places item in cart, go to checkout, and chooses an address from the address book. Place order.
3. In the confirmation e-mail, and in the Magento back-end, the name and address of another random customer is used. (only the e-mail address is right)

How is this possible? And how can we solve this?

We have very minimal customizations and extensions. We had recently a lot of spam customer account registrations which we have removed manually. (Now we have enabled the captcha so the spam customer account registration is solved. )


texts: I have products using the same URL Keys and I need a way to remove all of the URL Keys, so Magento regenerate them all according to their names.


texts: How To Open Model Ui Grid Action Click Magento2?

texts: I want Open Modelbox on UI grid action click based on that I want to edit my from in model box so how to achive that functionality ?


texts: Any decent client friendly CMS for Magento 2?

texts:
I've got a client who really wants to manage things like copy, text, some images of their CMS pages (home page, about, etc). Currently they're all built in static blocks but editing these is very far removed from the actual design of the page and in the end they're still editing HTML which means they can destroy the site if they make a mistake.

Ideally, we'd have a section for each CMS page where every editable string, image etc is it's own form field - either textarea, file upload, etc. The homepage may have 25-30 editable elements.

Are there any good solutions for this? I've looked at wordpress integration's but they would require us to build this system in wordpress using custom fields etc and that doesn't feel that great considering we'd then have to maintain an entire wordpress install and integration.

Really appreciate any advice or suggestions!!!