texts: Changing custom option (text input) on checkout_cart_product_add_after

texts:
I need to transform the string of a custom option of a product when it is added to the cart, but I'm having difficulty doing so..

On the checkout_cart_product_add_after I have the following method being fired:

public function transformStringExample(Varien_Event_Observer $observer)
{

    $quoteitem = $observer->getQuoteItem();

    // $optionId is the ID of the custom product option I want to change
    $option = $quoteitem->getOptionByCode('option_' .  $optionId);
    $option->setValue($newValue);

}

It seems to work as the quote item option get's successfully saved in the database (sales_flat_quote_item_option). However, when I look at it in the cart, it seems to still be showing the values from the info_buyrequest.

Am I misunderstanding how this works? Or do I have to get the buyrequest, delete it from the quote item, change it, and then "re-set" it using Mage_Sales_Model_Quote_Item::setOptions because there doesn't seem to be a way to easily editing the buyrequest...

Thanks in advance.

Edit:

I've tried what @Vinai suggested here https://stackoverflow.com/a/9344336/896657, which is grabbing and editing the info buy request, but I still can't get it to work..

if ($info = $quoteitem->getProduct()->getCustomOption('info_buyRequest')) {
    $infoArr = unserialize($info->getValue());

    $infoArr['options'][$optionId] = $newValue;

    $info->setValue(serialize($infoArr));
    $quoteitem->addOption($info);
}


texts:
I'm following magento 2 official documentation to create my checkout step. I'm very new to knockoutjs, requirejs, js components which are massively used in magento 2, specially in checkout.

I'm struggling to understand the concept of mixins, extending and overriding js in magento.

  I have seen somewhere earlier map was used to override js file. Now here mixins is used and seem to me to serve similar purpose.

In that documentation in this code section of viewModel:

define(
    [
        'ko'
    ], function (ko) {
        'use strict';

        var mixin = {

            initialize: function () {
                this.visible = ko.observable(false); // set visible to be initially false to have your step show first
                this._super();

                return this;
            }
        };

        return function (target) {
            return target.extend(mixin);
        };
    }
);

  target is passed to a function, which is returned from the viewModel,
  at last, it further extends itself with mixin model.
  I'm confused here as well, where does target come from and what is being returned actually.

In short, my question is what is the difference between mixin and map, and explanation to the viewModel.


texts:
I have this web site with the main menu (drop down effect) on my frontpage/homepage. In the main menu I have 7 different categories for my products. All categories are linked to category's pages, and that is absolutely OK.

I would like it to show how many products are in the specific category (number of total items in category, right beside the link).

for eample:
Shirts (10)


texts: Magento 2.3.5 - Customer login frontend does not work

texts:
For some reason our customer login form on the frontend does not work anymore.
We still can login into the backend without any problems.

I check the log files, but there are not error's displayed. Also there is no frontend error displayed.

Anyone a idea how to solve this problem?

EDIT: First it seems to be a CAPTCHA problem, I get the following error;

You cannot proceed with such operation, your reCaptcha reputation is too low.

After that we disabled the CAPTCHA on frontend and then we get the following error;

The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.

Account and login details are correct, but it does not load. Also the customer account is not disabled or blocked.

Anyone a idea?


texts:
If Only part of the data is to be updated then is sent the following way:
{
  "entity": {
    "entity_id": 1,
    "is_enable": 1,
    "name": "Hello",
    "title": "I am here"
  }
}

save method:
public function save(EntityInterface $entity)
    {
        /** @var EntityInterface|\Magento\Framework\Model\AbstractModel $entity */
        if (empty($entity->getStoreId())) {
            $storeId = $this->storeManager->getStore()->getId();
            $entity->setStoreId($storeId);
        }
        try {

            $this->resource->save($entity);

        } catch (\Exception $exception) {
            throw new \Magento\Framework\Exception\CouldNotSaveException(__(
                'Could not save the Entity: %1',
                $exception->getMessage()
            ));
        }
        return $entity;
    }

On return $entity only the field with value from post rest is null:
{
    "entity_id": 1,
    "is_enable": 1,
    "name": "Hello",
    "title": "I am here",
    "store_id": null,
    "line_address1": null,
    "line_address2": null,
    "line_address3": null,
    "town": null,
    "city": null,
}

Now if I use the getById() method and replace the $entity with the returned data e.g:
$entity = $this->getById($entity->getEntityId());
return $entity;

I get the full data minus fields just updated e.g:
If I change "name": "Hi" and  get "name": "Hello" It return "name": "Hi" on the next update call:
I have a joint table in model collection in _initSelect.  I noticed that my second model factory not returning the field straight away even thought it saves on the first call so after save mainTable model I use secondTable Factory to save the data related to mainTable entity E.G:
$this->resource->save($entity);

$secondTable = $this->secondTableFactory->create();
$secondTable->setData($entity);
$secondTable->save();

This work but I'm still investigating as to why it does not return the updated fields on the first call.
EDITED:
There are data for this entity id on all the field but it doesn't seem to be picking it up any one any idea?
Thanks


texts: Is there any alternative for commands in Magento?

texts:
We are all known that there are commands we need to run at some instances in Magento.Is there any possibilities to make things work without running commands?

For example, we can flush the cacheeven in admin panel of Magento.


texts: Fetching order details but items and extension_attributes array are empty

texts:
public function execute()
{
    $order=$this->orderFactory->load(1);
    $orderItems = $order->getAllItems();

    foreach ($orderItems as $item) {
    //echo $item->getProductId();
    echo "<pre>";
    print_r($item->getData());
    echo "</pre>";
    }
    exit();
  return $resultPage;
}


texts: Unable to unserialize value? On customer edit?

texts:
While Editing The Customer, I'm Getting This Message. How Can I Solve This.?

I found there was an issue with this method in

  vendor/magento/framework/Serialize/Serializer/Json.php

public function unserialize($string)
{
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        throw new \InvalidArgumentException('Unable to unserialize value.');
    }
    return $result;
}

Please help me out. Thanks!


texts: I need to create a new module to table exists with another prefix of mam

texts:
I need to create a new module and this project have tables with other prefixes, How I omit this default prefix in my file /Model/ModelTable.php

this is the code inside:

namespace Arkix\Zonas\Model\Resource;

class Zona extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{

    /**
     * Construct
     *
     * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
     * @param string|null $resourcePrefix
     */
    public function __construct(
        \Magento\Framework\Model\ResourceModel\Db\Context $context,
        $resourcePrefix = null
    ) {
        parent::__construct($context, $resourcePrefix);
    }

    /**
     * Model Initialization
     *
     * @return void
     */
    protected function _construct()
    {
        $this->_init('app_places_zones', 'id');
    }
}


texts: How do I make a module with the form component?

texts: I want to know how I can create a module that uses the Form Component. Nothing advanced, I just want to know how to make a simple form that can read and write entries from a database, for example a form where you can register and output users. I can't find any good examples. Any guides or tips are very welcomed.


texts: How to deploy cms pages in a multi environment setup

texts:
If our business users create cms pages in a dedicated dev environment.

How would we deploy those pages to staging and then production?


texts: Magento 2 Commerce Customer Segmentation Non Login User

texts:
I am working with Magento 2 commerce (2.4). We need to show different content for users coming from different locations (We have different content for each state). And I am planning to use Magento 2 Customer Segmentation and Dynamic blocks for it. Few questions that I have are,

Is it possible to tag a visitor (Non logged user) as a customer, If so how can I do it?
Is it possible to use a dynamic block with customer segment filter to show different content with respect to the user location. If so how can I do it?
Is using customer segments the best possible solution for showing content with respect to the user location? Do it have any impact on site performance.


texts: Show product list of specific category not show

texts:
I'm using Magento 1.9.2.3 and I want to add a list of products from specific category using this block code:

{{block type="catalog/product_list" name="home.catalog.product.list" category_id="13" template="catalog/product/list.phtml"}}

Also, I add a permission into the blocks permission but is not working.

What can I do?


texts: Magento2 How to add custom js for checkout billing address only

texts:
Does anyone know how i can add custom js for billing address form only ?
i need to get default selected country from billing address


texts:
Are we supposed to remove reference of pub from line 67,102,206 of VCL like we remove from line 13 if the Magento root directory is pub?

https://github.com/magento/magento2/commit/882379061809b806fc5580729a6c9c78d782f84d#diff-2f64f6171deecba61bea147539cf72ec

https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish-advanced.html


texts: Sales Revenue per product from sales/order

texts:
I need to get the sales revenue per product using sales order.

I have been using product_collection to multiply FinalPrice with order_qty
But as the FinalPrice changes, this is no good to work out the actual sales revenue.

I can get the revenue for all products but I cannot seem to filter by Product ID.

$revenue = Mage::getModel( 'sales/order' )->getCollection()
            ->addAttributeToSelect('grand_total')
            ->getColumnValues('grand_total');

$overall_profit = array_sum( $revenue );
$overall_profit = Mage::helper( 'core' )->currency( $overall_profit, true, false );

I am using this inside a loop so I have access to Product_ID, SKU etc


texts: How-to Import CSV to disable products in Magento 2

texts:
I have exported a list of all my products as there are quite a few I would like to disable.

I notice there is a disable button in the product editor on Magento Admin. What column represents this in the CSV file?

I would like to change this column to disable for products I would like to temporarily suspend from sale.


texts:
I need to set postcode value

I have read about using a plugin:

<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="set_postcode" type="Vendor\ModuleName\Plugin\Model\Checkout\LayoutProcessorPlugin" sortOrder="10"/>
    </type>

LayoutProcessorPlugin.php

<?php
namespace Vendor\ModuleName\Plugin\Model\Checkout;
class LayoutProcessorPlugin
{
    /**
     * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject
     * @param array $jsLayout
     * @return array
     */

    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array  $jsLayout
    ) {

        $codPostal = $this->_dataHelper->getCodPostal();

        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
        ['children']['shippingAddress']['children']['shipping-address-fieldset']
        ['children']['postcode']['value'] = $codPostal;

This works fine if ShippingAddress is not in cache.

How can I disable the cache of the postcode field's sending information, so that the value is always refreshed?

Thanks!!


texts: How do I disable fullpage cache on Product View page?

texts:
Hi this is my config xml code:

    <?xml version="1.0"?>
        <config>
            <modules>
                <Test_Disablefullpage>
                    <version>0.1.0</version>
                </Test_Disablefullpage>
            </modules>
            <global>
                <models>
                    <test_disablefullpage>
                        <class>Test_Disablefullpage_Model</class>
                    </test_disablefullpage>
                </models>
                <frontend>
                    <events>
                        <controller_action_predispatch>
                            <observers>
<test_disablefullpage_controller_action_predispatch_catalog_controller_product_view>
                                    <class>test_disablefullpage/observer</class>
                                    <method>disableCache</method>
                           </test_disablefullpage_controller_action_predispatch_catalog_controller_product_view>
                            </observers>
                        </controller_action_predispatch>
                    </events>
                </frontend>

            </global>
        </config>

This is my Observer.php file from the model folder:

class Test_Disablefullpage_Model_Observer
{
    public function disableCache(Varien_Event_Observer $observer)
    {
        $action = $observer->getEvent()->getControllerAction();
        echo 1 ; exit();
        // Check to see if $action is a Product controller
        if ($action instanceof Mage_Catalog_ProductController) {
            $cache = Mage::app()->getCacheInstance();

            // Tell Magento to 'ban' the use of FPC for this request
            $cache->banUse('full_page');
        }
    }
}

Did I miss smth ? Or why I do not get the echo 1 exit() when I access the Product View page ? My guess that I didn't use the right event. Thx


texts: Create POST API to update order custom fields using increment ID

texts:
I need to update order custom attributes from increment ID using a custom REST API.
I receive this XML :

<order>
  <data>
    <incrementId>000000007</incrementId>
    <blNumber>test</blNumber>
    <sapDocNumber>test666</sapDocNumber>
    <invoiceNumber></invoiceNumber>
  </data>
</order>

I already created webapi.xml file taking example from magento order native module. But I don't know how to process then. Any help ?


texts: How to add storeview switcher in custom admin grid which created using ui component in magento2.2.5?

texts: How to add storeview code in admin grid which created using ui component.


texts: How to save/select a custom phml form in DB on Magento 2

texts:
I have created a custom module, and i have this phtml:

test

        <form>

                Naam

                <input type="input" name="club-name" id="club-name" class="input-text" >

                E-Mailadres

                <input type="input" name="club-name" id="club-name" class="input-text">

                Wachtwoord vergeten?

                <button type="submit" class="action login primary" name="send" id="send2">CLUBLOGIN INLOGGEN</button>

        </form>

In this module i have already set a controller, block and i have created a custom table also.

My question:

How can i submit this form and insert/select this 2 fields into DB, via Controller or Model?

Does anyone can help me with some instructions?

Thank you in advance!


texts: I want PayPal integration with SOAP in Magento

texts:
I have done a complete order with ccsave using SOAP:

$setCustCrtPayMethod = $proxy->shoppingCartPaymentMethod($session, $_REQUEST['CartId'], array(
    'po_number' => null,
    'method' => 'ccsave',
    'cc_cid' => $_REQUEST['cc_cid'],
    'cc_owner' => $_REQUEST['cc_owner'],
    'cc_number' => $_REQUEST['cc_number'],
    'cc_type' => $_REQUEST['cc_type'],
    'cc_exp_year' => $_REQUEST['cc_exp_year'],
    'cc_exp_month' => $_REQUEST['cc_exp_month']
));

But when I add this

$paymentMethod = array(
     'method' => 'paypal_standard',
     'last_trans_id' => 'xxxxxxxxxxxx'
 );

in

$setCustCrtPayMethod = $proxy->shoppingCartPaymentMethod($session,  array(
    'po_number' => null,
    'method' => 'paypal_standard',

);

It will send a blank response. How can I configure PayPal?


texts: Magento 2.1.0.0 new order email template preview and save 404 not found issue

texts:
My website is at magento 2.1.0  version when i load new order email template, it shows below error:

  Error: The template did not load. Please review the log for details.

To correct the error I updated the line"var order.getShippingDescription()":"Shipping Description", with a comma ","at the end as suggested in some support pages to resolve the template load issue.

Now I can load new order email template but the measure problem is that when I click to preview or save template it goes a 404 page and nothing happen.

Some support page are saying to Install Magento 2.1.0-rc3 using composer.

What is Magento 2.1.0-rc3 and where I can get it download and install or there is any other option to resolve this issue .

I want to keep the megento 2.1.0 version for my website.

Please reply with the correct solution .


texts: Import Order/Invoice/Credit Memos/ Transaction/ Comment History

texts: Is there anyways we can import the Order/Invoice/Credit Memos/ Transaction/ Comment History to M2 from M2.


texts: Magento get product availiblity on checkout review

texts:
I want to check the availiblity of a product and display that on the review block inside the checkout.

Therefore I want to edit the following file:

/app/design/frontend/theme/theme/template/checkout/onepage/review/item.phtml

I need something like this:

<?php $inventoryQuantity = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>
<?php if($inventoryQuantity <= 0): ?>
<?php endif; ?>

How can I achieve that? Because that does not work. It always load value 0, when checking <?php echo inventoryQuantity; ?>


texts: Magento 2.3 Product detail page main image with white background

texts: I have inserted the image into the product and check then product coming with the white background.How to remove this white background and display image small ?


texts:
I'm running M2.3.5. Every so often I'll get a small batch of errors from IPs outside my country (all US). I'm getting notifications in the form of Store Debug Errors. Here's an example:

URL: https://example.com/rest/default/V1/guest-carts/v5IQojiQH23IWZe48pFL8IftKyRgGOW6/save-delivery-date
Server cannot match any of the given Accept HTTP header media type(s) from the request: "text/html" with media types from the config of response renderer

I even found someone else who ran into this on the M2 Forum. I don't see a reason why anyone would be trying to access rest in this way other than maybe someone is poking around? Especially as the source is outside our catchment country.


texts: Magento2 Api Get Admin User Details Inside Magento

texts:
I'm making a call to Magento API and I need to save the current admin id

POST /rest/V1/precart/create HTTP/1.1
Host: magento2.local
Content-Type: application/json
Authorization: Bearer 59f6t7aso8a37g1hxbkd5ol0pem3cd3b
Cache-Control: no-cache
Postman-Token: 7456cf04-634e-4f6f-acb9-c85ca18d849a

{
    "preCart" : {
        "sku": "123",
    }
}

I tried some suggestions, but I think this only work with normal site session.
How I do this by API?

protected $_authSession;
public function __construct(
    \Magento\Backend\Model\Auth\Session $authSession,
    ...
)
{
    $this->_authSession = $authSession;
    ...
}

/**
 * Processing data before model save
 *
 * @return $this
 */
public function beforeSave()
{
    if (empty($this->getUserId()) && $user = $this->getCurrentUser()) {
        $this->setUserId($user->getId());
    }

    return parent::beforeSave();
}
/**
 * @return \Magento\User\Model\User|null
 */
public function getCurrentUser()
{
    return $this->_authSession->getUser();
}


texts: How to send diffrent order emails to admin and customer?

texts:
I would like to send different emails to both customer and admin. I have two email templates New Order and Admin Order.

And I am setting the template on System->Configuration->Sales->Sales Emails->Order

Here I can assign only one email template. I would like to send two email template to both customer and admin.

I want to send diffrent emails to both customer and support@example.com . How to achieve this ?


texts: how do I change or off in backend for uploading image default MAX WIDTH?

texts:
In Backend -> PRODUCTS -> CATALOG -> [any product] -> Images and Videos when uploading images, Magento automatically makes resize(max-width 1920px). I need a image width 2600px. each product with self background. I created the Image-attribute: produkt_bg and show it on the product page. but the width is not enough.

How do I change this or turn it off in backend for uploading image default MAX WIDTH?


texts: Can I disable the Magento Inventory modules?

texts:
I have my stock synchronized and managed by SAP, because of it I'm having issues with the inventory quantity vs salable quantity, I won't use multi-source inventory in this project,

can I disable all the Magento_Inventory modules and not have issues?

    'Magento_Inventory' => 1,
    'Magento_InventoryAdminUi' => 1,
    'Magento_InventoryAdvancedCheckout' => 1,
    'Magento_InventoryApi' => 1,
    'Magento_InventoryBundleProduct' => 1,
    'Magento_InventoryBundleProductAdminUi' => 1,
    'Magento_InventoryCatalog' => 1,
    'Magento_InventorySales' => 1,
    'Magento_InventoryCatalogAdminUi' => 1,
    'Magento_InventoryCatalogApi' => 1,
    'Magento_InventoryCatalogSearch' => 1,
    'Magento_InventoryConfigurableProduct' => 1,
    'Magento_InventoryConfigurableProductAdminUi' => 1,
    'Magento_InventoryConfigurableProductIndexer' => 1,
    'Magento_InventoryConfiguration' => 1,
    'Magento_InventoryConfigurationApi' => 1,
    'Magento_InventoryDistanceBasedSourceSelection' => 1,
    'Magento_InventoryDistanceBasedSourceSelectionAdminUi' => 1,
    'Magento_InventoryDistanceBasedSourceSelectionApi' => 1,
    'Magento_InventoryElasticsearch' => 1,
    'Magento_InventoryExportStockApi' => 1,
    'Magento_InventoryIndexer' => 1,
    'Magento_InventorySalesApi' => 1,
    'Magento_InventoryGroupedProduct' => 1,
    'Magento_InventoryGroupedProductAdminUi' => 1,
    'Magento_InventoryGroupedProductIndexer' => 1,
    'Magento_InventoryImportExport' => 1,
    'Magento_InventoryCache' => 1,
    'Magento_InventoryLowQuantityNotification' => 1,
    'Magento_InventoryLowQuantityNotificationAdminUi' => 1,
    'Magento_InventoryLowQuantityNotificationApi' => 1,
    'Magento_InventoryMultiDimensionalIndexerApi' => 1,
    'Magento_InventoryProductAlert' => 1,
    'Magento_InventoryRequisitionList' => 1,
    'Magento_InventoryReservations' => 1,
    'Magento_InventoryReservationCli' => 1,
    'Magento_InventoryReservationsApi' => 1,
    'Magento_InventoryExportStock' => 1,
    'Magento_InventorySalesAdminUi' => 1,
    'Magento_InventoryGraphQl' => 1,
    'Magento_InventorySalesFrontendUi' => 1,
    'Magento_InventorySetupFixtureGenerator' => 1,
    'Magento_InventoryShipping' => 1,
    'Magento_InventorySourceDeductionApi' => 1,
    'Magento_InventorySourceSelection' => 1,
    'Magento_InventorySourceSelectionApi' => 1,
    'Magento_SalesInventory' => 1,
    'Magento_ScalableInventory' => 1,
    'Magento_InventoryShippingAdminUi' => 1,
    'Magento_CatalogInventoryStaging' => 1,


texts: Inline CSS file for custom email template in custom module not loading

texts:
I'm using Magento version 2.2.0 to create a custom email template for my custom extension, I need to add inline CSS to the email template, I've followed the instruction here , so my email template file look like this:

{{template config_path="design/email/header_template"}}

{{inlinecss file="css/email-inline.css"}}

 {{trans 'Dear %dear,' dear=$dear |raw}}

 {{var message |raw}}

            {{var content |raw}}

{{template config_path="design/email/footer_template"}}

My file location for CSS code

  app/code/Namespace/Module/view/frontend/web/css/email-inline.less


texts: Geting list of associated products of group product

texts:
I'm struggling to get a list of associated products from addtocart.phtml.

I've already tried all options from this and other forums but nothing is working as I wish.

I've got this:

$products = Mage::getModel('catalog/product')
                ->getCollection()
                ->addAttributeToFilter('type_id', array('eq' => 'grouped'));
            foreach ($products as $product) {
                $associatedProducts = $product->getTypeInstance(true)->getAssociatedProducts($product);
            }

But it seems is always pulling associated products only form first group product in catalog doesn't matter which group product currently viewing.

This probably mean I have to force it to get products for particular id by using $_product->getId() but I don't know how to do it as it's my first week with magento at all.

I will appreciate for any suggestions.


texts: Set Grouped Product Pages to 1 Column layout

texts:
How do i set the grouped product pages to 1 column layout.

We want to leave the standard/simple products as they are which is 2 column left and just change grouped products to 1 column

Mike


texts:
I made an add to wishlist with ajax module and I want to indicate if the product is already in wishlist without breaking the full page cache. I know the wishlist object is in customer-data but I can't get the Items from that object. Can you help me with some pointers?

js file code

define([
    'jquery',
    'Magento_Customer/js/customer-data',
    'Magento_Customer/js/model/customer',
    'jquery/ui'
], function ($, customerData, customer) {
    'use strict';

    $.widget('test.wishlistChecker', {
        wishlistClass: 'in-wishlist',

        /** @inheritdoc */
        _create: function () {
            console.log('test checker');
            this.checkWishlistItems();
        },

        /**
         * Check customer wishlist
         */
        checkWishlistItems: function () {
            var wishlistItems = customerData.get('wishlist')['items'];

            console.log(wishlistItems);

        }
    });

    $(document).wishlistChecker();

    return $.test.wishlistChecker;
});


texts: magento2: how place 2-3 form fields in one row in admin edit form

texts: I want to add multiple form fields in single row in admin edit form, My question is same as in the link here.(however I only asked this question)


texts: I want to create an android app version of my Magento Store (1.9.x). But I checked the REST API, its seems limited? How can I create a cart and payment module?


texts:
When 'm trying to join two tables in Magento 2, I get an empty result. This is the initial function that returns data from  single table customer_entity without any error.

\Block\Account\Message\Message.php

   public function getTestCollection()
{
    $page = ($this->getRequest()->getParam('p'))? $this->getRequest()->getParam('p') : 1;
    $pageSize = ($this->getRequest()->getParam('limit'))? $this->getRequest()->getParam('limit') : 5;

    $test = $this->_test->create();

    return $collection;
}

Later I have added following lines of codes to join first table with another custom table called affiliate_account.

    $second_table_name = $this->_resource->getTableName('affiliate_account');

    $collection->getSelect()->joinLeft(array('second' => $second_table_name), 'customer_entity.entity_id =  second.customer_id');

This returns nothing and what is the correct way to join these two tables.


texts:
i want to know the magento 2 rest api for add product to cart
am trying
post /rest/V1/guest-cart and am getting cart_id then
post /rest/V1/:card_id/items in postman and am getting error like

{
    "message": "%fieldName is a required field.",
    "parameters": {
        "fieldName": "cartItem"
    }
}


texts:
I have tried to do it in register.phtml, but it did't working for me. I can't find local.xml file too.

How i can enable it? This is really important thing in my shop.


texts: Why "All Store View" option is hide from store select box , if single website is present for admin section?

texts: I am working one website - many stores magento setup, i assign one website to sub admin and detect "All Store View" is hide in that case.Why this option is hide from select box?


texts: After successful installation, admin URL is returning a 404?

texts:
I successfully installed Magento 2 using MAMP and OS X, front end is working great but when I clicked the "Launch Magento Admin" button upon installation it returned a 404 on the front end, and when trying to access the admin manually through http://localhost/magento2/admin the same thing happens.

I tried deleting all files and starting over but am facing the same issue.

Has anyone had this happen before? Thanks in advance.

Edit: So I forgot to mention I was using port 8888, and it turns out using anything other than port 80 causes a re-direct when trying to access the admin (as shown in the below answer)


texts: How to switch views without the store switcher?

texts:
I have set up a view that has different settings that we want to use for our own purposes but we dont want customers to see it.

I have removed the store switcher control from the template.  How can we manually switch store views ourselves without having the control there?


texts: how to hide qty box from out of stock product page

texts:
There is a quantity box on each Magento product page. I'd like to hide this quantity selector on Out of Stock product pages.

How can I achieve this?


texts: How do I know security patch - 6788 applied or not?

texts:
I'm new to applying Magento Security Patch. So here

Initially I have applied PATCH_SUPEE-6482_EE_1.13.1.0_v2.sh patch for which I'm getting applied.patches.list file in app/etc/.

And the applied.patches.list looks like now as below

2015-11-05 12:06:05 UTC | SUPEE-6482_EE_1.13.1.0 | EE_1.13.1.0 | v2 | 7e38036f94f250514fcc11d066a43c9bdb6a3723 | Tue Jul 28 14:29:35 2015 +0300 | v1.13.1.0..HEAD
        patching file app/code/core/Enterprise/PageCache/Model/Processor.php
        patching file app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
        patching file app/code/core/Mage/Catalog/Model/Product/Api/V2.php
        patching file app/code/core/Mage/Core/Controller/Request/Http.php
        patching file app/design/frontend/base/default/template/page/js/cookie.phtml
        patching file app/design/frontend/enterprise/default/template/giftregistry/search/form.phtml

1) Now I have downloaded and paste it on local magento root folder.

i.e., magento/PATCH_SUPEE-6788_EE_1.13.1.0_v1.sh

2) and I have created patch.php file written below coding.

<?php
print("patch");
print("<PRE>");
passthru("PATCH_SUPEE-6788_EE_1.13.1.0_v1.sh");
print("</PRE>");
?>

3) In my browser I have entered http://192.168.0.52/magento/patch.php

Automatically Command Prompt opened and some queries executed and eascape it.

But in applied.patches.list I am not getting SUPEE-6788 Result as shown above result. So it is success or Failure I don't know how Can i find?

Could you please let me know how can I Know?


texts: How to get country name from country code?

texts:
$collection = Mage::getModel('custom/table')->getCollection();

I have one custom table and there is one field country_code.
Now I am passing this $collection to my javascript and using variables in that.
Now I want to display country name instead of country code.

Is there any way from which I can add country name in my collection using join query or any way else ?
so before passing to js I want country name in my collection object.


texts: After M1 to M2 Migration Salable Qty Empty

texts: Add inventory_stock_1 Table, Show product Out of stock


texts: how to get a custom column like timeslot-> delivery_title, delivery_date in magento order grid

texts:
I need your support, Delivery Time and Date in Order Grid How to load .....

Table Name = timeslot
Table Fields = id, delivery_title, delivery_date, order_id

my question is how to call this data in my order grid.... please help me......

protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$select = $collection->getSelect();
$resource = Mage::getSingleton('core/resource');
$select->join(
array('timeslot' => $resource->getTableName('deliverytime/timeslot')),
'order.timeslot_order_id = timeslot.order_id',
array('timeslot_delivery_title' => 'delivery_title')
array('timeslot_delivery_date' => 'delivery_date')
);
}

protected function _prepareColumns()
{
$this->addColumn('delivery_title', array(
'header' => Mage::helper('deliverytime')->__('Time Slot'),
'index' => 'delivery_title',
'type' => 'options',
'width' => '120px',
'options' => Mage::getSingleton('core/session')->getAkDeliverytime(),
));

$this->addColumn('delivery_date', array(
'header' => Mage::helper('deliverytime')->__('Deliver Date'),
'index' => 'delivery_date',
'type' => 'options',
'width' => '120px',
'options' => Mage::getSingleton('deliverytime/deliverytime')->getAkDeliverytime(),
));
}


texts:
I would like to stop order emails when order placed in Magento store.

Actually, the whole idea is to send an email when order placed with "We've received an order and will let you know asap."

After this email admin will review the order and then if it's fine then he'll approve the order and later on default system will handle it.

How can I achieve this?

I've come up with an idea to create new order status I've only offline payment methods in my store.

Is any idea/hint will be appreciated.

PS: For now not willing to use any extension.


texts: Special price VAT inclusive rounding to 4 decimals

texts:
I'm having some rounding issues with a Magento 2.3.5 store.
Prices in the admin are VAT-exclusive and shown VAT-inclusive on the front-end.
Initially I had an issue with Magento's rounding to 2 decimal places, ending up with some weird prices like €43.01, but using the code at https://github.com/meanbee/magento2-tax-rounding fixed this.
However, I'm now having the same issue with special prices.
I assume the code used to do the rounding for these special prices is elsewhere in the Magento 2 codebase. I don't know the codebase very well, so I'm probably missing some obvious location, but a search didn't turn up anything that looked like a good candidate.
I've looked at other similar questions. Some are close but none I found really target my specific issue.
If anyone has any pointers to where these special prices are calculated/rounded, I'd appreciate the help.
Thanks!


texts: Why am I getting unrelated items in my site search?

texts:
I've had a play around with various settings - previous to me running the site I realized that when you searched for something it wasn't bringing up anything related, as the site wasn't using descriptions/meta keywords or anything in the search.

For a one word search it now seems to work, but as soon as I added a number after it just brings up pages of non related items.

In this example I search "Linx" and it brings up the products where I have added the word linx to the meta keywords or description. As soon as I put "Linx 8" in it brings up lots of items that aren't related at all and don't have the term "linx 8" anywhere in the product pages.

I thought that maybe making it unable to search by SKU or price might help but it seems that it only made a small dent in the amount of items that are coming up.

I've only just started using magento so apologies if this is a quick fix  but I am stumped!


texts: Magento 2: Error happened when getting access code, please try again later

texts: Anybody know what this error is about, I installed a clean version of Magento 2.3.1 then installed this extension to test and get this error?


texts: Get error message by Report ID in magento2 Programmatically

texts:
message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5b5aff5a570b7

I am getting above message from one of the custom Api.

From the report id "webapi-5b5aff5a570b7" can we get the message show in frontend. Yes that will be stored in exception.log file, can we get that by using Report Id?


texts: Magento 2.1 - insert block before product title on Luma

texts:
I have a custom module that I'd like to insert a block into product page before the product name using Magento Luma theme.
I added the following layout xml file into Vendor/Module/view/frontend/layout/catalog_product_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="product.info.main">
            <block class="Vendor\Module\Block\Product\View\CustomBlock" name="product.info.custom_block" template="Vendor_Module::block.phtml" before="page.main.title" />
        </referenceContainer>
    </body>
</page>

However, the custom block appears at the end of product.info.main not before the product name.
What I found is that luma is actually moving the page.main.title in own layout update vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="product.info.main" before="-"/>
        ...
    </body>
</page>

I believe my update is not working because Magento is first parsing the layout updates from modules, and then from themes. So when my block is inserted there's no page.main.title to insert before, so it ends up at the end, and then Magento parses updates from theme inserting title in product.info.main

Is there a way of ensuring that my block shows in the correct place?


texts: Magento Module AJAX action in MultishippingController returns 302 when not logged in

texts:
I am writing a custom module to add some functionality to the Multishipping Register page. I've extended the Mage_Checkout_MultishippingController class with an action

public function verifyRegisterAction()
{
     Mage::log("testing..",null,"verifyRegisterAction.log");
     // some stuff...

 $this->getResponse()->setHeader('Content-type', 'application/json');
 $this->getResponse()->setBody(json_encode($data));

}

I am able to call this action successfully by browsing to /checkout/multishipping/verifyRegister when I am logged in. I can see the log gets written to and see the json response. However, if I am not logged in then I get a HTTP 302 response and nothing is written to the log.

The registerAction() is obviously available since it renders the register page itself. What do I need to do to make this action available when not authenticated? What steps can I take to debug what is happening?


texts: When and how customer data is set on local storage Magento 2 (localStorage['mage-cache-storage'])

texts: I want to find out which js sets the customer data in local storage in magento2.


texts: How can I add attribute to product properly?

texts:
I'm trying to add attribute to product entity. It seems that my upgrade script run, because module version is upgraded in core_resource table.

However I can't find it at catalog attributes listing.

Upgrade script code:

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

$installer->addAttribute(
  Mage_Catalog_Model_Product::ENTITY,
  'use_discount_label',
  array(
    'label' => 'Use discount label?',
    'default' => '0',
    'group' => 'Other',
    'type' => 'int',
    'input' => 'boolean',
    'source' => 'eav/entity_attribute_source_boolean',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'required' => false,
    'user_defined' => false,
    'unique' => false,
    'filterable' => 1,
    'is_configurable' => false,
    'comparable' => true,
    'filterable_in_search' => false,
    'is_html_allowed_on_front' => false,
    'searchable' => true,
    'used_for_promo_rules' => false,
    'used_for_sort_by' => true,
    'used_in_product_listing' => true,
    'visible' => false,
    'visible_in_advanced_search' => false,
    'visible_on_front' => false,
    'wysiwyg_enabled' => false,
  )
);

$installer->endSetup();

I'm using Magento EE 1.14.2.2.


texts: I'm using credit card, in my logs I get the error Transaction declined, but I don't see a blank page in front end. I want that errors appear in front end, at least a redirection to checkout page showing that errors. how can I do that ?


texts: Magento logins to another customer account (mixed accounts)

texts: Some customers are reporting a bug that when they login to their account are redirected to another random customer account where they can see all the other customer data (orders, addresses, everything).


texts: Not able to redirect sales_order_create/index after login

texts:
I have an event observer (admin_session_user_login_success) for redirecting the page to sales_order_create/index controller after the login action. When i login as a user, the page is redirected to sales_order/index page.

I need to redirect sales_order_create/index after login.

Config.xml

<events>
  <admin_session_user_login_success>
    <observers>
      <vtrio_offlineorder_login>
          <class>Vtrio_OfflineOrder_Model_Observer</class>
          <method>offlineuserRedirect</method>
          <type>singleton</type>
      </vtrio_offlineorder_login>
    </observers>
  </admin_session_user_login_success>
</events>

Observer.php

public function offlineuserRedirect($observer)
 {

   $link = "http://127.0.0.1/magento/index.php/admin/sales_order_create/index/";
   header("Location: $link");
   exit();
 }


texts: How can i send SMS when only customer register success Magento ver. 1.9.2.2?

texts:
I want to send SMS when  customer register success, I use customer_register_success magento event not working.
But when i use customer_address_save_after magento sms sending but problem here every time change address customer get sms alert.

How can i use customer_register_success event only for customer register success

\app\etc\modules\Sslw_Ismsregister.xml

<?xml version="1.0" encoding="UTF-8"?>
        <config>
            <modules>
                <Sslw_Ismsregister>
                    <codePool>local</codePool>
                    <active>true</active>
                </Sslw_Ismsregister>
            </modules>
        </config>

app\code\local\Sslw\Ismsregister\etc\config.xml

<?xml version="1.0" encoding="UTF-8"?>
        <config>
            <modules>
                <Sslw_Ismsregister>
                    <version>0.0.1</version>
                </Sslw_Ismsregister>
            </modules>
            <global>
                <models>
                    <sslwismsregister>
                        <class>Ismsregister_Model</class>
                    </sslwismsregister>
                </models>
                <events>
                    <customer_register_success>
                        <observers>
                            <Sslw_Ismsregister_model_observer>
                                <type>singleton</type>
                                <class>Sslw_Ismsregister_Model_Observer</class>
                                <method>SendSmsRegister</method>
                            </Sslw_Ismsregister_model_observer>
                        </observers>
                    </customer_register_success>
                </events>
            </global>
        </config>

app\code\local\Sslw\Ismsregister\Model\Observer.php

 class Sslw_Ismsregister_Model_Observer {
            public function SendSmsRegister(Varien_Event_Observer $observer) {
              Mage::log('customer_register_success '.'Mobile==',null,'SendSmsRegister001.log' );  //No log created
              $msisdn = $observer->getCustomerAddress()->getTelephone();
               Mage::log('customer_register_success '.'Mobile=='.$msisdn,null,'SendSmsRegister00.log' );
//NOT Create Log here for this event

            //START SMS API Code here your code here

          //ENd SMS API Code here your code
            }

        }

customer_address_save_after magento sms sending (SMS API Working Properly) but problem here every time change address customer get sms alert Module Code below:
Just change customer_address_save_after==>customer_register_success
https://github.com/SSLWireless/MagentoSMS/tree/master/Magento_SendIsmsRegister/app

Magento Events Cheat Sheet (1.9) List:

https://www.nicksays.co.uk/magento-events-cheat-sheet-1-9/


texts: Add script in Magento 2.1 admin section header

texts: i need to add a JS script in the admin HEADER tag in the admin section for all pages. how to do that?


texts: How to remove email invoice coupon code description

texts:
In invoice, when the client uses a coupon code it shows in total like Discount(description)
I just want to remove the description, where this can be edited?
Thanks in advance,
Best regards


texts: External URL post redirect without intermediate page (white page) in Magento 1.9.x

texts:
Is there any possibility from the shop-system to perform a post redirection while clicking on the 'Place Order' button? We have tried posting the form data using the function getOrderPlaceRedirectUrl and there is an intermediate page (a blank page). Is it possible to eliminate such a page and perform a redirection (to the third-party site) while posting the values from the shop?

As an additional info, in the function getOrderPlaceRedirectUrl, we are using the internal controller URL with custom block like what have been followed with the PayPal Standard Payment.


texts: 302 in magento rest api call on shared hosting

texts:
In magento 1.9.1 .0 I have made a few REST APIs and they work very well in my local machine. But When I moved the code to hosting environment, it is giving me 302 status code. I supposed the api itself is not working but while debugging I found that api functions well but in browser I get 302. A Similar question is here  302 Moved Temporarily.  Googled much but nothing helped me!

How can I get it working? I welcome all constructive suggestions.Thanks a lot!


texts: Magento 2.3 : Shipping Address Form Inline During Checkout

texts:
Shipping Address Form Inline During Checkout

I'm currently trying to customize the checkout process of Magento 2.3.0, and am wondering how to make the shipping address form inline when adding a second address (instead of the popup form).

I got a variable isFormInline, If I set it to true from shipping.js then it will open the form always on checkout shipping address with inline.

If I put this in a method onShippingAddressChanges with the condition of new address and set isFormInline = 1, But its not getting impact.

Can you please help me out on this, Thanks in advance.


texts: We have a card processing machine, in house.. However I am looking for a third party PCI compliant encrypted Company to save the credit card information, instead of our backend, for security purposes, and I would just feel more secure having the credit card information separate. Is this a good solution? Is this even possible?


texts:
Is it possible to generate a couponcode which do the following

Only one product for free
No shipping costs
Valid for one person only (i.e. winner)

If this is possible can somebody explain me how to achieve this?


texts: Magento, translate phrases of the wishlist and cart alert

texts:
I'm trying to translate the phrases that appear in the alert when trying to delete the item from the wishlist or in the shopping cart.

I refer to these two sentences:
- Are you sure you would like to remove this item from the your Wish List?
- Are you sure you would like to remove this item from the shopping cart?

I tried to translate these sentences into my translate.csv but it doesn't work.

Where can I find these alerts?

Thanks for any help


texts: Open Magmi from Admin Dashboard plus ACL

texts:
I'm using Magento 1.9.1.0 and Magmi 0.7.18.
I'm opening Magmi (with login and password) using url like this :

http://example.com/my-importer/web/magmi.php

How to open Magmi as a menu in the admin menu and adding user rules (ACL) in it ?


texts: How to change (automatically) order status Pending to Processing when payment (credit card) is accepted?

texts:
I use Cybersource simple redirect extension and i would like to change order status to processing when payment is accepted.
Current status for all orders (cancelled, refused, accepted, ...) is pending... I simply would like to get a different status for paid order.
Can someone help ?


texts: Magento 2 How to update a record in quote item option table

texts:
I have add a custom column in a quote_item_option table, Now I want to update a record based on a quote item id and I use bellow code :

 public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        \Magento\Framework\Session\SessionManagerInterface $session,
        \Magento\Quote\Model\Quote $quoteFactory,
        \Magento\Quote\Model\ResourceModel\Quote\Item\Option\CollectionFactory $optioncollection,
        \Magento\Quote\Model\QuoteRepository $quoteRepo,
        \Magento\Quote\Model\Quote\Item\Option $itemoption

    ) {
        $this->checkoutSession = $checkoutSession;
        $this->messageManager = $messageManager;
        $this->_session = $session;
        $this->_quoteFactory = $quoteFactory;
        $this->_optioncollection = $optioncollection;
        $this->_quoteRepo = $quoteRepo;
        $this->_itemoption = $itemoption;
    }

    /**
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        try {
            $quote = $this->checkoutSession->loadCustomerQuote();
            $result = $quote->getData();
            $quoteData = $this->_quoteFactory->load($result['quote_id_1']);
            $items = $quoteData->getAllItems();
            $optioncollection = $this->_optioncollection->create();
            foreach ($items as $value) {
                $optioncollection->addFieldToSelect('*')->addItemFilter($value['item_id'])->getData();
                if(!empty($optioncollection)){
                    foreach ($optioncollection as $v) {
                         $itemoption = $this->_itemoption->load($v['option_id']);
                         $itemoption->setCustomracking(json_encode($this->getValue()));
                         $itemoption->save();
                    }
                }
            }
        } catch (\Magento\Framework\Exception\LocalizedException $e) {
            $this->messageManager->addError($e->getMessage());
        } catch (\Exception $e) {
            $this->messageManager->addException($e, __('Load customer quote error'));
        }
    }

    public function getValue(){
        $this->session->start();
        return $this->session->getRackingData();
    }

    public function unSetValue(){
        $this->session->start();
        return $this->session->getRackingData();
    }

can any one help me with my code ?

where i am wrong ?


texts: Page for all items with a catalog price rule active

texts:
I have 5 catalog price rules that affects 3-4 categories each, they are applied one each day of the week (say: on monday we have cat 3 and 6 on sale, on tuesday it's cat 5, on wednesday it's 7, 10, 11...) on my catalog and I want to have a "SALE" page that will show all items with said discount. I've searched and found not many options for this.

I was thinking maybe I want to create a dynamic category using firegento (https://github.com/firegento/firegento-dynamiccategory/blob/develop/README.md) but I'm not sure what attribute/values should it look for that affect the price rules? I'd like to avoid having to create a template for this manually, hence why I'm looking into the category option, as it would maintain the look and feel of the website with it's layered navigation and all


texts: Magento2.1.14: Css not loaded after upgrading apache 2.34 to 2.37

texts:
I have upgrade apache 2.34 to 2.37. Then I have the problem that all css and js files are only throwing a 500 error and are not loaded. I have got this error on error log:
option followsymlinks not allowed here
I tried several times to deploy and compile those files and even set up 777 permissions on those files folders but have no luck to get it working.


texts:
i would like to know if anybody has already change the mode of grid.

By defaut, in list of orders, we have this mode :

is it possible to get this display :


texts: Exclude specific directory for take base_media_url value? (Tainted canvases may not be exported)

texts:
I configured a CDN on my Magento site, and on admin, I configured the base_static_url and the base_media_url with the CDN Url on Stores > Configuration > General > Web > Base URLs. These works fine mostly, and the images and the static content is displayed without a problem.
The problem is with one custom module that needs to upload an image on the server, stored it, and get it this show it. But this process throws me the error:

Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases
may not be exported

And this only happened in production, where we have the CDN configured. Reviewing a little about this error con google, we saw that some people mentioned that, in fact, this could be caused by the use of different domains. Is there some way to exclude some specific directory to take the file from the default base URL instead of the custom CDN URL?
Thanks.


texts: Product EAV Index never finishes processing

texts:
For some reason my Product EAV index never finishes... Well I have left for over two days and it still says Processing... I have 42,000 products in my catalog and 92 attributes.   Is this normal?  How can I verify what it is doing?  My server is fairly meaty..

I have done a

php bin/magento indexer:reset

followed by a reindex to no avail.

Any help greatly appreciated.

Thanks

Mike


texts: After Mac OS Update,CSS not working in Magento2

texts:
My CSS was working fine.But when I updated my Mac OS, CSS doesn't get applied.I have ,

1.Cleared Cache.

2.Deleted var/view-processed/pub folder and pub/static/frontend/ all folders.Deployed again.

Help me out.Thank you in advance.


texts: Difference between declare class in : "__construct" and in the top of file with "use"

texts:
Anyone have idea about declare class in __construct and declare class in top of file with use.

Exemple:

use Magento\Store\Model\StoreManagerInterface;

and

public function __construct(
      \Magento\Store\Model\StoreManagerInterface $storeManager,
) {
      $this->_storeManager = $storeManager;
}


texts: Why magento automatically generate different file size images in cache folder?

texts:
I have a website builder with Magento 1.9.3.4, and I used a paid template package on the site, the package has 5 themes, my site only used the default theme and I found my server disk space was swallowed by the folder in this path : /media/catalog/product/cache/1,
the Magento automatically creates 5 different file size for one image in
folder /media/catalog/product/cache/1, I think Magento must create different images size for those themes not in use.

As my website has 5K products and I have 30000+ products images total, in such case, the product cache folder is keep taking out all my disk space, it is huge size space.

Do you guys have any suggestions that let the Magento not to generate different size images for those themes not in use?


texts: Magento displaying FormKey when click on Add To Cart button

texts:
In magento 1.8.1.0, when I click on Add to Cart url show FormKey.
It does not redirect to checkout cart page.

Following is my addtocart.phtml file button code.

<button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $buttonTitle ?></button>

Following is CartController.php

protected function _getCart()
{
    return Mage::getSingleton('checkout/cart');
}

public function addAction()
{
    if (!$this->_validateFormKey()) {
        $this->_goBack();
        return;
    }
    $cart   = $this->_getCart();
    $params = $this->getRequest()->getParams();
    try {
        if (isset($params['qty'])) {
            $filter = new Zend_Filter_LocalizedToNormalized(
                array('locale' => Mage::app()->getLocale()->getLocaleCode())
            );
            $params['qty'] = $filter->filter($params['qty']);
        }

        $product = $this->_initProduct();
        $related = $this->getRequest()->getParam('related_product');

        /**
         * Check product availability
         */
        if (!$product) {
            $this->_goBack();
            return;
        }

        $cart->addProduct($product, $params);
        if (!empty($related)) {
            $cart->addProductsByIds(explode(',', $related));
        }

        $cart->save();

        $this->_getSession()->setCartWasUpdated(true);

        /**
         * @todo remove wishlist observer processAddToCart
         */
        Mage::dispatchEvent('checkout_cart_add_product_complete',
            array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())
        );

        if (!$this->_getSession()->getNoCartRedirect(true)) {
            if (!$cart->getQuote()->getHasError()) {
                $message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($product->getName()));
                $this->_getSession()->addSuccess($message);
            }
            $this->_goBack();
        }
    } catch (Mage_Core_Exception $e) {
        if ($this->_getSession()->getUseNotice(true)) {
            $this->_getSession()->addNotice(Mage::helper('core')->escapeHtml($e->getMessage()));
        } else {
            $messages = array_unique(explode("\n", $e->getMessage()));
            foreach ($messages as $message) {
                $this->_getSession()->addError(Mage::helper('core')->escapeHtml($message));
            }
        }

        $url = $this->_getSession()->getRedirectUrl(true);
        if ($url) {
            $this->getResponse()->setRedirect($url);
        } else {
            $this->_redirectReferer(Mage::helper('checkout/cart')->getCartUrl());
        }
    } catch (Exception $e) {
        $this->_getSession()->addException($e, $this->__('Cannot add the item to shopping cart.'));
        Mage::logException($e);
        $this->_goBack();
    }
}

I tried to search but did not get proper solution.
Click here for site where I get error.


texts: Custom PHTML file not loading via the XML

texts:
I am trying to figure out why the checkout/cart/header.phtml is not loading when I am calling it from the xml file. This is a custom xml file called beckin_minicart.xml. Everything loads just fine except the phtml file. Do you see what I am doing wrong here?

<?xml version="1.0" encoding="UTF-8"?>
<layout>

    <default>

        <reference name="head">
         <action method="addJs" ifconfig="minicart/settings/enable"><script>minicart/jquery-1.8.3.js</script></action>
         <action method="addJs" ifconfig="minicart/settings/enable"><script>minicart/cartdropdown.js</script></action>
             <action method="addCss" block="head" ifconfig="minicart/settings/enable"><template>css/minicart/minicart.css</template></action>
        </reference>

    <reference name="header">

        <!-- Quick Cart Dropdown -->
            <block type="checkout/cart_sidebar" name="minicart" template="checkout/cart/header.phtml">
        <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        </block>

        </reference>

    <reference name="top.links">
        <remove name="checkout_cart_link"/>
    </reference>

        <remove name="left.permanent.callout"/>
        <remove name="right.permanent.callout"/>
        <remove name="paypal.partner.right.logo"/>
        <remove name="cart_sidebar"/>

    </default>

</layout>


texts: Template Path Hints not showing on front-end in magento 1.8

texts:
I followed the instructions in this answer but no template hints are appearing.
I even switched the browser and deactivated caching in Magento.

However, nothing appears.

I am working for a company which works with an agency, maybe they have removed the code for the template hint generation for whatever reason.

Please help me to find out what is going on.


texts: Magento 2 : how to LIbrary import using composer

texts: How can we library import without composer update give any solution.


texts: Magento 1.9 where is getSkipJsReloadPrice set?

texts:
In app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php the getSkipJsReloadPrice method is checked i want to change getSkipJsReloadPrice to return true where is that setting?

. ($this->getSkipJsReloadPrice() ? '' : ' onclick="opConfig.reloadPrice()"')


texts: Mageto2 How to get created user id in API

texts:
I am creating a user by API. After creation:

How to get that user id?
How to set this user into de-active stage?

My code:

$registrationdata = [
        'customer' => [
            "email" => "sampleuser@example.com",
            "firstname" => "John",
            "lastname" => "Doe",
            "storeId" => 1,
            "websiteId" => 1
        ],
        "password" => "Demo1234"
    ];
    $ch = curl_init("http://localhost/magento/index.php/rest/V1/customers");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($registrationdata));
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
    $result = curl_exec($ch);


texts: Magento 2 scheduled task "log_clean" stuck in running state: "Class log/cron does not exist"

texts:
I am running M2 v 2.3.5-p1
In my cron_schedule table I have an entry as follows:
11929
log_clean
running
Class log/cron does not exist
2020-08-29 00:48:04
2020-08-29 01:00:00
As you can see it has a status of running (now been several hours since it started), and suggests Class log/cron does not exist in the messages field in the table. I do note that the directory the log files are stored in for Magento 2 changed in a recent version to var/log/ from log/.
Has anyone seen this error before in their own installations of Magento 2, or any idea how to fix it?
Thanks in advance.


texts: Limit order total for customer in magento2?

texts:
Can we restrict customer for add to cart once his quote total crosses specific count?

For example i need to restrict customer add to cart action, once the subtotal in quote crosses 500. I have created customer custom attribute called order_limit, can we check this condition and restrict customer to do add to cart action?

I used below event in my events.xml

 <event name="controller_action_predispatch_checkout_cart_add">
    <observer name="checkout_cart_add" instance="[Vendor]\[Module]\Observer\RestrictCart" />
</event>

This is my observer code

class RestrictCart implements ObserverInterface{

protected $_objectManager = null;
protected $_messageManager;
protected $_customerSession;
protected $quoteFactory;
protected $_checkoutSession;
protected $_customer;

public function __construct(
\Magento\Framework\Message\ManagerInterface $messageManager,
\Magento\Framework\ObjectManagerInterface $objectManager,
\Magento\Customer\Model\Session $customerSession,
\Magento\Quote\Model\QuoteFactory $quoteFactory,
\Magento\Checkout\Model\Session $checkoutSession,
\Magento\Customer\Model\CustomerFactory $customer
){
    $this->_messageManager = $messageManager;
    $this->_objectManager = $objectManager;
    $this->_customerSession = $customerSession;
    $this->quoteFactory = $quoteFactory;
    $this->_checkoutSession = $checkoutSession;
    $this->_customer = $customer;
}

public function execute(\Magento\Framework\Event\Observer $observer){

    try{
        if($observer->getRequest()->getParam('product', false)) {
            $productId = $observer->getRequest()->getParam('product', false);
            $requestedQty = $observer->getRequest()->getParam('qty', false);
            $product = $this->_objectManager->create('Magento\Catalog\Model\Product')->load($observer->getRequest()->getParam('product', false));
            $StockState = $this->_objectManager->get('\Magento\CatalogInventory\Api\StockStateInterface');

            $resource = $this->_objectManager->get('Magento\Framework\App\ResourceConnection');
            $connection = $resource->getConnection();
            if($this->_customerSession->isLoggedIn()){
                $customerId = $this->_customerSession->getCustomer()->getId();
                $cusomerData = $this->getCurrentCustomer($customerId);
                $order_limit = $cusomerData->getOrderLimit();
                $quote = $this->_checkoutSession->getQuote();
                $subTotal = $quote->getSubtotal();
                if($subTotal > $order_limit){
                    $this->_messageManager->addError(__('Order limit Crossed!!!'));
                    return $this;
                }
        }

        return $this;
    }catch (\Exception $e) {
        print_r($e->getMessage());
    }
}

public function getQuoteCollection($customerId)
{
    $quote = $this->quoteFactory->create()->getCollection()->addFieldToFilter('customer_id',$customerId);
    return $quote;
}
public function getCurrentCustomer($id){
    $customerObj = $this->_customer->create();
    $customer = $customerObj->load($id);
    return $customer;
 }
}

This code is working fine only when we add product from detail page, how same thing can be used on updating cart?


texts: Upload Magento2 extension on marketplace which have third party library dependency

texts:
I've created a Magento2 extension which has a dependency with the 3rd party library. The third-party library has a composer package.
I tried to upload that extension on Marketplace but In QA review they failed my extension.

Although I have added that 3rd party library in Module composer.json file and also mentioned that library installation process in User Guide along with Module installation process but Marketplace QA team did only install the extension and didn't install that library, so that's why they are getting an error due to missing library.

I created a support ticket for this but I didn't get any response from their side yet.

Can anyone let me know how I can upload it to the Marketplace? What steps should I need to follow?


texts: Rest API response for api inside the extension module appends square bracket

texts:
I have a rest api created in php. Sharing a sample here:
public function getApiData(){
$returnData = ["a"=>"A","b"=>"B"];
header("Content-Type: application/json");
// I want to return the data in the json format for which i have two options.
// Option 1:
return $returnData
// Option 2 (if i don't use the option 1 to return):
#jsonResponse = json_encode($returnData,JSON_FORCE_OBJECT);
print_r($jsonResponse);
}

For the option 1 the response is JSON but its just a string for ex:
"{\"a\":\"A\",\"b\":\"B.\"}"
For the option 2 the response is JSON but it's appended with square opening and closing bracket. ex:
{
 "a":"A",
"b":"B"
}[]

Notice that there is an opening and closing bracket in the end. If i use die() or exit; after the print_r statement then those square brackets are remove. But the problem is that i don't want to use both of them.
Is there any option to send pure JSON object in the response of rest API?
Postman response with the option 1


texts:
I have noticed that the tax wasn't working properly in my store, and set up a tax rule in my store. After I applied that rule to my products the tax is added to the price of the product, while I entered my prices including tax.

How can I apply the tax rate correctly?

EDIT

Display Product Prices In Catalog is set to yes
System > Configuration > Sales > Shipping Settings > Origin is also set to the correct country


texts:
We bought POS system from the Bank and they provided us some sample codes(asp,c,php,vb).
They are not giving support for magento. We will use XMLPay (not 3D Payment)

Do i need a module for this?
İf we are doing integration by modules which one is the best for standard payments(mastercard,visa,amex).

Any information is appreciated.


texts: Magento 2 email template get payment details variables

texts:
Hi I did follow the documentation from Magento, I can get all Payment Details by using
{{var payment_html|raw}}

Is there anyway to get certain items from the above?
Let say I just only need "Approve message" & "Card Number". what can I do?


texts: New customer address attributes not saving

texts:
I've created 2 new customer attributes.  These attributes show in the admin under "Customers > Attributes > Manage Customer Address Attributes".

I've overwritten the registration form (register.phtml) to display form fields matching these attributes.  When I debug through the registration process, I see that Mage_Customer_Model_Form::getAttributes does not include my new attributes.

Because of this (I think), my new attributes are not being saved in the database.  What step am I missing to make the registration form save my new attributes?


texts: Magento upgrade 1.9.2.1 to 1.9.2.2 conflicts

texts:
I am try to upgrade my magento from 1.9.2.1 to 1.9.2.4 but gives following errors

    Package community/Interface_Adminhtml_Default 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1
    Package community/Interface_Frontend_Default 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1
    Package community/Interface_Install_Default 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1
    and so on....


texts: Knowing "simple" products are related via REST API

texts:
I am doing a search via the REST API, looking for products with a certain color and a certain name:

http://127.0.0.1/index.php/rest/V1/products/?searchCriteria[filter_groups][0][filters][0][field]=color&searchCriteria[filter_groups][0][filters][0][value]=49&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[filter_groups][1][filters][0][field]=name&searchCriteria[filter_groups][1][filters][0][value]=hero%25&searchCriteria[filter_groups][1][filters][0][condition_type]=like

This returns the products I am expecting.  It is returning all the variant that match the search to.  For example (using the magento sample data), I get:

Hero Hoodie-XS-Black
Hero Hoodie-S-Black
Hero Hoodie-MS-Black

These are all "simple" products, but how do I know they are related?  There doesn't appear to be any information in the JSON response to indicate that the products are related, or what their associated configurable product is.


texts: getTableName not adding table prefix (for 1 table only)

texts:
We have a prefix in our Magento DB: prefix_

Now, Magento has been working fine for years. But in one of the extension when we call the code below. Instead of printing prefix_catalog_product_index_price it prints catalog_product_index_price. The prefix_ is missing.

prefix_catalog_product_index_price exists in the database just like all the other tables.

$adapter = Mage::getResourceSingleton('core/resource')->getReadConnection();
Mage::log($adapter->getTableName('catalog_product_index_price'));

-

$adapter = Mage::getSingleton('core/resource')->getConnection('core_read');
Mage::log($adapter->getTableName('catalog_product_index_price'));

What can this be?

Why is getTableName not working? or adding the prefix?


texts:
I have 2000+ products all set to simple products but with custom options.

An option is a drop-down option with an SKU etc... What I want to know is, is it possible to add another input box after 'Sort Order' to say 'stock count'??

I'm using Magento 1.9.2.2


texts: Magento: 50 addresses for a customer hangs the browser

texts:
I am having a strange situation with magento, when I am trying to add about 60 addresses for one customer, then till 50 it works fine but after that when I try to add more addresses and click Save button Firefox gives Script Busy warning and asks to stop or debug the script. When I stop script or debug it, and then re-try to save it saves OK.

I have not made any changes in magento core, it is by default latest install and it gives such error.

What could be the issue and how I can fix this?


texts: Change the default product image import directory

texts:
Dears,
In magento 2.3.5, in order to add images within the product import csv, the images should be in:
var/import/images

While in the pass, the path was:
pub/media/images

My question is, is there anyway to change the default path from the new path to the old one ?
I tried many tricks, like writing the below
../../../pub/media/images

in the "Images File Directory" field, but it didn't work.
do you have any other suggestion ? it is critical to me to use pub/media.
On the other side, I think The default  path is taking from file:
/vendor/magento/module-import-export/etc/config.xml

So how can I override the file in my theme ?


texts: Magento 2 - Render cost price in low stock report - Many can use this

texts:
We have a shop, where we want a low stock report with cost prices, so we can see how much we need to pay for these products before buying them.

What I want is to add an extra column with the cost price in the low stock report.

I have tried to add a block in reports_report_product_lowstock_grid.xml

But I can't see anything new on the grid.

I hope an expert can help, and I'm sure many can use this.

Best regards Martin

<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.block.report.product.lowstock.grid.columnSet.price" as="price">
<arguments>
    <argument name="header" xsi:type="string" translate="true">Kost pris</argument>
    <argument name="filter" xsi:type="string">Magento\Backend\Block\Widget\Grid\Column\Filter\Range</argument>
    <argument name="sortable" xsi:type="string">0</argument>
    <argument name="index" xsi:type="string">price</argument>
    <argument name="type" xsi:type="string">number</argument>
    <argument name="header_css_class" xsi:type="string">col-price</argument>
    <argument name="column_css_class" xsi:type="string">col-price</argument>
</arguments>


texts: Combining 2 websites to Magento 1.9 Multi-Store

texts:
We have two websites both built on Magento 1.9.

Can we integrate both into one like creating a Multi-Store or it can be done only before developing the websites?


texts: Add markup to out of checkout/cart stock message

texts:
I have copied /app/code/Core/Mage/CatalogInventory/Model/Stock/Item.php to /app/code/local/Mage/CatalogInventory/Model/Stock/Item.php. At line (aprox) 580 the following code exists

if (!$this->getIsInStock()) {
        $result->setHasError(true)
            ->setMessage(Mage::helper('cataloginventory')->__('This product is currently out of stock.'))
            ->setQuoteMessage(Mage::helper('cataloginventory')->__('Some of the products are currently out of stock.'))
            ->setQuoteMessageIndex('stock');
        $result->setItemUseOldQty(true);
        return $result;
    }

I need to edit the text inside the setQuoteMessage function to include <a href="/shop">continue shopping </a>. There seems to be some kind of escape html function hitting it between it leaving this file and it getting to the view templates because no matter what I try doing the browser just displays the a tag as regular text.

For session messages I've found this option where you just set $session->setEscapeMessages(false);. Is there any kind of similar param I can add on the $result which will do the same.

I have tried using the session messages instead but it means that I lose functionality in terms of product specific messages and message position based on the product that is out of stock. So adding a flag to the original code and the updated text would be my absolute preferred solution.


texts: I want to add google captcha V2 before placing an order in Magento 2.3.x

texts: Magento 2.3.X - How to add the google captcha V2 on the checkout page before place the order button.


texts:
I was wondering if anyone could provide a simple jQuerying hello world example in Magento 2. I have read the documentation on requireJS and the Magento 2 documentation and I am still struggling.

This is what I have in my script tag in my PHTML file.

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

    $( "p" ).click(function() {
        alert("Test!");
    });

});


texts: Show discount including tax, calculate discount excluding tax

texts:
I want to display the discount amount including tax on cart overview page (totals summary).

Magento 2.1.8

Relevant settings:

Catalog prices: Excluding tax
Apply Customer Tax: After discount
Apply Discount On Prices: Excluding tax

Current situation in total summary within cart:

I cannot set Apply Discount On Prices to Including Tax, because Magento then calculates wrong totals. So in short I need to calculate discount amounts excluding tax but displaying including tax.


texts:
I'm using Magento ver. 1.7.0.2 on a 64-bit Centos box with litespeed web server. Recently I re-compiled easyapache to include xcache for the purpose of increasing site speed. However now I'm not sure if there's something "additional" I need to do within magento config file (local.xml) as googling for answers is some what unclear. Many users report "add memcache" while some say "add memcache or APC" and then provide config local.xml config settings for APC. So, I'd like to know if enabiling xcache via easyapache is all that is needed to benefit magento's speed, or if I need to also edit the config file?

For example, do I add something like the following?

<cache>
    <backend>xcache</backend>
    <prefix>MAGE_</prefix>
</cache>

***Edit: adding my COMPLETE local.xml file below ... please let me know what to edit exactly. The "X's" represent sensitive data that I have commented out.

<config>
  <global>
    <install>
      <date><![CDATA[XXX, XX XXX XXXX XX:XX:XX +0000]]></date>
    </install>
    <crypt>
      <key><![CDATA[XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX]]></key>
    </crypt>
    <disable_local_modules>false</disable_local_modules>
    <resources>
      <db>
        <table_prefix><![CDATA[]]></table_prefix>
      </db>
      <default_setup>
        <connection>
          <host><![CDATA[localhost]]></host>
          <username><![CDATA[XXX_XXX]]></username>
          <password><![CDATA[XXXXXXXXXXXXXXX]]></password>
          <dbname><![CDATA[XXX_XXX]]></dbname>
          <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
          <model><![CDATA[mysql4]]></model>
          <type><![CDATA[pdo_mysql]]></type>
          <pdoType><![CDATA[]]></pdoType>
          <active>1</active>
        </connection>
      </default_setup>
    </resources>
    <session_save><![CDATA[files]]></session_save>
  </global>
  <admin>
    <routers>
      <adminhtml>
        <args>
          <frontName><![CDATA[XXXXXXXXXXXX]]></frontName>
        </args>
      </adminhtml>
    </routers>
  </admin>
</config>


texts: Magento2 Success msg not getting displayed after redirection

texts:
Magento2 I need to redirect to home page & display success msg after Submitting custom form in cart page.

I have written below code in my custom controller file but msg doesn't print on Home page only page gets redirect.

$this->messageManager->addSuccess(
                      __("Thank you for submitting your product enquiry . Our team will reach out to you as soon as possible.")
                            );

$resultRedirect = $this->resultRedirectFactory->create();
/** @return \Magento\Framework\Controller\Result\Redirect **/
return $resultRedirect->setPath('/');


texts: Why my homepage doesn't display a cms block content?

texts:
I have programmatically created a CMS block, which is working fine. I've added some content into it and trying to display it in my homepage.

My block identifier is this_is_a_block_identifier. I'm trying to call it in content->pages->home page->edit by adding:

{{block class=Magento\Cms\Block\Block" block_id="this_is_a_block_identifier"}}

After, I'm clearing a cache. But instead of displaying a content, it just displays a text, which is that block class calling (as I showed above).

Why?


texts: Payment method are not shown in admin magento 2

texts:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

                <group id="worldpaydirect" translate="label" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    Custom Payment
                    <field id="active" translate="label comment" sortOrder="1" type="select" showInDefault="1" showInWebsite="1" showInStore="0">
                        Enable
                        <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    </field>
                </group>

    </system>
</config>

Admin:
https://prnt.sc/mgtna4

In above screenshot custom Payment is not appear  in stores>configuration>sales>payment methods


texts: If client login JQuery/Mage-init don't work

texts:
I don't even know how to explain this.

But the case is, in some pages if the user is logged in some of the features don't work.

For example in cart we have a tab that opens a closes with the form to apply discount code, but if the user is logged in it just does not work. Same goes to the other tabs, a block, and the button that should redirect to the checkout itself.

Idk what even to look for.

Edit:

Well I think is that the JQuery doesn't load when a user is logged in, in some pages it gives live date picker is not a function and only appears if the user is logged, so I bet on that, but what can cause the JQuery not to load (or load in time, the JQuery appears loaded in page) only if the user is logged in?

  If user logged in

  If not logged in

Thanks :D


texts: how to call layout from UI component button?

texts:
I want to jump from one UI_COMPONENT to another UI_COMPONENT through layout file and hopefully passing URL in button

This is my UI_COMPONENT file

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <settings>
        <buttons>
            <button name="duplicate" >
            <url path ="duplicate/index/index"/>
                <label >duplicate </label>
            </button>

        </buttons>
    </settings>
</form>

and want to call my layout but it gives me 404 error
this is my layout file name "duplicate_index_index"

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<update handle="styles"/>
<body>
    <referenceContainer name="content">
        <uiComponent name="duplicate_detail"/>
    </referenceContainer>
</body>
</page>


texts: Hide payment logos for certain product categories

texts:
I want to hide the payment logos for 1 product category. I've taken a look and they're in a block in the local.xml, but as far as I know XML doesn't like if statements.

Is there any way of doing it on PHP?


texts: Retrieving product attributes from the admin store in Magento 2

texts:
I have a couple store views that represent other languages, and I'm trying to get product attributes consisting of my site language.
How do we retrieve product attributes from the admin store (store id 0)? I think I understand that we can switch between stores within a product, but the values retrieved are not from the admin store. My admin store product name is "A bunch of bananas."

$productId = $observer->getProduct()->getId();
$theProduct = $this->_productRepository->getById($productId);
$theProduct->setStoreId(0); //Set the admin store id
$value = $theProduct->getData('name');

$value is returned as "Un racimo de plátanos", which is not from my admin store.

I've tried the method outlined in this ticket as well.

getAttributeText() use default value regardless what store view the user is on


texts: Issue On checkout Page after enabling Austrian Dollor Currency

texts:
I have enabled currency for Australian dollar from admin section

After enabling this I am getting below error.

1 exception(s):
Exception #0 (Exception): Undefined rate from "AUD-USD".

Exception #0 (Exception): Undefined rate from "AUD-USD".
#0 /var/www/html/magento2/vendor/magento/module-quote/Model/Cart/ShippingMethodConverter.php(61): Magento\Directory\Model\Currency->convert(10, 'USD')
#1 /var/www/html/magento2/vendor/magento/module-quote/Model/ShippingMethodManagement.php(140): Magento\Quote\Model\Cart\ShippingMethodConverter->modelToDataObject(Object(Magento\Quote\Model\Quote\Address\Rate), 'USD')

Please suggest what is the way to enable currency for different country.

Thanks.


texts: Page not found in admin panel after applying patch 6788 and editing config.xml

texts:
After installing the patch I tried to change the config.xml of the extension. The extension has two config.xml files. In below you can find the revision I made, but still I get page not found error.

<admin>
    <routers>
        <gremlincustom>
            <use>admin</use>
            <args>
                <module>Junaidbhura_Gremlincustom</module>
                <frontName>gremlincustom</frontName>
            </args>
        </gremlincustom>
    </routers>
</admin>

To

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <gremlincustom after="Mage_Adminhtml">Junaidbhura_Gremlincustom_Adminhtml</gremlincustom>
                    <frontName>gremlincustom</frontName>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

and

<admin>
    <routers>
        <gremlinreports>
            <use>admin</use>
            <args>
                <module>Junaidbhura_Gremlinreports</module>
                <frontName>gremlinreports</frontName>
            </args>
        </gremlinreports>
    </routers>
</admin>

To

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <gremlinreports after="Mage_Adminhtml">Junaidbhura_Gremlinreports_Adminhtml</gremlinreports>
                    <frontName>gremlinreports</frontName>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>


texts:
I just patched my dev machine with Security Patch 9767. And enabled form key on checkout from backend. Also added the form key to my custom theme. But When I tested the checkout process it freeze on billing step. I tried to log the saveBillingAction() on OnePageController.php the result is 0

Mage::log( ((int) $this->_validateFormKey() ) , null , 'custom.log' );

Any help are much appreciated.


texts: Custom Module - Please correct the XML data and try again. [] []

texts:
I'm building a custom module which needs a grid and edit form for my model. I managed to build the grid from a tutorial and my edit controller works as well.
However, there is no content being rendered and I get this error:

[2017-05-30 10:48:12] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_395a947ddb2d131e0726ca40a8f539941 and handles default, slideshow_slide_edit: Please correct the XML data and try again.  [] []

my layout slideshow_slide_edit.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="left">
        <block class="Myvendor\Slideshow\Block\Adminhtml\Slide\Edit\Tabs"
            name="myvendor_slideshow_slide.edit.tabs"/>
    </referenceBlock>
    <referenceBlock name="content">
        <block class="Myvendor\Slideshow\Block\Adminhtml\Slide\Edit" name="myvendor_slideshow_slide.edit"/>
    </referenceBlock>
</body>

The Slide/Edit Block is obviously constructed as some additional buttons appear, and with some die-debugging I was able to confirm the Slide/Edit/Tabs Block is constructed as well, but neither of them have any content. I am not even sure where to look for my mistake.


texts: Magento 2 - how to change the product name in a configurable product

texts:
We have allot of custom products that we sell witch means we need to be able to ad those custom products to shopping carts for our customers.

Right now we are solving this with a configurable product called special and we add the needed information in a description text field. The problem with this is that is just dont look very nice in the email quotes that we send out when there is just a bunch of products called special, and they have to go in to the shopping cart before they can see what it actually is.

Is there a way to make the name of the product configurable aswell, so that the sku could be special or something and we can write in our own custom name for the product?

Would very much appreciate it if someone can point me in the right direction for finding a solution for this :)


texts:
I have installed magento 2.0.7 and override minicart.phtml file in my custom theme. After adding product in cart ,click on the Minicart icon in the header, the content area of the minicart displays

  "You have no items in your shopping cart".

But the product is added to the cart. Can anyone suggest a solution?


texts: CORS Header allow cross origin not working for google fonts

texts:
Here I have some code in my .htaccess file
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"

Header set X-UA-Compatible "IE=edge"

# `mod_headers` cannot match based on the content-type, however,
# the `X-UA-Compatible` response header should be send only for
# HTML documents and not for the other resources.

<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?
g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?
|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
 Header unset X-UA-Compatible
</FilesMatch>

</IfModule>

on the first line i have the Header set Access-Control-Allow-Origin "*" and it does not seem to be working for any browser except for chrome. I tried using this in my root .htaccess file as well as .htaccess file in app folder. Is there something i am doing wrong? Also I should add that I am using a css @font-face for these google fonts.


texts:
I have a problem with the frontend_model of the system.xml

This is the system.xml

<field id="words" translate="label" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Dizionario</label>
                <frontend_model>TryAgain\Module\Block\Adminhtml\Menu\Field\AdditionalItem</frontend_model>
                <backend_model>TryAgain\Module\Block\Adminhtml\Menu\Config\Backend\AdditionalItem</backend_model>
            </field>

This is the TryAgain\Module\Block\Adminhtml\Menu\Field\AdditionalItem

<?php
 namespace TryAgain\Module\Block\Adminhtml\Menu\Field;

 use
Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray;

class AdditionalItem extends AbstractFieldArray
{
protected function _prepareToRender()
{
    $this->addColumn('noi', ['label' => __('NOI'),'readonly'=>'readonly']);
    $this->addColumn('fixed', ['label' => __('Fixed')]);
    $this->addColumn('percent', ['label' => __('Percent')]);
    $this->_addAfter = false;
    $this->_addButtonLabel = __('Add More');
}
}

The problem is that when I go to change the name of the column ('we', 'fixed' or 'percent')
I have this error and can no longer save the configurations


texts: What is the best way to remove index.php from URLs, without making too many modifications to the Magento core structure and native behavior?


texts:
I want to upload product pictures but this option does not work, although it appears they were charged nothing happens, they do not appear. The phone works on loading, but on any PC browser does not work.
Any ideas? some help?


texts: Magento 2: What is the difference between plugins and modules?

texts: Some modules are called plugins and majority of the modules I found are called modules. I'm new to Magento 2 and this seems confuses me.


texts:
One one of my Magento 1.7.0.2 installs I need to revert a 1533 patch, but original SUPEE 1533 is not available in the root folder (probably was deleted after it was installed in 2015). I am checking installed patches  in app/etc/applied.patches.list and it shows as SUPEE-1533_EE_1.13_v1.patch

However I went to magento and downloaded SUPEE-1533 to upload to Root folder and make a revert and I noticed that recently downloaded SUPEE 1533 for 1.7.0.2 is this:
PATCH_SUPEE-1533_EE_1.12.x_v1-2015-02-10-08-19-16.sh
see difference in bold. 1.13 and 1.12.

Is it safe to upload recent PATCH_SUPEE-1533_EE_1.12 patch and Revert it? I assume it should revert changes made by original patch "SUPEE-1533_EE_1.13_v1.patch  correct ?


texts: tablerates.csv Doesn't Work Properly in Table rates shipping

texts:
I have an error with Weight vs Destination in table rates. I uploaded this CSV. but Shipping Price didn't change. always the tax rate is 0.

I checked product weight and its ok. when I increase product also didn't change tax value.
this is the setting of table rates shipping

this is tablerates.csv

Help me to fix this error!!!!!
error link https://wikibusterz.com/magento/index.php/jem-chest.html
Country - Sri lanka
State - kandy


texts: I am applying coupon code on Magento ver.1. Its works good but its showing before Shipping & Handling ( I want to moved down after shipping and handling.


texts: Getting Reorder to ignore stock levels in magento

texts:
i've been tasked to create a system where a customer can edit an order before it reaches the processing stage, i figure that the easiest way is to use the cart but with some edits to it to detect that your editing the order rather than making a new one

i have been testing out theories so far and everything seem to pan out, one theory i have been trying to get to work is utilizing the same process for re-ordering to populate the cart with the previous order, however i've ran into a problem, if an item is out of stock or does not have sufficient stock, it wont be added and until the customer confirms the change to their order i can't go and release what they ordered incase if it gets snatched up by another customer while they are editing the order, i can store how much the customer ordered but only if the item is added to the cart

i've tried removing the Try Catch in Mage_Sales_Controller_Abstract in the function reorderAction() and it's adding the items however this means also i can't catch the exception of it's if it's just a notice or if there is any other reason why it can't add the item to the cart besides not having the stock also if the item has been set out of stock a report is generated

so is there a way to get magento to add items to the cart with the re-order while ignoring what stock levels are


texts:
Can you help me how can I change the position of Custom Options on product page.
I mean: First Custom Options fields are displayed, then configurable fields.
I'm Very appreciated for your help.


texts: Newsletter is not working after installing mailchimp

texts:
After installing Mailchimp in magento 2 newsletter is not working

I saw in system.log and it's give error like

[2017-06-30 07:19:29] main.CRITICAL: Exception message: Type: http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/ Title: Resource Not Found Status: 404 Detail: The requested resource could not be found.

so how to solve this error.


texts: What are the key architectural differences between Magento 1.14 and Magento 2.1.x?

texts:
We have been running our Magento stores on the version 1.12 for the past four years. We are now looking to upgrade our store to either version 1.14 or 2.1.x. I understand the upgrade to the Magento 2.1.x is far more challenging and costly.

I am reaching out to the StackExchange community and someone who has a deep understanding of Magento architecture to find out as to why I shouldn't upgrade to the version 1.14 instead 2.1.x other than the fact that Magento will end the support for the version 1.14 in the next few years.

p.s. This is wa great post that I found in the community too but my question is a bit different.


texts: How to get All product data from magento 1.9 database

texts: I want to gather all my product from magento 1.9 database and upload on other site of magento 1.9 any one know how to do that ? Thanks