texts: why is Magento 2 semantic versioning at 100?

texts:
I am using Composer to install Magento 2 and I've noticed that all packages are starting with 100. According to semantic versioning rules, Magento 2 packages should be at version 2.x.x something.

Right?

Package operations: 257 installs, 0 updates, 0 removals",
    - Installing magento/magento-composer-installer (0.1.12): Downloading (100%)",
    - Installing zendframework/zend-stdlib (2.4.13): Downloading (100%)",
    - Installing zendframework/zend-validator (2.4.13): Downloading (100%)",
    - Installing zendframework/zend-escaper (2.4.13): Downloading (100%)",
    - Installing zendframework/zend-uri (2.4.13): Downloading (100%)",
    - Installing zendframework/zend-loader (2.4.13): Downloading (100%)",
    - Installing zendframework/zend-http (2.4.13): Downloading (100%)",
    - Installing symfony/process (v2.8.26): Downloading (100%)",
    - Installing magento/framework (100.1.8): Downloading (100%)",
    - Installing magento/framework-foreign-key (100.1.3): Downloading (100%)",
    - Installing magento/framework-message-queue (100.1.3): Downloading (100%)",
    - Installing justinrainbow/json-schema (1.6.1): Downloading (100%)",
    - Installing magento/module-media-storage (100.1.2): Downloading (100%)",
    - Installing magento/module-config (100.1.5): Downloading (100%)",
    - Installing magento/module-backend (100.1.3): Downloading (100%)",
    - Installing magento/module-require-js (100.1.3): Downloading (100%)",
    - Installing magento/module-translation (100.1.3): Downloading (100%)",
    - Installing magento/module-theme (100.1.6): Downloading (100%)",
    - Installing magento/module-directory (100.1.4): Downloading (100%)",
    - Installing magento/module-store (100.1.6): Downloading (100%)",
    - Installing magento/module-ui (100.1.6): Downloading (100%)",
    - Installing magento/module-user (100.1.3): Downloading (100%)",
    - Installing magento/module-email (100.1.4): Downloading (100%)",
    - Installing magento/module-variable (100.1.2): Downloading (100%)",
    - Installing magento/module-authorization (100.1.2): Downloading (100%)",
    - Installing magento/module-eav (100.1.6): Downloading (100%)",
    - Installing magento/module-catalog (101.0.8): Downloading (100%)",
    - Installing magento/module-quote (100.1.5): Downloading (100%)",
    - Installing magento/module-catalog-inventory (100.1.6): Downloading (100%)",
    - Installing magento/module-page-cache (100.1.3): Downloading (100%)",
    - Installing magento/module-url-rewrite (100.1.3): Downloading (100%)",
    - Installing magento/module-cms-url-rewrite (100.1.2): Downloading (100%)",
    - Installing magento/module-cms (101.0.6): Downloading (100%)",
    - Installing magento/module-catalog-url-rewrite (100.1.4): Downloading (100%)",
    - Installing magento/module-import-export (100.1.4): Downloading (100%)",
    - Installing magento/module-security (100.1.3): Downloading (100%)",
    - Installing magento/module-customer (100.1.7): Downloading (100%)",


texts: Want to remove a specific url from Magento sitemap.xml?

texts:
Want to remove a specific url from default magento sitemap.xml

I don't want this url http://www.globekart.com/coupon-partners.html in the sitemap http://www.globekart.com/sitemap/sitemap.xml

Please help


texts:
when I create cron job and run it
It shows me error at cron task whick

  Zend\Mail\Message::addTo expects a string, AddressInterface, array,
  AddressList, or Traversable as its first argument; received "NULL"

kindly help me if any know about this .


texts:
I am trying to show the short description in list.phtml.htm, I have put this code list.phtml

<?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>

The sort description shows in the view.phtml

Any ideas how I can fix this


texts: How to getId using url dynamically in magento2

texts:
I want to getId using url.But this code only get static urlKey.How to get urlKey dynamically using below code.....

$categoryFactory = $objectManager->create('Magento\Catalog\Model\ResourceModel\Category\CollectionFactory');
            $category = $categoryFactory->create()
                    ->addAttributeToFilter('url_key', 'bags')
                    ->addAttributeToSelect(['entity_id']);
            $id = $category->getFirstItem()->getEntityId();


texts: Magento getCollection not returning all products

texts:
I have a file that I am using to call all magento products which makes some calculations and then saves the result as an attribute. The issue I am having is that only about half of the products are being called.

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

I have tried a few variations of this such as adding store id filter, calling them based on category and removing the select all part. I am really stumped with this now and I can't figure out why only certain products are called. The only thing I have noticed is that of the products that don't get called, they all seem to be simple products. This isn't to say that no simple products get called though

Additional info

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


texts: How to get the shipment number of an order item?

texts:
Once an order is placed, I programmatically generate associated shipments (because of different manufacturing time on my products)

I can then have for a single order several associated shipments:

ex:

Shipment #100000110 in 2 days for items 1 and 2
Shipment #100000111 in 5 days for item 3

I would like to access the shipment number associated to specific item :

something like :

$order = Mage::getModel('sales/order')->load($_order_id);
$_items = $order->getAllItems();

foreach ($_items as $_item)
{
    $ciid = $_item->getId();
    $shipmentNbr = $_item->getShipment()->getIncrementId();
    ...
}

Thank your for your help,


texts: Wishlist is empty even after adding an item

texts:
If i add an item to wishlist i am getting "the item has been added to your Wish List. Click here to continue shopping." and below this message Am getting this "you have no items in your wish list."

I have tried clearing the cache everything but still not working.


texts: Magento add ordered item name and sku in same grid column

texts:
I need to add items details in to the order grid. These details (item name and sku) should display in one column. I added the below code in to the collection:

->addExpressionFieldToSelect(
    'products',
    '(SELECT GROUP_CONCAT(\' \', x.name, \' \', x.sku)
                        FROM sales_flat_order_item x
                        WHERE {{entity_id}} = x.order_id
                            AND x.product_type != \'configurable\') SEPARATOR ""',
    array('entity_id' => 'main_table.entity_id')
)

That is working fine. But if there are more than one item in an order, I need to display them with a <br /> (in a new line, but same column). Also should add a separator (-) in between sku and name.

Example:
in column one order item details should display as below:

Product 1 - sku 1
product 2 - sku 2
product 3 - sku 3

Can anyone please help me how to do that task. Thank You so much.


texts: Toggle input field of an admin form required and not required by javascript Magento2

texts:
I am trying to make a field mandatory/not mandatory through javascript in Magento2, but it's not working. Can someone please suggest?

define([
'underscore',
'uiRegistry',
'Magento_Ui/js/form/element/select',
'Magento_Ui/js/modal/modal'
], function (_, uiRegistry, select, modal) {
'use strict';

return select.extend({

    /**
     * On value change handler.
     *
     * @param {String} value
     */
    onUpdate: function (value) {

        var field1 = document.getElementsByName("staging[end_time]")[0];
        if (value === 1) {
            field1.classList.add("required");//not working
        } else {
            field1.classList.remove("required"); //not working
        }

        return this._super();
    },
});
});


texts: Plugin always breaks the core Flatrate Shipping method

texts:
I have created a plugin to customize the Flatrate shipping(per order) when a guest checks out any product.

Below are my relevant module-plugin files which I supposedly wrote as per Magento 2.x's coding standard(Magento 2.3.4 installed in Windows 10 with some minor path related tweaks):

app/code/MyLearning/CustomFlatrate/registration.php:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE, 'MyLearning_CustomFlatrate', __DIR__
);

app/code/MyLearning/CustomFlatrate/Plugin/Flatrate.php:

<?php

namespace MyLearning\CustomFlatrate\Plugin;

class Flatrate
{
    protected $_customerSession;

    public function __construct(\Magento\Customer\Model\Session $customerSession)
    {
        $this->_customerSession = $customerSession;
    }

    /**
     * Returns shipping price
     * @param string $shippingPrice
     * @return string
     */
    public function afterCollectRates($result)
    {
        if (!$this->_customerSession->isLoggedIn()) {
            $this->debugLog($result->debug());
        }
        return $result;
    }

    public function debugLog($string)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        return $logger->info($string);
    }
}

app/code/MyLearning/CustomFlatrate/etc/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\OfflineShipping\Model\Carrier\Flatrate">
        <plugin name="customFlatrate" type="MyLearning\CustomFlatrate\Plugin\Flatrate"/>
    </type>
</config>

app/code/MyLearning/CustomFlatrate/etc/module.xml:

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="MyLearning_CustomFlatrate" setup_version="1.1.0">
        <sequence>
            <module name="Magento_OfflineShipping"/>
        </sequence>
    </module>
</config>

It has been quite sometime, I restarted working in Magento 2, so I can't get my head around, what's going on when I enable my plugin and add product to cart and apply the necessary param-values like state, zipcode, country for getting flatrate shipping rates, but if my plugin is not disabled, then it doesn't load flatrates and asa(as soon as) I disable my plugin, it loads the flatrate.

Can anyone help out understanding where the $result's value is going wrong, such that it doesn't bring the flatrates at all ?


texts:
This new product type will contain parent informations of other products.
These products are only for internal use, so I only need to add attributes and a new type of relation to other products, like Up-Sells, Cross-Sells.
All other default informations like prices, description, etc. are not needed.

What is the best way to create this product type.

Christian


texts: I just want a file upload code in magento 2

texts:
I already sent the file from phtml to controller and in the controller, I need to save that file into a directory
here are HTML and PHP code

    <form class="myformdynamic" onsubmit="return Validate()" method="post" action="<?php echo $this->getUrl("helloworld/index/result");?>"  enctype="multipart/form-data">

    <input type="file" id="profileAdd" name="profileAdd">

     <button type="submit" id="btnsave" class="action submit primary">
       Save
     </button>
    </form>

  Here is my code Result.php controller in another file

    <?php
    namespace Inchoo\Helloworld\Controller\Index;
    use Magento\Framework\Controller\ResultFactory;
    use Magento\Framework\App\Action\Action;
    use Magento\Framework\App\Action\Context;
    class Result extends Action
    {
     public function execute()
        {
       $fileName=['profileAdd']['name'];
    echo $fileName;
    //name of the file is printed which i uploaded from form


texts:
I have my store config value as below

Mage::getStoreConfig('passwordmeter/validation/is_contain_special_character');

How can I Call this value in javascript variable or loop??


texts: How to call Most Viewed code in Listing page?

texts:
I got Most Viewed extension from Magento Connect. Now I want to write code as shown in screenshot. By default Most Viewed code is called in Home Page but I want to show in Listing page.

Here I added attribute i.e most-viewed in Manage Attribute (in admin)


texts:
Position sorting does not work.

Whatever I specified values in position on the front is always displayed in the same sequence.

  admin

  front


texts: Checkout Totals Sort Order not visible in my magento admin panel

texts: I can't see 'Checkout Totals Sort Order' (https://docs.magento.com/m2/ce/user_guide/sales/checkout-totals-sort-order.html) option under sales tab in my magento 2.3 admin panel


texts: Invoice Date sets to 1 Jan 1970 when set to "Paid"

texts:
Does anybody please know why some invoices on Magnento 1 are automatically reverting to 1 Jan 1970 for the purchase date and due payment date when they are set to paid?

Many thanks in advance


texts: How to change assigned group of a custom product attribute?

texts:
I have a custom product attribute which is under Advanced Pricing group . I am trying to change attribute group of this attribute via data patch using below code :

<?php

namespace Vendor\Module\Setup\Patch\Data;

use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchInterface;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class UpdateCustomAttributeGroup implements DataPatchInterface
{

    /**
     * @var EavSetupFactory
     */
    private $eavSetup;
    /**
     * @var ModuleDataSetupInterface
     */
    private $moduleDataSetup;

    public function __construct(
        EavSetupFactory $eavSetupFactory,
        ModuleDataSetupInterface $moduleDataSetup
    )
    {
        $this->eavSetup = $eavSetupFactory;
        $this->moduleDataSetup = $moduleDataSetup;
    }

    /**
     * @inheritDoc
     */
    public static function getDependencies()
    {
        return [];
    }

    /**
     * @inheritDoc
     */
    public function getAliases()
    {
        return [];
    }

    /**
     * @inheritDoc
     */
    public function apply()
    {
        $eavSetup = $this->eavSetup->create(['setup' => $this->moduleDataSetup]);
        $eavSetup->updateAttribute(
                'catalog_product',
                'custom_attribute_code',
                'group',
                'General'
        );

    }
}

Above code isn't impacting already assigned group of this attribute. How to update group of any product attribute programatically? Please note, this attribute might be assigned to multiple attribute set.


texts:
My Website is not show product slider missing due to MIME enable please help me how to fix this issue please check attachment screenshot images
www.hafeezpk.com


texts: Magento 2 sort by position in custom module is not working properly

texts:
I want to sort images by position, and I am using this code

public function getCollection() {
   $collection = $this->_mymoduleFactory->create()->addFieldToFilter('status', 1)->setOrder('position', 'ASC');
   return $collection;
}

it is working perfectly fine from 0-9. when i give position as 10 it is showing after 1 like 0,1,10,2 etc.
How could I sort correctly like 0,1,2,3...,10,11 etc?
Any help is appreciated..


texts: What effect do the "Developer" settings have, when the store is running in production mode?

texts:
In my fresh Magento 2 install: When in production mode, the settings under Store->Configuration->Developer are not shown at all.

When in developer mode, they appear, and some options specifically note that they are Not available in production mode, while others note that they have no effect in developer mode. For example, Minification is not applied in developer mode..

This leads me to wonder:

1. Do any of the settings shown in the Developer options have an effect when the store is in production mode?

2. Why are the "Developer" options are not accessible when the store is in production mode.


texts: how to get magento ecommerse payment method saved cc without payment gateway?

texts: I have created an online store in magento online store, everything is working well but am not getting saved cc option in payment method. why am not getting this option?


texts: Substitutes the prices of commodities in the admin. magento 1.9

texts:
I would be grateful for all the help.

I need to catch an event that brings the Manage Products in the table price.
Regardless of the price in the database, you need to display a different price.

Price is taken dynamically via XML with other resources.

For the frontend, I decided this through events
catalog_product_get_final_price and catalog_product_collection_load_after

But what event could be used to substitute the price of goods in the admin can not find.

Prompt who knows how to do this?


texts: Error when editing product - source model not found

texts:
Whenever I try to edit a product i get a printing exception error.

Only one module has been installed recently but even when that is disabled the error is still there?

I changed the local.xml.sample to local.xml and tried again and it says this:

  Source model estimateddelivery/attribute_source_enable not found for attribute estimated_delivery_enable.

Trace:
#0 /home/XXXXXX/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(390): Mage::exception('Mage_Eav', 'Source model "e...')
#1 /home/XXXXXX/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#2 /home/XXXXXX/public_html/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#3 /home/XXXXXX/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#4 /home/XXXXXX/public_html/app/code/core/Mage/Core/Block/Abstract.php(922): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#5 /home/stovespa/public_html/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#6 /home/XXXXXX/public_html/app/code/core/Mage/Core/Block/Abstract.php(297): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#7 /home/XXXXXX/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 /home/XXXXXX/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#9 /home/XXXXXX/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#10 /home/XXXXXX/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 /home/XXXXXX/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /home/XXXXXX/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 /home/XXXXXX/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /home/XXXXXX/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#15 /home/XXXXXX/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(250): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#16 /home/XXXXXX/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->editAction()
#17 /home/XXXXXX/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/XXXXXX/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/XXXXXX/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/XXXXXX/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /home/XXXXXX/public_html/index.php(83): Mage::run('', 'store')
#22 {main}


texts: Magento REST API - Unable to Login using buyer username and password

texts:
We are trying to use the REST API for building a Mobile App. I'm able to retrieve the product list using following URL /api/rest/products as a guest.

However if i try to retrieve the product list as a customer using the following code which i got from magento tutorial, it ask for a user login. But even after entering a valid user name and password it just redirect to the login page of the website. What could be the issue? Am i missing some configuration changes.

I have done following steps to configure the REST API.

Went to System-> Web Services -> REST Roles. Selected customer and
under Roles and Resources selected All
Went to System -> Web Service -> REST Attributes. Selected Customer,
under ACL Attribute Rules selected ALL for Resource Access
Went to System -> Web Service -> REST OAuth Consumer and added a new
Consumer.

And in the following code i have used the key and secret from the consumer.
When i run this code i can view a screen where i required to enter a  email and password. I have entered a email and password which is listed under Customers -> Manage Customers. But when click login it just redirects to original page. Please see the images below

REST Login Page

Page after login it redirects to following page

    $callbackUrl = "http://localhost/mage_lab/magento/";
    $siteURL =  "http://localhost/mage_lab/magento";
    $temporaryCredentialsRequestUrl = "$siteURL/oauth/initiate?oauth_callback=" . urlencode($callbackUrl);
    $adminAuthorizationUrl = "$siteURL/oauth/authorize";
    $accessTokenRequestUrl = "$siteURL/oauth/token";
    $apiUrl = "$siteURL/api/rest";
    $consumerKey = '3e234c9aa0e357306757765d0fbec702';
    $consumerSecret = '64e191eeb09d489c8fb876ac10ffecee';

    session_start();
    if (!isset($_GET['oauth_token']) && isset($_SESSION['state']) && $_SESSION['state'] == 1) {
         $_SESSION['state'] = 0;
    }
    try {
        $authType = ($_SESSION['state'] == 2) ? OAUTH_AUTH_TYPE_AUTHORIZATION : OAUTH_AUTH_TYPE_URI;
        $oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType);
        $oauthClient->enableDebug();

        if (!isset($_GET['oauth_token']) && !$_SESSION['state']) {
            $requestToken = $oauthClient->getRequestToken($temporaryCredentialsRequestUrl);
            $_SESSION['secret'] = $requestToken['oauth_token_secret'];
            $_SESSION['state'] = 1;
            header('Location: ' . $adminAuthorizationUrl . '?oauth_token=' . $requestToken['oauth_token']);
            exit;
        } else if ($_SESSION['state'] == 1) {
            $oauthClient->setToken($_GET['oauth_token'], $_SESSION['secret']);
            $accessToken = $oauthClient->getAccessToken($accessTokenRequestUrl);
            $_SESSION['state'] = 2;
            $_SESSION['token'] = $accessToken['oauth_token'];
            $_SESSION['secret'] = $accessToken['oauth_token_secret'];
            header('Location: ' . $callbackUrl);
            exit;
        } else {
            $oauthClient->setToken($_SESSION['token'], $_SESSION['secret']);
            echo $resourceUrl = "$apiUrl/products/";
            //$oauthClient->fetch($resourceUrl);
            $oauthClient->fetch($resourceUrl, array(), 'GET', array('Content-Type' => 'application/json', 'Accept' => 'application/json'));
            $productsList = json_decode($oauthClient->getLastResponse());
            print_r($productsList);
        }
    }
    catch (OAuthException $e) {
        print_r($e);
        exit;
    }

EDIT
It working if i already login from website and then try to run the API code. Then it will directly show the Page with Authorize button instead of login page


texts:
actually in our website we have a cron function scheduled (every morning) to update the qty of all products of our catalog and works good.

Following the code we are using now:

<?php

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

$file = MAGE_BASE_DIR . "/var/import/inventory.csv";
$handle = @fopen($file, "r");
if ($handle) {
    require_once(MAGE_BASE_DIR . '/app/Mage.php');
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

    while (!feof($handle)) {
        $linea = fgets($handle);
        $dati = explode(";", $linea);

        $aa = trim($dati[0]);
        $bb = trim($dati[0]);
        $cc = trim($dati[1]);
        $sku = trim($dati[2]);
        $dd = trim($dati[3]);
        $ee = trim($dati[4]);
        $qta = trim($dati[5]);
        $ff = trim($dati[7]);
        $gg = trim($dati[8]);
        $hh = trim($dati[8]);

        $product = Mage::getModel('catalog/product');
        $stockItem = Mage::getModel('cataloginventory/stock_item');

        $productId = $product->getIdBySku($sku);
        if ($productId !== false) {
            $product->load($productId);

            $stockItem->loadByProduct($productId);
            $stockItem->setData('qty', $qta);
            $stockItem->setData('is_in_stock', ($qta > 0) ? 1 : 0);

            try {
                $stockItem->save();
                //echo "{$sku} elaborato correttamente.";
            } catch (Exception $e) {
                $countException++;
                echo "{$sku} errore ({$e->getMessage()}).";
            }
        } else {
            //echo "{$sku} non trovato.";
        }

        unset($product);
        unset($stockItem);
    }
    fclose($handle);
} else {
    echo "Errore apertura file. ({$file})";
    exit();
}

This code works to update all the website, what I'm asking you now is: how can I modify this file to update a specific store?


texts: Taking action on a cancelled Recurring Profile

texts: Using the default Magento Recurring profiles, is it possible, either through Event/Observer or a cron job to determine which profiles have been cancelled or suspended and take some subsequent action, such as updating a customer group, on those expired/changed profiles?


texts:
i am looking for product collection with specific category filter.
Lets say i have products in categories:

Category A: Prod_1, Prod_2, Prod_3

Category B: Prod_4, Prod_5, Prod_6

Category C: Prod_7, Prod_8, Prod_9

Category D: Prod_1, Prod_5, Prod_9

and i want to get products form Category D, but with condition that this products is also in Category A , so it must return:

Prod_1 only


texts: Magento 2 advanced search has problems matching on a product attribute that has spaces and slashes in it

texts:
I am finding that Magentos advanced search has problems matching on a product attribute that has spaces and slashes in it.
E.g.:
I have 1 product with an attribute with the string "ABC123 / DEF456 / GHI789"
But if I search for "ABC123 / DEF456 / GHI789" (in advanced search) it returns no results.
But if I update the products attribute to this:
"ABC123xDEF456xGHI789" (replacing spaces and slash with a single x)
it works correctly and returns the product.
Any ideas what is happening or if there might be a way around this? I thought about a plugin to examine the search string but not really sure what I would be looking for.
(Also I tried replacing the spaces and slashes with other symbols (comma, pipe etc) but I have found that it will only work if I use a letter).
Any ideas? Thanks
Magento 2.3.3
EDIT
I am using MySQL search


texts: How to add location popup on magento website

texts:
When a user open any magento website, a pop up should come which ask location of user as shown in following image
  Please provide me any solution to add location popup on magento site.
Thanks


texts: Magento 1.9.3.1 Fatal Error and 3 Warnings

texts:
yesterday I got an error on my website, something like "Unable to handle this request". Sadly, I did not backup my website in the last weeks and I didn't want to lose my recent changes by using the backup, so I went to my Webhosts Account and saw that I passed the 50,000 file limit, with about 100 files.
I thought the website's error was because of the host and that they closed my website  because I had more than 50,000 files. To fix the problem I deleted the var/caches, var/reports and var/session folders from Magento. The next day, the error still was there. I pasted this code in my .htacces file, to see what the error was:

PHP error handling for development servers
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0

php_value error_log /home/path/public_html/domain/PHP_errors.log
[see footnote 3] # php_value error_reporting 999999999
php_value error_reporting -1
php_value log_errors_max_len 0

After pasting the code, my website's error message changed to this:

Warning: include_once(/home/tastatur/public_html/includes/src/Mage_Core_functions.php) [function.include-once0]: failed to open stream: No such file or directory in /home/tastatur/public_html/app/Mage.php on line 36

Warning: include_once() [function.include0]: Failed opening '/home/tastatur/public_html/includes/src/Mage_Core_functions.php' for inclusion (include_path='/home/tastatur/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/tastatur/public_html/app/Mage.php on line 36

Warning: include(/home/tastatur/public_html/includes/src/Mage_Core_Model_App.php) [function.include0]: failed to open stream: No such file or directory in /home/tastatur/public_html/includes/src/Varien_Autoload.php on line 94

Warning: include() [function.include0]: Failed opening '/home/tastatur/public_html/includes/src/Mage_Core_Model_App.php' for inclusion (include_path='/home/tastatur/public_html/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/tastatur/public_html/includes/src/Varien_Autoload.php on line 94

Fatal error: Class 'Mage_Core_Model_App' not found in /home/tastatur/public_html/app/Mage.php on line 670

What should I do to fix the errors?


texts: Magento 2 url key includes SKU number, how to remove?

texts:
The big problem with Magento somehow amending the url key to include the SKU where

/product-title-stec00778.html

should be

/product-title.html

and the SKU is

SKU STEC00778

Any ideas? Not sure if I can handle via .htaccess or how?


texts:
How do I disable grid click? So I can only click "Edit" link.

I've tried changing the function in vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php to return false; but it didn't work.

Help is very appreciated.


texts: Price change for Configurable products in list

texts:
Scenario:
I have a configurable product with the price X (no special price).
One (or more but not all) of the simple products attached to the configurable products has a special price Y (lower than X).

In the product view page (works as desired):

when the page loads I see the lowest price (Y in my case) along with regular price.
when changing the configuration of the product and reaching a configuration that is not discounted I see only one price, the original one (X).
changing the configuration to reach the discounted price product I see again, regular price and special price.

In the product list page (does not work as desired):

when the page loads I see the minimal price of the configurable product (Y) but no regular price or "special price" label
changing the product configuration to anything else, changes the price to the price of the configuration (X or Y).

Desired Result in the product list page:
 1. when page loads, display the minimal price and the regular price (Regular price: X, Special Price: Y).
 2. When the configuration changes show/hide the regular price and the special price label according to the selected options. Example: When selecting the configuration for the discounted price show both regular and special price (bonus: any other price type I add custom).  When selecting a non-discounted configuration just show one price.

Additional Info:
 I can achieve point 1 from the desired result by editing the final_price.phtml template for configurable products and removing the condition !$block->isProductList().

But in this case, the special price label remains there no matter what configuration I choose.

Speculation:

Since the regular price is not shown in the product list (see the conditions mentioned above), it makes me thing that by design, not all prices are shown in the product list for configurable products.

Question:
Is there a reasonable way (not rewriting all the price display logic) to achieve point 2 in the desired result section?


texts: How to Upgrade magento version from 2.2.X to 2.3.0?

texts:
I have tried using bellow command but getting errors

Command 1:

  composer require magento/product-community-edition 2.3.0 --no-update

Command 2:

  composer update

Output:

Problem 1
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
    - magento/product-community-edition 2.3.0 requires magento/framework 102.0.0 -> satisfiable by magento/framework[102.0.0].
    - Conclusion: don't install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.0-BETA2|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.0-BETA3|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.0|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.1|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.2|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.3|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.4|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.5|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.6|install symfony/console v2.8.38
    - Conclusion: don't install symfony/console v4.1.7|install symfony/console v2.8.38

if anyone has an idea help me..!


texts:
I want to rename the label Shipping Address on checkout page, have searched for it and tried the solutions but didn't success.
Please guide me in this,

Thanks.


texts: Does removing a template block call also stop the xml being processed

texts:
I would like to understand if a block is left in an xml file but the call to that block in a template file is removed, does the xml still get processed but never rendered?

Example:

In base/default/layout/page.xml there is a block within header called top.links. That block is called in base/default/page/header.phtml.

If I remove the call to the block from header.phtml in my own theme, but don't also remove the xml, does top.links get processed anyway.

Wondering if there could be a performance hit caused by doing this.


texts: Get active filters in observer in magento

texts:
I want to change my category display mode if there is active filters. My config.xml is :

    <events>
        <catalog_block_product_list_collection>
            <observers>
                <mycustom_module_observer>
                    <type>singleton</type>
                    <class>Mycustom_Module_Model_Observer</class>
                    <method>setCategoryDisplayMode</method>
                </mycustom_module_observer>
            </observers>
        </catalog_block_product_list_collection>
    </events>

And my observer is method is :

public function setCategoryDisplayMode(Varien_Event_Observer $observer)
{
    $category = Mage::registry('current_category');
    $appliedFilters = Mage::getSingleton('catalog/layer')
        ->getState()
        ->getFilters();
    if (!empty($appliedFilters)) {
        $category->setDisplayMode("PRODUCTS");
    }
}

But I am unable to get active filters with $appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters(); Is I am doing something wrong or my event is wrong?

I also tried with Mage::getSingleton('Mage_Catalog_Block_Layer_State')->getActiveFilters(); but no success.


texts:
I have a magento website based on community edition 1.7.0.2 which i have upgraded from magento 1.5.0.1.My website is having more than 40,000 products.

My problem is that the indexing process on flat data is not working properly and i am not able to save my product as when i click save product button it keeps processing but never stops processing and no got data saved.

I am using this SSH command :

php shell/indexer.php --reindex catalog_product_flat

and this error comes :

Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1142 ALTER command denied to user 'user'@'localhost' for table 'catalog_product_flat_1'' in /path.../lib/Zend/Db/Statement/Pdo.php:228

Thanks in advance,
Sarvagya


texts:
there is a way to add Expire Headers for external static components?

Magento 2.2.2 CE


texts: When i go to place orders through the backend of the magento site or front end the website crashes?

texts:
When I go to place order through the Admin Panel of the magento site or front end the website crashes and I get this error:

  Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /homepages/10/d569191818/htdocs/clickandbuilds/Magento/Hilbri/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 393


texts: Magento2 static content deploy issue - RuntimeError: No matching definition was found

texts:
Unable to run bin/magento setup:static-content:deploy -f without compilation error after upgrading Magento to 2.3.3 from 2.2.8.

Other messages included:

Deploy using quick strategy
frontend/Magento/blank/en_US            2449/2533           ===========================> 96%    1 sec
Compilation from source: /vendor/magento/theme-frontend-blank/web/css/styles-l.less
variable @theme__color__primary-alt is undefined in file /var/view_preprocessed/pub/static/frontend/Magento/blank/en_US/Magento_Braintree/css/source/_module.less in _module.less on line 13, column 26

RuntimeError: No matching definition was found for `.lib-font-face in _typography.less


texts:
I am thinking to create a new input type for another type of select, because i have 2 types of them.

I want a new option that use a diferent template of: bunde_catalog_product_view_type_bundle_option_select.phtml

I want to select the new option at: Backend - product - bundle items - and when i add a new bundle item option, i want to choose between drop-down and new drop-down.

Because i wanna have the same type of select but just with little changes on frontend.

I can't manage with other solutions, and i have no idea if its a terrible idea to do that.


texts:
I am trying to add new product type in magento 2 but when i click on product type say Demo Product from the Add Product Select box than it will throw below error.

The requested component ("demo_product") is not found. Before using, you must add the implementation.

Product_types.xml code below

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
<type name="demoproduct" label="Demo Product" modelInstance="Test\Demo\Model\Product\Type\DemoProduct" composite="false" isQty="true" canUseQtyDecimals="false" sortOrder="80">
    <priceModel instance="Test\Demo\Model\Product\Type\Price"/>
    <customAttributes>
        <attribute name="refundable" value="true"/>
        <attribute name="is_real_product" value="false"/>
    </customAttributes>
</type>

Here is Modal Instance

    namespace Test\Demo\Model\Product\Type;
class DemoProduct extends \Magento\Catalog\Model\Product\Type\Virtual
{
    const TYPE_GIFTCARD = 'demoproduct';
}

Can you please tell me what is missing?

I am using Magento 2.1.

Thanks in advance.


texts: How to change page title of a category programmatically?

texts: I am using magento 1.7 and i want to display the category title(meta title) as in the format of [Sub-Sub-Category] - [Sub-Categories] | main category for all sub-sub-categories.


texts:
I am preparing a Magento site and i want Credit card Saving Option in MY ACCOUNT.

So i need Stored Credit Cart Extension it may be Free Or COst no Problem. .

Pls Suggest me some extension.

Thanks in Advance


texts:
I'm trying to set up a 2.2.5 store with CyberSource v3, however, I keep receiving below error.

  You are not authorized to view this page. The transaction has not been
  processed. If the problem persists please report your problem and
  quote the following Error Reference Number: XXXX

The online search suggested checking signed/unsigned field and signed_date_time  however, the online search did not yield any helpful hints.


texts: Do I need a module to display product attributes in the shopping cart?

texts:
I have a store with products that have attributes for colour and size that users have to select. I want to display their selection in the shopping cart and, googling around, all the suggestions for how to do this suggest using a module (for example, see here http://www.magentocommerce.com/boards/viewthread/43580/).

However, I seem to have managed it without using a module. I've simply added the following code to app/design/frontend/myarea/default/template/checkout/cart/item/default.phtml. Note I have other products, such as gift cards, that don't have these attributes.

    $_colour = Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getAttributeText('color');
    $_size = Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getAttributeText('sizes');
    if ($_colour) {echo "
" . $this->__('Colour: ') . $_colour . "
";}
    if ($_size) {echo "
" . $this->__('Size: ') . $_size . "
";}

Is there something I'm missing in these other posts? I'm concerned my solution may have a flaw that will show up at some point.

Edit:

Thanks guys but now I'm really baffled!

I've put the following in my config.xml file:

<global>
    <sales>

        <quote>
            <item>
                <product_attributes>
                    <color />
                    <sizes />
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>

If I have the following in my default.phtml file, I only get the size. The colour isn't displayed. (If I remove the sizes from my config.xml, the size isn't displayed as I would expect.)

    $_colour = $_item->getProduct()->getAttributeText('color');
    $_size = $_item->getProduct()->getAttributeText('sizes');
    if ($_colour) {echo "
" . $this->__('Colour: ') . "" . $_colour . "
";}
    if ($_size) {echo "
" . $this->__('Size: ') . "" . $_size . "
";}

Now the bizarre thing is if I replace $_item by $this, it works! But it ignores whatever's in my config.xml file.

    $_colour = $this->getProduct()->getAttributeText('color');
    $_size = $this->getProduct()->getAttributeText('sizes');
    if ($_colour) {echo "
" . $this->__('Colour: ') . "" . $_colour . "
";}
    if ($_size) {echo "
" . $this->__('Size: ') . "" . $_size . "
";}


texts:
I have created one CMS page brand and I want to call brand CMS page in phtml file. So how can I call the CMS page?

I got following code but it's not working.

$cmsPage = Mage::getModel('cms/page')->load('Brand List','brand_list');
echo $cmsPage->getContent();


texts: Magento 2 : Is there a event which fires before every controller begins execution?

texts:
The best event I could get was the good old controller_action_predispatch but it fires after the controller is done execution and before layout generation.
Any other event that works in frontend area that could do this would be appreciated.
EDIT
Some context on why I need this, we've got a store where user can't access any page without login. If I implement it on predispatch the code in the controller can still be executed before redirection to login page.


texts: Which event is used while submitting a shipment in Magento 2

texts:
I need to execute my code after submitting shipment. I was using "sales_order_shipment_track_save_after" event in Magento 1.7 but it's not working with Magento 2.1.7 .

I have also tried some other event like "sales_order_shipment_save_after"  ,sales_order_shipment_save_before but didn't get success.

event.xml in etc/adminhtml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
  <event name="sales_order_shipment_save_before">
    <observer name="trackShiping" instance="Aftership\Track\Observer\Tracking"/>
  </event>
  <event name="admin_system_config_changed_section_aftership_options">
    <observer name="index" instance="Aftership\Track\Observer\ChangedSection"/>
  </event>
</config>

Please help me to find the solution.


texts: Get Custom Category Attribute Value On List Page : Magento 2

texts:
i have created custom category attribute now i want to get the attribute value on list.phtml page i can i achieve this in magento2.

<?php if($category->getColThreeCategory()): ?>

    <?php else: ?>

        <?php endif; ?>


texts: Magento2: How to remove decimal points from price in product admin grid

texts:
I want to remove decimal points for price in product admin grid.

I have follow this but it only remove the decimal from frontend.


texts: Magento 2 product images always returning the placeholder image

texts:
I've written a plugin, and in it I'm trying to obtain the product image url like this:

$generalInfo = array(
    'image_url' => $this->_imageHelper->init($product, 'product_base_image')
        ->constrainOnly(FALSE)
        ->keepAspectRatio(TRUE)
        ->keepFrame(FALSE)
        ->getUrl()
);

The problem is that this is returning the placeholder image url, not the actual product image url. The product does have images, and they are visible when visiting the product page, but from the php code Magento2 is not able to find them.

Is there any other method of obtaining product images that is more reliable? How does Magento2 obtain the correct image url for displaying on the frontend?


texts: Shopping Cart Price Rule that excludes discounted products

texts:
I've created a Catalog Price Rule on some products.
Now, I would to insert a ShoppingCart Price Rule (Coupon) that excludes the products concerned in the Catalog Price Rule.

Example:

Product A initial price: €120
Product A discounted price after Catalog Price Rule: €100
Product B price: €100

If a customer insert both products in the cart and the submit a Coupon Code it must be valid only for product B.

Is this operation possible?

Thank you


texts: How to set google sitelinks search box for search engine result page

texts:
i have a website www.mysite.com
and a google custom search engine in www.mysite.com/google-search-engine/

i want to add google sitelinks search box to my website search engine resault page.

i have this examples:

Put the schema.org markup on my homepage.

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "url": "https://www.example.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://query.example.com/search?q={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>

<div itemscope itemtype="http://schema.org/WebSite">
  <meta itemprop="url" content="https://www.example.com/"/>
  <form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
    <meta itemprop="target" content="https://query.example.com/search?q={search_term_string}"/>
    <input itemprop="query-input" type="text" name="search_term_string" required/>
    <input type="submit"/>
  </form>
</div>

how to do this in magento home page?

google blog guide

  a. "url"—This property specifies the URL of your website. It must match
  the canonical URL of your domain's homepage.

  b.potentialAction:target—This property specifies a search URL
  pattern for sending queries to your site's search engine. Key points
  about the URL pattern:
  -It must include a string enclosed in curly braces that is a placeholder for the user's search query (e.g., {search_term_string}).
  The string inside the curly braces must also appear in the name
  attribute of the query-input property.
  -It must point to the same domain on which the markup is found.
  -An actual query string instead of the placeholder string must produce a valid search results page on your site.

  c.query-input—the value for the name attribute of query-input must
  match the string enclosed inside curly braces in the target property
  of potentialAction.

this is an image for "sitelinks search box in search engine resault page":


texts: Rest Api : Custom field of order not saved in sales_flat_quote table?

texts:
I have a custom field in order "order_type". So, when a customer choose an option for order type, it will be saved in quote. It's working in front-end fine. But it's not updating when I am using REST API. My code is as below in V1.php.

    protected function _create(array $data){
       $quoteId=$data['data']['cart_id'];
       $order_type=$data['data']['order_type'];
       try {
            $store = $this->_getStore();
            $storeId = Mage::app()->getStore($store)->getId();
                    $quote = Mage::getModel('sales/quote')->setStoreId($storeId)->load($quoteId);
                    $quote->setOrderType($order_type);
                    $quote->collectTotals()->save();
            $result=array("success"=>true,"msg"=>"Saved successfully.");
            return $this->getResponse()->appendBody(json_encode($result));
           }
       catch (Mage_Core_Exception $e) {
              $result=array("success"=>false,"msg"=>$e->getMessage());
              return $this->getResponse()->appendBody(json_encode($result));
          } catch (Exception $e) {
              $result=array("success"=>false,"msg"=>"Checckout information not updated.");
              return $this->getResponse()->appendBody(json_encode($result));

           }
       }


texts: Can anyone please tell me how to set and get cookie on a phtml file in magento 2?? I don't want to create or use any extension for this.


texts: How to Transfer Magento database from one hosting account to another

texts:
During transferring Magento Database from one hosting account to another, we have to add several options in the MySQL backup file prior to uploading it.

Why the following should be added at the beginning of the SQL file? Would you please explain the reason and some technical details?

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
SET NAMES utf8;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;

Also the reason of adding these options at the end of the file.

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
SET SQL_NOTES=@OLD_SQL_NOTES;

is this method standard? any alternatives?


texts: Magento2 redirect to Product Details Page on add to cart

texts:
I have disabled the Ajax cart.
When clicking on addtocart it is redirecting to product page, correct I expect this to be like this.

but my problem is all the products in the store have custom options, which doesn't show on homepage or category page.
so clicking in addtocart though it redirects to product page correctly, but it shows a warning info:

like - Please specify product's required option(s).

I want to suppress this when clicking on addtocart on category page or homepage.


texts: how to get price in multi-store view in Magento 2

texts:
my site is running in multi-store view using store code in url .
now
1 > product price in GBP = 20
2 > exchange rate for USD = 1.4
3 > for usd store i want to get price including exchange rate
4 > so the price will in usd = 20*1.4 = 28

Note:- But when I get the price programmatically in custom.phtml file for USD store it shows GBP price

so how to get USD price.


texts: Visual Basic: Get sql error output from WebBrowser

texts: How can I get SQL error output from WebBrouser and put it in RichTextBox1


texts: Tax is not included in Sagepay transaction

texts:
While placing order from Admin using Sagepay, Tax is included in order total but Tax is not being included on sagepay transaction.  Even I've set "Include Tax In Order Total" to "Yes".
I am using Ebizmart Sagepay Suite.


texts: New Email Logo is NOT being shown in the Email?

texts:
Even after replacing the default Email/Print Logo (/skin/adminhtml/default/default/images ), with Custom logo, the site is still sending email with Default Magento Logo.

Also set permission 644 for original Email Logo, just make sure.

Did clear cache.  Am i missing something?


texts:
I'm implementing salesforce magento integration through REST API callout. I have successfully got the response from magento and saved it in salesforce database. But facing issue while using filterCriteria in the query, it throws me "Invalid Signature". please help me solve this error.

Thanks in advance....!


texts: JS and CSS not showing up after DB migration

texts:
I am having issues with my CSS and JS files not loading on my site since I recently migrated my database. If you visit my site you'll see that in console it says: Resource interpreted as Stylesheet but transferred with MIME type text/html

https://www.dtacollectibles.com/

I updated the permissions for the skin and media directories to 777
In the Admin I also set Merge CSS and Merge JS to No but it seems that they are still getting merged.

Any ideas on what could be causing this? Thanks


texts: Layered Navigation not working for newly enabled filters

texts:
I have tried to add some existing attributes to the layered navigation filter options. I have set the attribute to be used in layered navi and set filterable (with results).

The Filter is displayed, but it doesn't 'stick' - unlike the other filters available and it does not limit the products in the category view.

I have tried re-indexing, deleting locks, re-indexing again and still the same behaviour.

I have checked the logs but nothing is being logged.

Has anyone had this issue before and knows how to fix any of the above? Any help would be greatly appreciated.

Running Magento CE 1.8.1 with the default navigation (no plug in)


texts: Adding icon to product listing image based on attribute value

texts:
I am trying to place a text icon on relevant product listing images based on an attribute value ('In Stock'). Can anyone tell me where I am going wrong, as I am crashing the page with the current code.

CURRENT CODE

<?php if($_product->getAttributeText('in_stock')==$this->_('In Stock')): ?>

IN STOCK

<?php endif; ?>

The code above is being placed in the relevant area of list.phtml


texts: Magento 2 : How to know "used_in_forms" param of eav attribute for a form?

texts:
I was wondering if there is a full proof method for finding  all used_in_forms params of eav attribute which is specified in InstallData.php to create all kind of attributes for a form or maybe someone can list all the used_in_forms for all default magento forms.

Any help would be appreciated.


texts: I want to understand growth over time of specific customer groups

texts:
How do I query my SQL database in order to pull this information? I have a tool that's connected into my database, but have to write a specific query in order to pull in the data.

Help. Noob here when it comes to code - I'm the marketing guy.


texts: Magento 2.2 admin login screen does not load CSS

texts:
I have a store on Magento v2.2.5. It suddenly stop displaying gui for admin login screen. It display un styled form box for login(See attached image).

Login function works and dashboard pages are working well.
Kindly suggest some solution...
I tried all these command via SSH

php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex

Thanks


texts: How to get the message notification in admin panel once the order placed from the customer?

texts:
How to receive the message notification in admin panel once the order placed from the customer?

As of now, admin is receiving email but I want to show the notification also in admin panel like the following:


texts:
I am trying to get results from database . For now i tried to take out title from a custom table i made . All is working well except that there are only two rows with one title in each in that table but when the result outputs through echo each of them are repeated four times . My code is

<?php
$collection = Mage::getModel('example/example')->getCollection();
$keys = array_keys($collection->getFirstItem()->getData());
foreach ($keys as $key){ // loop through all the keys (fname, lname, email...
    foreach ($collection as $obj){//loop throught each object

?>

  <?php  echo $obj->getData("title");//get the value for a speficic key. ?>

<?php
    }
}
?>


texts:
In My PDP page, the thumbnail images which is shown on the bottom side of the product image are displayed twice

Please refer below screenshot, It repeats the product image twice in bottom


texts: RWD mini-cart: How to reload cart page if product removed via mini cart?

texts:
I am having UI issues with the mini-cart and the RWD theme.
Test 1:
Add Item to cart, then click on Mini-Cart in top right corner and select "View Shopping Cart".
Once on the shopping cart, use the actual shopping cart page to delete the item you just added (not the mini-cart, but the actual features on the shopping cart page.
Result: Mini-Cart updates and the item is cleared out of Mini Cart and Shopping Cart is Empty.
That's probably because the page reloads when you remove that item. That seems to work fine.
Test 2:
Add Item to cart, then click on Mini-Cart in top right corner and select "View Shopping Cart".
Once on the shopping cart,use the mini-cart and click on "Remove Item" to remove the item out of the mini-cart.
Result: Mini-Cart removes the item and mini-cart says "You have no items in your shopping cart", however since we are on the actual shopping cart page, and the page didn't refresh, the shopping cart still shows the item in the cart.

Is there any way to tell the mini-cart to reload the page if we are on the actual shopping cart page (and perhaps on the checkout page may be a good thing as well), so that if someone were to remove an item in the checkout process using the mini-cart, that the page reloads and then displays the "Your shopping cart is empty" page.
Does anyone have a solution for that, preferably non invasive. I have set up a custom theme inside the RWD theme folder (there is a Default folder, and I created another folder in that level where I could copy files in to and which would be pulled before Default takes over.)
I like to make it as easy as possible for consumers, and this is something that really bothers me.


texts: How to get image baseurl for category icon?

texts:
I want to setup a method to get image URLs for category icons like pub/catalog/images/offer.png

What do I have to do for it?

This is what I am trying to build:

And this is the URL I need:

$vdrawMainMenu = str_replace('Phones, Tablets & Accessories', '<img src="http://localhost/kikinben/pub/static/frontend/Alothemes/default/en_US/Magento_Catalog/images/mobile.png" style="width:20px">Phones, Tablets & Accessories', $vdrawMainMenu);


texts: How to get popup on button click via plugin at admin side in Magento 2

texts:
I have "New Add Product" button at Sales->Order->Create New Order

which I added through plugin.
My di is at: etc/adminhtml

As

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<type name="Magento\Sales\Block\Adminhtml\Order\Create\Items">
    <plugin name="vendor-module-order-create-items-block" type="Vendor\Module\Plugin\Order\Create\Items" sortOrder="100" />
</type>
</config>

My plugin class is:

class Items
{
public function afterGetButtonsHtml(\Magento\Sales\Block\Adminhtml\Order\Create\Items $subject, $result)
{
    $url = 'http://www.google.com';
    $result .= $subject->getLayout()->createBlock(
            \Magento\Backend\Block\Widget\Button::class
        )->setData(
            ['label'=>'New Add Products', 'type'=>'button', 'id'=> 'add_new_products', 'class' => 'action-secondary action-add', 'on_click'=>"window.location.href='" . $url . "'"]
        )->toHtml();
    return $result;
}
}

I want to create popup like this on 'New Add Products' button click (This is in M1)

I need to know how to add popup code in plugin class? as there are many solutions available but mostly are executed by template files.


texts: Magento 2 Free Shipping options showing all the time in cart page

texts:
I have two shipping methods, a flat rate and a free shipping option over 100$. Under Stores>Configuration>Sales>Shipping Methods, I have selected 'NO' for show method if not applicable for Flat rate. That would hide it ideally if the order is over $100 .

But both methods are showing and I want to hide flat rate if the order amount is over $100.

How can I turn achieve it.


texts: Promo buy 4 different and get 40% off (from 6 product selected)

texts:
My questionis simple, i am trying to set a promo for 6 shows.
Buy 4 different shows and get 40% off. (easy part)
from a selection of 6 shows (part i cant get to work)

Please help me


texts: Ensure module is loaded after all magento 2 modules

texts: I want to create a module that is loaded first after all the magento modules are loaded. Is there a list somewhere of all them magento 2 module sequence?  Or is there any way to set a module to load first after all magento framework modules?


texts:
I have installed fresh copy of magento2.2.0. As I click on opening the magento2 admin page

[![Not Found

The requested URL /magento2/admin_12o514/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.][1]][1]


texts: Edit text in checkout(DebitPayment extension )

texts:
I'm using the DebitPayment extension for my german store. The problem is now, that it won't translate the text to german and I'm using the german FireGento extension. How can I translate the text to german for my german storeview?

You can see that there is still the standard english text(I added the german text in the configuration menu but I need to translate the standard text)

On the last site of my checkout it's called Cash On Delivery but as you can see above I already changed it to "Nachnahme"(german word) How can I fix it?


texts: Magento Checkout page goes hangs and infinite loop circle revolves after Paypal Payment fails

texts:
When customers is doing transaction on our website and going for payment to paypal and enters all details related to payment.

The user lands on checkout page on our magento website and circle spins continuously and transaction fails without any error message
Current Magento Version -  2.3.1

Error in logs
main.critical: paypal nvp gateway errors: the field shipping address postal code is required.

Error in Paypal logs attached.

Please help us on this.


texts: how to get product group price by customer group id, without logged in

texts:
I need to replace the product price with group price for the product which is in the cart.[without logged in any customers].

I am getting a product from the cart and getting a price and other information.
I am unable to get product customerGroupId and group price and all.

$cart = Mage::getModel('checkout/cart')->getQuote();
        $cartItems = $cart->getAllVisibleItems();
        foreach ($cartItems as $item)
        {
            //Mage::log(print_r($item->getCustomerGroupId(), true));
         //   Mage::log(print_r($item, true));
            $item->setCustomerGroupId(4);
            Mage::log(print_r($item->getPrice(), true));
 Mage::log(print_r($item->getGroupPrice(), true));
}

The above code not able to print group price or unable to set product customerGroup

Help me to get an answer for this,
Thanks in advance:)


texts: Why my localhost dont send email transactional?

texts:
My code is:

<?php
require_once "app/Mage.php";
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));

// This is the template name from your etc/config.xml
$template_id = 'exceptionCode';

// Who were sending to...
$email_to = 'teste@gmail.com';
$customer_name   = 'teste';

// Load our template by template_id
$email_template  = Mage::getModel('core/email_template')->loadDefault($template_id);

// Here is where we can define custom variables to go in our email template!
$email_template_variables = array(
    'customer_name' => $customerName
    // Other variables for our email template.
);

// I'm using the Store Name as sender name here.
$sender_name = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
// I'm using the general store contact here as the sender email.
$sender_email = Mage::getStoreConfig('trans_email/ident_general/email');
$email_template->setSenderName($sender_name);
$email_template->setSenderEmail($sender_email);

//Send the email!
$email_template->send($email_to, $customer_name, $email_template_variables);

?>

Then i run in root dir and empty blank page shows nothing and i not recieve the mail. Why? I follow the steps https://www.ashsmith.io/2014/08/28/custom-transactional-emails-in-magento/ and doesnt work. Thanks


texts: Missing Category selection option for product

texts:
Just adding some products a few minutes ago, and I seem to be missing the category selection option for the product.

It's just not there!  There are categories, set to display, but they don't list any products. (categories do list products, I had a filter on for some reason!)

When the existing products were created, they were put into various categories.

Also, the options for stock status, quantity and tax class have all disappeard too - not sure if it's related, if not I'll ask a new question for those.

Running Magento 2.1.7.  I've beens earching for a good while now, but can't find anything relevant to help (most issues involving categories are about not showing on the front end).

Cheers,


texts: Hover Over Category = Changes Main Image - Magento

texts:
I am trying to create a website like the following:

http://www.prada.com

Similar to this site, when users hover over the category the main image below changes. What is the best way to achieve this through Magento? Should the images be assigned to the category pages or...? This is my existing CSS for the current, main image:

 body.cms-home .main-container {
 background: url(../images/main.jpg);
 background-size: 100%;
 }

Perhaps this even needs to be assigned through the CMS Page for the 'home page' since this reaction will only appear on the home page.

Or maybe I can link the hover-option on the text with the above CSS and change the image name each time? Like this (only this doesn't seem to be working):

 body.cms-home .main-container #nav li.level0.nav-4 a:hover {
 background: url(../images/main2.jpg);
 background-size: 100%;
 }

Any guidance will be extremely appreciated!


texts:
I need to add a tracking script to the success page and that script requires a gran total in cents, so $15.94 should be 1594

How can I get the order grand total in cents?


texts: Removing numbers in url key/product url magento1?

texts: My site shows http://127.0.0.1/magento/index.php/c/spyder-5.in category name added numbers.How to find out these problem?. Can you please help me?


texts: how to migrate order , customer data mysql from one environment to another

texts:
need table detail which we need export order , customer attribute from same version of magneto but different server

need table name .
any admin import /export method.


texts: How to add image role programmatically in magento2

texts:
I want to add image role in my custom page in admin side. There are four image role in core part . I want to add same as in my custom page.

How to add it in my custom page as mentioned in image

please help me....


texts: Magento 2 How I can add a div inside `product-image-container` in Magento to catalog pages

texts:
I want to add a New <div> in inside class="product-image-container" in Magento 2 I have searched and found that this class is rendered like this

$productImage = $block->getImage($_product, $imageDisplayArea);
<?= $productImage->toHtml() ?>

How I can do this task please let me know thank you


texts: Magento 2 [ERROR] SyntaxError: Unexpected token A in JSON at position 0 after submitting order

texts:
I have created 3 webstores inside the same website, and each webstore has it's own storeview.
So I have this structure:

Main Website
Webstore1->Storeview1
Webstore2->Storeview2
Webstore3->Storeview3

After creating the Webstore2 and Webstore3, I get an error after paying the product with any payment method.
It shows this error if I inspect the website: [ERROR] SyntaxError: Unexpected token A in JSON at position
0
The order is actually placed and created, but it does not redirects me to the Sucessfully Purchased screen, I even receive the order confirmation in my email.
It did not show this error before creating the webstores and storeviews.
Greetings!


texts: Catalog price rule not working after supee8788 installed

texts: After I have installed SUPEE8788, catalog price rule is not working. When I click save and apply button, the rule works for a limited period and then it stops working but shows the price in category page but not applied. If I make the rule inactive and click the save and apply button, the rule works. Why this is happening?


texts: How to install the magento custom created module in magento 2 on localhost using command line in window?

texts:
how  I can install the Magento 2 custom created Module using Command line in localhost.

php bin/magento:enable vendor_modulename

tried this but not work


texts: Magento2 - Change product status programatically depending on View

texts:
I'm working in a command script to import products to a Magento2 Store. I have more than 10(1 per language) Views for the same Website/Store.

I don't have any problem when a product has to be in all Views of a Store, but i'm trying to enable a product only in one view and not on all Store.

I have seen that in Magento 1.X was a function to do that trick:

updateProductStatus($productid, $storeid, $status)

but in Magento 2 i can't find the way to do that.

I have also tried looking directly into the database, but without success. Any help on this issue would be helpful because doing manually is impossible, due to the large amount of products.


texts:
I used a contact form in my site. If anyone mention any link in message box, it should come as a text on my mail because currently i am receiving the link on my mail.
In this image i am getting link in comment section but i want to get this link as a text on the mail.

so how can we validate it.


texts: How to delete data in magento 2 custom table?

texts:
I want to delete id 5 data from my table.
I used some code but show:
1 exception(s):
Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Sparsh\CRUD\Controller\Index\Delete\Interceptor

My controller:
<?php
namespace Sparsh\CRUD\Controller\Index;
use Sparsh\CRUD\Model\postFactory;
class Delete extends \Magento\Framework\App\Action\Action
{
     protected $_pageFactory;
     protected $_postFactory;

     public function __construct(
          \Magento\Framework\App\Action\Context $context,
          \Magento\Framework\View\Result\PageFactory $pageFactory,
          \Sparsh\CRUD\Model\PageFactory $postFactory
          )
     {
          $this->_pageFactory = $pageFactory;
          $this->_postFactory = $postFactory;
          return parent::__construct($context);
     }

     public function execute()
     {
        //   echo "Delete controller";
        //   exit;
        $id = $this->getRequest()->getParam(5);
        try {
            $model = $this->_postFactory->create();
            $model->load($id);
            $model->delete();
            echo "Success";

        } catch (\Exception $e) {
            // $this->messageManager->addError($e->getMessage());
            echo "Error";
        }
        // var_dump($id->getData());
        // exit;

     }
}

My model:
<?php
namespace Sparsh\CRUD\Model;
use Magento\Framework\Model\AbstractModel;

class Post extends AbstractModel
{
        protected function _construct()
        {
                $this->_init('Sparsh\CRUD\Model\ResourceModel\Post');
        }

}

My Recourse Model:
<?php

namespace Sparsh\CRUD\Model\ResourceModel;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class Post extends AbstractDb
{
    /**
     * Define main table
     */
    protected function _construct()
    {
        $this->_init('post', 'post_id'); //hello is table of module
    }
}

My collection:

<?php
namespace Sparsh\CRUD\Model\ResourceModel\Post;

class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
        /**
         * Define resource model
         *
         * @return void
         */

        protected function _construct()
        {
                $this->_init('Sparsh\CRUD\Model\Post', 'Sparsh\CRUD\Model\ResourceModel\Post');

        }

}

What is the problem ?
I am new in Magento.
IS there any solution?


texts: Magento2.2 Empty checkout page, "Unable to unserialize value." error in system.log

texts:
When I add an item to shopping cart, the checkout page is blank, only with the store logo.

And when I open system.log, it says

  main.CRITICAL: Unable to unserialize value. [] []

What could be the reason for this error?


texts: Magento 2 rest API returns false when trying to get a token

texts:
I am trying to create a web app that gets data from a Magento 2 website thanks to the API, following this tutorial but it returns bool(false) when I do var_dump($token)

I have read other threads on StackOverflow saying it might be linked to an error with SSL, but I have no error when I use curl_error($ch) so I don't think that's the issue.

My code :

  $userData = array("username" => $username, "password" => $password);
  $ch = curl_init("http://mywebsite/index.php/rest/V1/integration/admin/token");
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Length: " . strlen(json_encode($userData))));

  $token = curl_exec($ch);

Thank you for reading.

EDIT: The account I use has a role with all permission so that shouldn't be the issue either.

EDIT 2: When I change the Magento URL and account to the ones from this demo it returns me a token and the information I want, but not with the Magento I am working on.


texts:
I have in the shop 2 categories x and y.
Customer has to have the ability to:

buy products from category "x" normally
purchase from category "y" should be locked. He cant buy it separately
From cat. "y" he can buy only if he buy from cat. "x"

Products from categories "x" and "y" must be visable, and have qty>0


texts: Custom Option text field value from order id

texts:
I want to show values from Custom option text field in product view page if customer already ordered the product. I don't have fixed options attribute they may change like custom size, sleeve size, etc. I am trying following code and fetch last order. I don't know how to get product custom options (text field) attribute dynamically.

if(Mage::getSingleton('customer/session')->isLoggedIn()){
        $customer = Mage::getSingleton('customer/session')->getCustomer();
        $email= $customer->getEmail();
        $_customer = Mage::getModel('customer/customer');
        // get order id
        $orders1 = Mage::getResourceModel('sales/order_collection')
        ->addFieldToSelect('*')
        ->addFilter('customer_email', $email)
        ->addAttributeToSort('created_at', 'DESC')
        ->setPageSize(1);
        $id= $orders1->getFirstItem()->getId();
        $order = Mage::getModel('sales/order')->load($id);
        //get all items
        $items = $order->getAllItems();
        $itemcount= count($items);
        $data = array();
        $i=0;
        //loop for all order items
        foreach ($items as $itemId => $item)
        {
          $data[$i]['name'] = $item->getName();
          $data[$i]['attr'] = $item->getAttributeName();
        }


texts:
How To Resolve New Magento Security Patch (SUPEE-6285) – Install Immediately In Magento 1.9.0.1 please find the below image

I have tried this code

passthru("/bin/bash PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh");

But still it is showing same error. How to rectify this issue.


texts: Magento 2 TypeError: options is undefined in firefox

texts:
After working for few day I noticed that I am getting this issue in my Firefox and not in Chrome.

  TypeError: options is undefined

If I do cache clean and check in Firefox it works for the first time, for the next refresh face this issue

Some one help me with this.


texts: Does magento provide EAV attribute import / export like product and customers?

texts: I am trying to import attribute in Magento2 by programming but not getting success So there is any other way to create or update attribute via CSV or I will create all option manually.


texts: How to add new custom option type in Magento 2?

texts:
I want to create a new custom option type. When i go to the back-end, select a product, go to the section called "Custom Options" I can add a new option, at which point I can select the type of the option. I want to expand this list to include a new type of my own creation.

I can't seem to find anything about this for Magento 2, but I did find some good tutorials for Magento 1.


texts: Call to helper of module not change the Mage_ prexif by my module prefix

texts:
I have changed my etc/system.xml and my etc/config.xml with the structure which should replace the Mage_JaviNewListProductController_Helper_Data by Lecasa_JaviNewListProductController_Helper_Data.

I am getting the following error:

  Fatal error: Class 'Mage_JaviNewListProductController_Helper_Data' not
  found in /home/javiertxu/Documentos/webs/clon_lecasa/app/Mage.php on
  line 547

I do not know what more I can change for replace the Mage_ by the parent name of my module when I use:

Mage::helper('JaviNewListProductController')->renderProductInCatalog($_product);

I think that this has not relevance but I am using this function in rwd/default/template/.../list.phtml

Thanks


texts: Add coupon code in the subscription mail, Magento 1.9

texts:
Can I add an automatic coupon code in the newsletter subscription mail.

I want everyone who signs up to newsletter receive a subscription mail with a coupon code that I automatically generated previously. It's possbile?

This is an example of what I want to do.


texts: Magento 2 conditionally hide quantity box

texts:
I would like to hide the built in quantity box based on whether i have set a custom attribute for quantity. Some products that dont have a custom attribute for quantity will need to still display the quantity box. I'd like this for everywhere the quantity box is shown, but most importantly and where i am currently trying to get it to work is the product page. For example, one of the products i will have is business cards. I will have a price per each variant (material, number of sides, quantity, lamination etc) which i can create using the custom attributes and this part works fine.

I cannot work out how to do the checking for the custom attribute called quantity. I have tried various things and when i do a var_dump of the variable i just get "NULL" and im not sure where i am going wrong. I am using Magento 2.3 and i am editing the addtocart.phtml template file, which i was hoping to just add an if statement to not show the qty div if it returned true.

The code i have last tried is:

<?php $myquantity = $_product->getCustomAttribute('quantity'); ?>

and when i do a var_dump i just get NULL.
The full addtocart.phtml code is with the only changes are the line above and the var_dump line:

<?php $_product = $block->getProduct(); ?>
<?php $myquantity = $_product->getCustomAttribute('quantity'); ?>
<?php $buttonTitle = __('Add to Cart'); ?>
<?php if ($_product->isSaleable()): ?>

        <?php if ($block->shouldRenderQuantity()): ?>

        <?php var_dump($myquantity); ?>
            <?= /* @escapeNotVerified */ __('Qty') ?>

                <input type="number"
                       name="qty"
                       id="qty"
                       value="<?= /* @escapeNotVerified */ $block->getProductDefaultQty() * 1 ?>"
                       title="<?= /* @escapeNotVerified */ __('Qty') ?>"
                       class="input-text qty"
                       data-validate="<?= $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"
                       />

        <?php endif; ?>

            <button type="submit"
                    title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
                    class="action primary tocart"
                    id="product-addtocart-button">
                <?= /* @escapeNotVerified */ $buttonTitle ?>
            </button>
            <?= $block->getChildHtml('', true) ?>

<?php endif; ?>

I am only at the checkign phase so far, i didnt see the point in trying to write the if statement when i can't return the right information first.
Of course, if there is another/better way i can do this i would appreciate the help. I am not much of a developer so i was hoping for a simple resolution.

Thanks


texts:
I have site A which is the main site and site B which is multi site of Site A.

I have a problem where some things are not changing on site B eg the store phone number.  So I have changed the store phone number in store B in admin, and I have flushed cache and storage cache.  But the number is not changing ( note its a different number from store A and so the old number is not stored anywhere that I can see.)  I have looked into the code that calls the store number which is

<?php echo Mage::getStoreConfig('general/store_information/phone'); ?>

I looked that up in the database and its showing the correct number ( and can't see the old number that still showing anywhere).

Another extension seems to have the same problem  and it seems to be related to getStoreConfigas other parts of the site B are updating ok (eg CMS changes are showing ok).

I'm using Firefox with local cache and cookies disabled

Is data for Site B cached somewhere else?

Magento 1.9, Nginx, xcache,

Thanks

Update

I found out the cause of the problem. It seems that Site B did not have permission to write to the cache folder that was on site A, If that happens its seems magento automaticly stores them in /tmp/magento/var/cache on the server, which was never gets flushed.

The short term solution is do delete the cache in he /tmp/ folder, and the proper solution is to setup the premissions correctly to the cache folder so that Site B can write to it.


texts:
I am trying to pull a sales order coupon code using the XML-RPC API:

http://www.magentocommerce.com/api/soap/sales/salesOrder/sales_order.info.html

I don't see this field available. Can I pull order coupon codes using XML-RPC?


texts:
Trying to call a widget (from a custom form extension) in a phtml.

Here's what it looks like when embedded in a CMS page:

{widget type="PluginCompany\ContactForms\Block\Form\Widget\View" form_id="1" show_form_as="form"}

How would I print this in a phtml file, and in such a way that passes those parameters?


texts: Magento 2: Event-Observer for whenever the stock status of product changes

texts:
Is there an event for whenever a product goes from In-Stock to Out of Stock and vice-versa.

I basically need to programatically set the value of a custom product attribute depending on the stock status of a product.

Any suggestions?


texts: Sell only for a state or region in Magento 2

texts: I'm looking for help, I need to leave the state fixed in the shipping and billing in magento 2.


texts:
Magento Commerce comes with a RabbitMq integration.

I'm trying to publish smth in RabbitMq. I'm following the docs on this.

Problem: I get the following exception:

Fatal error: Uncaught PhpAmqpLib\Exception\AMQPProtocolChannelException: NOT_FOUND - no exchange 'vulpea-test' in vhost '/' in /var/www/magento/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AMQPChannel.php on line 191

Looking in RabbitMq the exchange does not exist.
But Magento Should create it when making the request. If I create the exchange by hand the exception does not appear anymore yet messages are not published either way.

Note: I can consume queues successfully. And I have no errors at setup:di:compile.

communication.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
    <topic
            name="vulpea.test"
            request="Vulpea\Test\Model\Message"
    />
</config>

queue.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
    <broker topic="vulpea.test" type="amqp" exchange="vulpea-test">
        <queue
                consumer="vulpeaTest"
                name="vulpea-test"
                consumerInstance="Magento\Framework\MessageQueue\Consumer"
        />
    </broker>
</config>

Controller

namespace Vulpea\Test\Controller\Test;

use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ResponseInterface;
use Magento\Framework\MessageQueue\PublisherInterface;
use Vulpea\Test\Model\Message;

    class Rabbit extends \Magento\Framework\App\Action\Action
    {
        protected $publisher;

        public function __construct(
            PublisherInterface $publisher,
            Context $context
        )
        {
            $this->publisher = $publisher;
            parent::__construct($context);
        }

        /**
         * Dispatch request
         *
         * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
         * @throws \Magento\Framework\Exception\NotFoundException
         */
        public function execute()
        {
            try{
                $message = new Message();
                $message->setMessage('Mesage');

                $this->publisher->publish("vulpea.test", $message);
            }catch (\Exception $exception){
                var_dump($exception->getMessage());
            }

            var_dump("It works");
            exit;
        }
    }

Any pointers are welcomed. Thanks


texts: How to get all products id with price based on cart rule in magento 2

texts:
I have to show configurable product's price associated with my cart price rules in the product listing page.

Suppose I have a product who's price is $20 if anyone purchase that product more than 10 than the price would be $17/piece and if someone purchase more than 20, then the price would be $15.

So I have to show those price which is associated with cart price rule, on the product listing page. like - 20 items at just $15 , 10 items at just $17 and so on.


texts: formatDate() returns 'medium' when called 'short' in Magento 1.9.2.3

texts:
I recently did an upgrade from Magento 1.8.0.0 to 1.9.2.3. Since then the Core Helper Function formatDate() returns the 'medium'-formatted date, even if called with 'short'.

Example (output from magerun dev:console):

Magento 1.8.0.0:

>>> Mage::helper('core')->formatDate('2011-06-28 08:50:51', 'short')
=> "28.06.11"
>>> Mage::helper('core')->formatDate('2011-06-28 08:50:51', 'medium')
=> "28.06.2011"

Magento 1.9.2.3:

>>> Mage::helper('core')->formatDate('2011-06-28 08:50:51', 'short')
=> "28.06.2011"
>>> Mage::helper('core')->formatDate('2011-06-28 08:50:51', 'medium')
=> "28.06.2011"

As far as I can see the formatDate() itself didn't change. Also my system configuration didn't change. Is it a bug? Can anybody reproduce? Thanks.


texts:
I have been trying to use plugin to override Magento\Sales\Helper\Reorder.php. I have added a comment inside the code what I would like to change.
/**
     * Check is it possible to reorder
     *
     * @param int $orderId
     * @return bool
     */
    public function canReorder($orderId)
    {
        $order = $this->orderRepository->get($orderId);
        if (!$this->isAllowed($order->getStore())) {
            return false;
        }

        $currentOrder = $this->registry->registry('current_order');
        if ($this->customerSession->isLoggedIn() || isset($currentOrder)) {
            \\WHAT I AM TRYING TO DO - canReorder() change to canReorderIgnoreSalable()
            return $order->canReorderIgnoreSalable();
        } else {
            return false;
        }
    }

How can I do this through plugin?


texts:
In admin section (System->Import/Export) new Import/Export variant. If I use export all products and nothing have cross or up sells product, then export working fine. But if have any products cross or up sells products export not working.

How can I export products with cross or up-sells products?


texts: Updation of product description from admin panel is not showing up in storefront in magento2?

texts:
We tried to update product description form admin-panel, but it's not reflecting in the storefront.

Tried with reindexing, cache flush commands. It did not work.


texts: GET products for my cart with customer token

texts:
I want to insert items in a cart using a customer token. I already found how to insert the products but it needs the SKU of the products. The problem is I can't find a way to get the product's SKU using only a customer token. I used the products-render-info API, but it doesn't give the SKU. Maybe I'm using the wrong API or the wrong parameters, this is the way I use it in postman:

  GET:
  {{baseUrl}}/products-render-info?searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][0][value]={{categoryId}}&storeId={{storeId}}&currencyCode={{currencyCode}}

I use the root category: 2, the default store: 1. And the currencyCode: mxn. This API gives a lot of info but I can't get the SKU.

I tried the GET: /products?searchCriteria[filterGroups][][filters][][field]={{searchCriteria[filterGroups][][filters][][field]}}&searchCriteria[filterGroups][][filters][][value]={{searchCriteria[filterGroups][][filters][][value]}}&searchCriteria[filterGroups][][filters][][conditionType]={{searchCriteria[filterGroups][][filters][][conditionType]}}&searchCriteria[sortOrders][][field]={{searchCriteria[sortOrders][][field]}}&searchCriteria[sortOrders][][direction]={{searchCriteria[sortOrders][][direction]}}&searchCriteria[pageSize]={{searchCriteria[pageSize]}}&searchCriteria[currentPage]={{searchCriteria[currentPage]}}

API too, but it seems that it only works with an admin token. Since this is for a "customer app", I want to get the info with a customer token. I don't know if there's another way to get the SKU but I need it to add items to my cart.

Also, I took a look at swagger and it seems that it doesn't show all the customer's APIs. I used a customer API and it shows more APIs than for a guest user, but I don't know if I should trust swagger since I can't find POST: /carts/mine/items there but I can use that API using my customer token. Maybe swagger doesn't show all the APIs a customer is able to use. Because of this, I wonder if there's another API I can't see as a customer but I'm able to use to get the SKU, another way to insert a product or a way to give permissions to my customers to get the SKU using some of the APIs I wrote here.


texts:
can anyone help me to learn me how i send a mail from a custom form on product page of magento 1.9 ?
I am new in magento .


texts: After migrating site to another server Magento 2 functionalities not working

texts: I migrated site to another server and now functionalists not working like  account creation , email registration , checkout etc . On last server everything is perfect. What is going on here ? Any idea ?


texts: Overriding Third Party Adminhtml Controller

texts:
I can't override another third party module:

I tried either of these but no success:

<admin>
    <routers>
        <thirdparty>
            <args>
                <modules>
                    <my_filedownloads before="ThirdParty_Adminhtml">My_FileDownloads_Adminhtml</my_filedownloads>
                </modules>
            </args>
        </thirdparty>
        <adminhtml>
            <args>
                <modules>
                    <my_filedownloads before="Mage_Adminhtml">My_FileDownloads_Adminhtml</my_filedownloads>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>


texts:
how to change currency format in magento2?
for example:
I want to transfer the currency symbol to the left of the price in the following format


texts: Shipping tab is empty when creating products in magento 2.3

texts: I am a beginner in Magento, When I try to create a new product in Magento then the shipping tab is empty. I enabled shipping methods in store. This may be a simple question.


texts:
How are you implementing Retina product images in Magento? I've seen a few commercial themes on the web doing it, but I'm not sure how.

Using something like Retina.js hasn't worked either for both product images and static block images.


texts: accessing external MSSQL database from magento to display more data

texts:
I am trying to pull information from an external mssql database for extra product information and display them on the product view page.

I have read other similar posts, but they are for mysql only and not complete.
I am using Magento 1.9, Ubuntu 15.04.

Thanks in advance.


texts: Magento 1.9 Transactional Email 'Add New Template' Page Error

texts:
I've recently upgraded from Magento 1.7 to 1.9. Everything appears to work fine except one thing. When I try to create email template from System > Transnational Emails > Add New Template, the page does not load entirely. When I check the code, I see the following fatal error message:

Fatal error: Class 'Mage_Newaccountnotify_Helper_Data' not found in /home2/mycpaneluser/public_html/mywebsite.com/app/Mage.php on line 547

EDIT: Looks like I sorted this out finally. It may not be ideal but work for me now. I created a folder called 'Newaccountnotify' under app/code/core/Mage. Under it I created the following folder & file: /Helper/Data.php. Then the following code is placed in the Data.php file:

class Mage_Newaccountnotify_Helper_Data extends Mage_Core_Helper_Data { }

Now my add new template page is loading just fine :)


texts: mailchimp Create Merge Fields in magento 1

texts:
When I click on button Create Merge Fields I got an error in a log file

2019-10-29T16:47:37+00:00 DEBUG (7): Merge Max Limit Exceeded for Api Call: [https://us15.api.mailchimp.com/3.0/lists/7e3c61605f/merge-fields/] using method [POST]
    Detail: [You have exceeded the maximum number of 30 merge fields for this list.]
    Params:
        {"name":"Middle Name/Initial","type":"text","tag":"MNAME","public":true}

i use last mailchimp extension version.
My Customer Fields Mapping:

What is wrong in my config?


texts:
I'm running Magento ver. 2.3.5-p1. I have three stores running on one website
When I set a new from date in a specific store scope for a product, on save Magento updates all store scopes.
Bug or by design?


texts: Magento 2 : Send email of unused quote information to store admin with separate module

texts: If customer not generated any order while fill checkout form and not created any order for few hours like 6 hours , so store admin getting email and get details of that customer.


texts: How to find order is exist using sku in magento 1.9?

texts:
How to find order exists using SKU in Magento 1.9.

SKU is "ABC";

I want to check how many orders are available for the particular product using SKU.


texts: Get Last Added Product ID of Cart without using checkout session

texts:
I am using RESTful APIs of Magento and I want to get the last added product id of in the cart. All of my searches are using the Checkout Session method of Magento which is

$this->checkoutSession->getLastAddedProductId();

But this is not applicable on my end since I am using the RESTful APIs.
Can someone help me if there are any available functionality where I can put a one liner method and class to get this with Quote.
My other solution is to fetch by
Quote :: getAllVisibleItems() and get the last item's product id but I believe it would affect the performance.

Thank you for your help folks.


texts:
All the new category changes are done on staging server, and now i wanted to move it to live. I cannot move complete database, since both the database are not synchronized and i don't want to loss sales/order/customer data.

If i only move table that are specific to category, will this work without any issue? I also wanted to retain category ID after moving it to production server.

Can anyone please guide which all table i need to move to make this category migration successful.

Thank You.


texts: How to configure REST without edit the controls manually?

texts:
Hello I am developing an extension for magento that adds a new call to the REST API. This call must be accessible to everyone so by now the guest user must be configured manually to allow him use this call.

I would like to automatically setup the permissions when my extension is loaded. Is there any parameter that I can add to the configuration files to do this?