texts:
I created custom theme. Everything working fine except it doesn't show message on homepage only like add to cart action

any other page it's working fine. I think it's KnockoutJS issue. How to tackle that

default_head_block.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>

        <css src="css/style-1.css"/>
        <css src="css/bootstrap.css"/>
        <css src="css/owl.carousel.css"/>
        <css src="css/simple-sidebar.css"/>
        <css src="css/inner.css"/>

        <css src="css/font-awesome-4.7.0/css/font-awesome.min.css"/>
        <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js" src_type="url"/>-->
         <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js" src_type="url"/>-->
    <!--<script src="js/new-jquery.js"/>-->
    <!--<script src="js/jquery.js"/>-->
  <!--  <script src="js/bootstrap.js"/>
    <link src="js/custom.js"/>
    <link src="js/html5shiv.js" ie_condition="IE 9" />

    <link src="js/respond.js" ie_condition="IE 9" />
    <link src="js/owl.carousel.js"/>-->
        <css src="https://fonts.googleapis.com/css?family=Montserrat|Poppins:400,500" src_type="url"/>
    </head>

</page>

requirejs-config.js

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

var config = {

    deps: [
        "js/custom",
    ],

    map: {
        '*': {

            'bootstrap': 'js/bootstrap'

        }
    },
    "shim": {
        "bootstrap": ["jquery"]
    }
};

custom.js

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

    $(document).ready(function($){
        console.log("jquery log.");
    });
    return;

});

**console error **


texts: Total price changes to zero after selecting an option

texts:
I recently updated from Magento 1.6.1 to Magento 1.9.2.1 and I noticed that the total price of a product changes to 0,00 when I select an option (https://sportinngerritsen.nl/professional-supreme-elite-200-mtr-amber). When I continue to my shopping cart, the price is correct. I've tried a few things I found on the internet like changing a peace of code in the file optionapp/design/frontend/default/sportinn/template/catalog/product/options/view/options.phtml:

price += parseFloat(this.config[optionId][selectOption.value].priceValue);

I also compared this to the standard templates (rwd and base), but then I noticed that it doesn't work in these templates either. Does anybody know what to do?


texts: What is substitute for Magento's transactional email {{skin}} in PHP?

texts:
I need to achieve this

{{skin url="img/logo.png" _area="frontend" _package="my-package" _theme="default"}}

via PHP. The reason is, rewriting email templates and extracting common templates of headers and footers into PHP part, leaving only text and simple HTML of emails in Magento's admin panel.


texts: Magento 1.9 {{var payment_html}} alternative

texts:
I'm writing my own function for sending emails.
In the Magento email template, there's a variable {{var payment_html}} which I need to convert to $order object. The question is how can I get the content of payment_html from $order object?


texts:
I'm trying to migrate my existing Magento 1.9.2 code to Magento 2.2.2
I cloned the code migration toolkit from github and followed the steps but nothing has happened after executing the migration commands.

Can someone guide me through another approach or a detailed step by step guide to get the code migration toolkit to work?


texts: Magento 2.3 - homepage redirect to 404 page not found

texts:
Magento 2.3 homepage returns a 404 Page Not Found error. This only occurs when not logged in. After logging in, the homepage works properly. (It seems to work in mobile view even when returning a 404 at the desktop view.)

Also after cache:clean page_cache, homepage working properly.

Does anyone has faced this type of issue?


texts: ₹ Symboles not supporting sales invioce pdf in magento 2.1.5

texts:
I have Magento 2.1.5 and that are not supporting ₹ symbols when we generate sales invoices. That pdf not showing ₹ symbols. Please check the screenshot.
screenshot: https://prnt.sc/r0qi58

Please help.

Thank you.


texts:
I have 2 attributes for product variations I want to use (size, width). In Magento 1 I was able to quickly add each associated product one-by-one with quick product creation. But in Magento 2 it seems that I am forced to create all combinations of these 2 attributes when creating variations? This is unnecessary if lets say I have 10 sizes of one width, but only 1 of the other width. In this process I end up with a bunch of extra products that don't even exist.
Is there something I'm missing here or an alternative approach rather than manually creating each simple product?

Thanks


texts: SQL? to make product reviews available in other store

texts:
we just opened a new shop - and have some long time products in here with many reviews.

I just now realized that reviews are a member of a store. SO in the new store they do not shop up.

I had a look at the table review_store and see the relation here.

What I probably need to do is query: select every review, where store review is in [0,1,2,4,7,8] and insert into table the review relation again for all stores except the one that we are selecting from (so for say store 0, we insert all stores except 0)

Sounds like a pretty difficult query. Anyone done this before?

There is no select-all, update all for reviews (other then status)

Help appreciated


texts: Magento 2 Unexpected number in JSON at position 1

texts:
Am working on magento 2.3 and have an error in console product page,i have no idea what is it,i guess its fetching json data with error in product gallery part.

I tried every thing like clearing cache and re compiling the di.

here is the error

  VM106473:1 Uncaught SyntaxError: Unexpected number in JSON at
  position 1
      at JSON.parse ()
      at getNodeData (scripts.js:87)
      at Array.map ()
      at scripts.js:117
      at HTMLDocument.apply (main.js:70)
      at fire (jquery.js:3232)
      at Object.add [as done] (jquery.js:3291)
      at jQuery.fn.init.jQuery.fn.ready (jquery.js:3542)
      at jQuery.fn.init (jquery.js:2967)
      at new jQuery.fn.init (jquery-migrate.js:241)

thanks for help


texts: Help! Magento XMLHttpRequest cannot load after domain change

texts:
I swapped domains in the same server
and I made the mistake that at first I put wrong base urls after moving http://domain not http://domain/myfolder and at first I did not clean cache and the var folder I added a bit later cause it was in .gitignore.
My credentials in the local.xml are correct I think and new database stuff.

All works in the page - alltough  -at first there was a redirect loop that I got rid of with changing web/url/redirect_to_base  to 0 in database. The file rights are OK I think, I was changing them all 777 and got no success

ALL that uses XMLHttpRequest is not working and it is panic since the page should be live for 1. december :(

This is what I get from console:

XMLHttpRequest cannot load http://domain/myfolder/index.php/admin/catalog_category/edit/key/615802c44a2f15b66a4322a1f91934e2/?SID=j2q3l1jvbjgoi2lu8a2embpsf6&isAjax=true. Response for preflight is invalid (redirect)

and  then
XHR failed loading: POST "http://domain/myfolder//index.php/admin/catalog_category/edit/key/615802c44a2f15b66a4322a1f91934e2/?SID=j2q3l1jvbjgoi2lu8a2embpsf6&isAjax=true".


texts:
Based on certain aspects of an order I want to replace the email template being used. I'd preferably like to use a plugin to do this as I feel this is the proper Magento 2 way.

Unfortunately most of the methods i'd like to intercept are protected. Thanks Magento. Anyway, the soonest place I can find to do this is in Magento\Sales\Model\Order\Email\SenderBuilder and using a plugin before the send() method.

I'm getting the error :

Missing argument 2 for
 Namespace\Moduename\Model\Plugin\ReplaceNewOrderEmailPlugin::beforeSend(),
called in /var/www/public/vendor/magento/framework/Interception/Interceptor.php on line 123
and defined in /var/www/public/vendor/namespace/modulename/Model/Plugin/ReplaceNewOrderEmailPlugin.php on line 9

Here is my code :

di.xml

<type name="Magento\Sales\Model\Order\Email\SenderBuilder">
        <plugin name="Company_Namespace::ReplaceNewOrderEmail"
                type="Company\Namespace\Model\Plugin\ReplaceNewOrderEmailPlugin"
                sortOrder="10"
                disabled="false"/>
    </type>

Plugin file

use Magento\Sales\Model\Order\Email\SenderBuilder;

class ReplaceNewOrderEmailPlugin
{

    public function beforeSend($subject, $result)
    {
        die('plugin working');
        return $result;
    }
}

and for good measure, here is the function i'm trying to plugin to

public/vendor/magento/module-sales/Model/Order/Email/SenderBuilder.php

public function send()
    {
        $this->configureEmailTemplate();

        $this->transportBuilder->addTo(
            $this->identityContainer->getCustomerEmail(),
            $this->identityContainer->getCustomerName()
        );

        $copyTo = $this->identityContainer->getEmailCopyTo();

        if (!empty($copyTo) && $this->identityContainer->getCopyMethod() == 'bcc') {
            foreach ($copyTo as $email) {
                $this->transportBuilder->addBcc($email);
            }
        }

        $transport = $this->transportBuilder->getTransport();
        $transport->sendMessage();
    }

Does anyone have any ideas why i'm getting this ?


texts:
I want to Simply expire link after 10 min in PHP.Assuming I have create custom email send template.So in email i have added one link.So how to expire email link after 10 min.
THANKS.


texts: Add extra display mode and template for category

texts:
I have multiple categories with each containing a few subcategories. These subcategories then contain products.

I'd like to add a new display mode to Magento that allows the following:

When i go to Category A on the website, it needs to show separate div's for each subcategory within called Category A. Each div would then contain a list with the products linked to said subcategory.

So far i managed to add an extra display mode option to the drop-down menu called "products within blocks" which i can assign to whatever Category i like. It can also be called from view.phtml on the same way it does with the other display mode's "products only", "mixed" etc. However, the function is still empty (doesn't output a proper template enabling the multiple div's containing products).

Anyone has a clue on where to look and add a new function to output a template like this the same way Magento does with for example the "mixed" display mode?

Making the template itself isn't the problem, but how magento outputs it is (i'd like to keep the code clean).


texts: always grouped product (simple product associated, grouped product associated)

texts:
A lot of the products are grouped products, with grouped products associated.
Don't know how this is possible, if he worked via database.

In the website version the products are showing up in the frontend, but in my copy of the site, after the reindex process and after cleaning the cache, the products disappeared.

Another thing, i added a new attribute to my products, but this don't seems to be the problem.

How can i always show grouped product in the frontend, with or without associated products?


texts: Increase price based on percentage Magento2

texts:
The valuta (currency value) of my country (Angola) change almost every day.
It's almost impossible to update the prices of each products manually.

I really want to know if there is anyway to update the price of all the products through the percentage.

Thanks,


texts:
My Question is Magento2 Error when clicking configurable product admin panel grid Section.

"This Product doesn't exit"

So give me solution .

Thank you,
Your Faithfully,
Mehul Kanjariya


texts:
I tried to overwrite **date.js(module-ui/view/base/web/js/form/element)** and **range.js (module-ui/view/base/web/js/grid/filters)**in my custom theme but it's not working. it not take me the changes form this files, even i found in pub folder in the module-ui folder, those 2 files are modified, but the effect not applied. if i try to modify in vendor, i can see the changes.

To overwirte this 2 files, in my custom theme i use this path:

  app\design\frontend\Medipoin\mytheme\Magento_Ui\web\js\form\element (date.js)

and

  app\design\frontend\Medipoin\mytheme\Magento_Ui\web\js\grid\filters (range.js)

I also clear the cache and flush.

Does anyone know why i can't overwirte this files?


texts: Missing title in Component Manager when enabling extension

texts:
I have successfully developed a Magento2 extension (yay!) and managed to install it via composer (double-yay!). Now I'm trying to enable it.

I am doing this via the Component Manager, selecting "Enable" at my extension:

In the next step some name or title of the extension seems to be missing - it just says Enable undefined:

Where is this title supposed to come from? Anyone who is able to track down the code location where this title is displayed?

(The process of enabling itself works fine. (Another yay.))


texts: Magento API V2 Methods not found but are in WSDL (works on LIVE server but not DEV)

texts:
I'm trying to get the API system up and running for a third party but I have a problem whereby the API calls work fine on my local machine and the LIVE server but are refusing to work properly on the staging server.

The error I'm getting is as follows:

Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /shop/scripts/apiTest.php:26
Stack trace:
0 [internal function]: SoapClient->__doRequest('__call('magentoInfo', Array)
2 /shop/scripts/apiTest.php(26): SoapClient->magentoInfo('a97b51e10f65783...')
3 {main}
  thrown in /shop/scripts/apiTest.php on line 2

I've checked, double checked and triple checked (even using __getFunctions()) that the methods being called are there and available and also that the user being logged in as (which works fine and gives me a session ID) has access to the methods too. From what I can tell the server setups are identical too.

Any ideas? I'm starting to pull my hair out now and really need this working ASAP :(

====

Additionally, here's a sample of code from my apiTest.php file. It fails at the magentoInfo() call.

http://pastebin.com/H043Tr21


texts: How can I save store specific product attributes without modifying untouched attributes?

texts:
When I try to update a product in a controller in the backend, default values of products are overwritten.

For example given a product with id 1 having its name set in store 0 and storeview 1 using this default name. If you execute this code in a backend controller the name attribute in storeview 1 no longer uses the default value, but the value of the name attribute of store 0 is copied to storeview 1.

$product = $this->_productRepository->getById(1, true, 1);
$product->setDescription('Test');
$this->_productRepository->save($product);

The behavior in magento 1 was that only changed attributes are saved.

It gets even more weird if there are more than one storeview. Given a product and two storeviews with these values:

Store | Attribute | Value
0 | name | "Testproduct"
1 | name | NULL
2 | name | NULL

0 | description | "Testdescription"
1 | description | NULL
2 | description | "Store 2 description"

where a value of NULL means the store should use the default value
and you try to update the name of the product in store 2 with the following code

$product = $this->_productRepository->getById(1, true, 2);
$product->setName('Testproduct in store 2');
$this->_productRepository->save($product);

the resulting data is:

Store | Attribute | Value
0 | name | "Testproduct"
1 | name | "Testproduct in store 2"
2 | name | NULL

0 | description | "Testdescription"
1 | description | "Store 2 description"
2 | description | "Store 2 description"

Notice how the name is saved to the wrong store and the description of store 2 is copied to store 1.

So what is the correct way to programmatically modify product attributes?

I've already filed a bug report on this issue on github, but I can't believe I am the first to run into this issue.


texts: magento setup upgrade error: field can't be empty

texts:
After: php-cli bin/magento setup:upgrade

Getting see image:

Anyone an idea?


texts: Magento 2 Attribute option value not showing in custom theme phtml file

texts:
I have create a Magento Theme and also add attribute with a drop-down option value.

Now I wanted to display the value of the attribute in my Magento_theme::advancesearch.phtml file.
i use in my advancesearch.phtml

/**
 * Get attribute info by attribute code and entity type
 */
$attributeCode = 'color';
$entityType = 'catalog_product';

$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();

/*$attributeInfo = $objectManager->get(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::class)
                               ->setCodeFilter($attributeCode)
                               ->getFirstItem();*/

$attributeInfo = $objectManager->get(\Magento\Eav\Model\Entity\Attribute::class)
                               ->loadByCode($entityType, $attributeCode);

//var_dump($attributeInfo->getData()); exit;

/**
 * Get all options name and value of the attribute
 */
$attributeId = $attributeInfo->getAttributeId();
$attributeOptionAll = $objectManager->get(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\Collection::class)
                                    ->setPositionOrder('asc')
                                    ->setAttributeFilter($attributeId)
                                    ->setStoreFilter()
                                    ->load();

//var_dump($attributeOptionAll->getData()); exit;

/**
 * Fetch particular option's name and value of the attribute
 */
$optionId = YOUR_OPTION_ID;
$attributeOptionSingle = $objectManager->get(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\Collection::class)
                                       ->setPositionOrder('asc')
                                       ->setAttributeFilter($attributeId)
                                       ->setIdFilter($optionId)
                                       ->setStoreFilter()
                                       ->load()
                                       ->getFirstItem();

//var_dump($attributeOptionSingle->getData()); exit;

But this showing nothing to my theme. Here is my default.xml,

<container name="header_advance_search" as="header_advance_search" label="header custom" htmlTag="div" htmlClass="advance_search">
                <block class="Magento\Framework\View\Element\Template" name="advance_search" as="advance_search" template="Magento_Theme::advance_search.phtml"></block>
        </container>
        <move element="advance_search" destination="store.menu"/>

In Magento 1 I can use Mage: and get value of attribute product information and many more in any phtml file on Theme. But here face problem.
Is there any solution?


texts: How to remove the sorting and positioning tools from the category page in frontend?

texts: How do I remove the sorting and positioning tools from the category page in frontend? Can I remove them in a way that I only disable them from one category?


texts: Send visitor to a CMS page after the Contact Form

texts:
In Magento 1.9, after a visitor submits the contact form they get sent back to the contact form page.

How can I send them to a CMS page instead?

(I did try googling this, but the only results I got were for putting the contact form inside a CMS page.)


texts: how to install porto quick start package in godaddy?

texts:
I am trying to install Porto quick start package in GoDaddy server but it redirects to another page.
please anyone can help me?


texts:
I'm new in Magento - I'm more use to work with wordpress but Here i am !

I'm having few problems with an option I would like to setup:

When the user goes to product detail, I would like him to be able only to select 100 - 200 - 300 and 500 quantity of the product.

Does anybody know how to achieve this ? I've been exploring around and see what I need to use bundles, However, I don;t manage to make this setup correctly !!

Anybody which is use to do that, I would love any help :)

Thank you for your time.


texts: A lot of our products in Magento have only 1 image. Is it possible to remove the image slider below the main product image if only 1 image exist? If 2 images or more then it should show.


texts: How to display a specific attribute in the cart in magento 2

texts:
In my case my demand is to display the weight for the product also like the name, the quantity ..., in the mini cart but I can't find a proper way to display the weight, can anyone tell me how please :

this is the code that is responsible for displaying data in the cart

File location :

vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html

The code :


texts: Help! Credit Card Grabber Found on Magento 1.9

texts:
I've found a piece of code that contacts a really weird domain with CC info.

Can someone confirm it doing something malicious?

If so, what should I do without taking down the server? I'm a total noob with 1.9.

I have root access to the old server.

its running Ubuntu 14.04.5 LTS
apache 2
magento 1.9
cache is disabled on it.
serious perfomance issues
running multiple sites
I can't afford to take it down

URL location of JS injection: base_url/checkout/cart

Contacts this domain with ajax query: jqueryexts.us/gate.php

Story:
I've been contracted to work on their MG2 upgrade, which hopefully will be done in 2 weeks.. was looking at the live site checkout js and found this shocker.


texts: How can I change favicon. icon in magento 2

texts:
How can I change favicon.icon in magento 2 from backend?

I check it in Stores -> Configuration -> General -> Design
no option there?


texts: Update products and customer data in csv

texts:
I need to add a functionality to import products and customers periodically (lets say once a 6 hours), from a given csv files.

Can I write an external script for those imports?

I tried to import data programatically, but without doing that, can I just directly use the csv file and add a cron job or similar thing to product import?

Can I use the php cron jobs to do the same task done at product import at magento admin panel?

Basically I'm looking for a script to read csv file and do the product import using that csv. without doing something like this, mentioned in another question.

Need to trigger admin panel product import for my csv by custom script. can anyone please help me?


texts:
I want to display different price on the frontend. I just want to display it don't want to show in add it cart.
I have created a product with zero price and I want to show 5$ price for that item. I tried to use AfterGetPrice Plugin shown here:  https://webkul.com/blog/set-custom-product-price-when-displaying-on-front-end-in-magento-2/
It's showing different price on the frontend but if user add to cart that price is also going in to cart and checkout.  I don't want to send that price to cart and checkout.
How can I display custom price only?


texts:
I tried everything to make the categories get updated but it simply doesn't works.
What I already did:

Refresh Cache
Refresh Indexes (admin and using shell/indexes.php)
Check if the store was using the right root category
Make sure that the categories are activated and anchor

The code that I'm using to load the categories is above:

    <?php $helper = $this->helper('catalog/category') ?>
     <?php foreach ($helper->getStoreCategories() as $_category): ?>

        <a href="<?php echo Mage::getModel('catalog/category')->setData($_category->getData())->getUrl(); ?>" title="<?php echo $_category->getName() ?>"><?php echo $_category->getName() ?>

     <?php endforeach ?>

What I need to do?


texts: Zend Logger - Dependency injection with required parameters

texts:
I want to log info to a specific file in magento2.

This does the job:

$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('Your text message');

but I want to use it with DI.

I am getting this error:

Missing required argument $streamOrUrl of Zend\Log\Writer\Stream.

I am not sure about the syntax of DI when there are required parameters. Tried a few ways but it doesn't work:

use Zend\Log\Writer\Stream;
use Zend\Log\Logger;

    public $logger;

    public $writer;

    public function __construct(
        Logger $logger,
        Stream $writer
    ) {
        $this->logger = $logger;
        $this->writer = $writer;
        $this->logger->addWriter($this->writer(BP . '/var/log/test.log'));
        $this->logger->info('Start');
    }

If someone can show me how to use \Psr\Log\LoggerInterface to write to a custom log file it will be even better.

Thanks!


texts: Magento 2 - How to upload multiple images in admin panel grid form?

texts:
I got the solution here, but it is for Magento 1.
Please show me how can i achieve it in Magento 2.

Thanks.!


texts:
How can I show the thumb image from a category on the shops home page?

I added a getThumbnailUrl function in app\code\local\Mage\Catalog\Model\category.php but I don't know how to call it with CMS Directives.

I would like to display some categories as a grid. As a work-a-round I hard coded the link to the thumb but that will be broken if a new thumb is uploaded:


texts: SUPEE 7405: Add Form Key to sidebar/default.phtml

texts:
After installing SUPEE 7405  my custom theme Sidebar Cart stopped deleting products. When delete button is clicked, throws an error: "Cannot remove the product".
Looks like I need to add Form Key to the sidebar cart delete button code.
Located in the custom theme.
I think form key should look like this:

form_key/<?php echo $formKey = Mage::getSingleton('core/session')->getFormKey();?>

/frontend/CUSTOMTHEME/default/template/checkout/cart/sidebar/default.phtml

<a href="<?php
        $params = $this->getRequest()->getParams();
        if($params['isAjax'] == 1){
            $refererUrl = Mage::registry('referrer_url');
            if (empty($refererUrl)) {
                $refererUrl = Mage::getBaseUrl();
            }
            $deleteUrl = $this->getUrl(
                'checkout/cart/delete',
                array(
                    'id'=>$_item->getId(),
                    Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl($refererUrl)
                )
            );
        }else{
            $deleteUrl = $this->getDeleteUrl();
        }
        echo $deleteUrl;
    ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?>

Please help me out adding the form key. Many thanks in advance!


texts: Make Product Y buyable only if Product X is bought

texts:
I am making an e-commerce website for an eye-wear client. They have three types of products, namely - Frames, Sunglasses and Lenses. Frames and Sunglasses can be bought freely but Lenses can only be bought if a customer buys any Frame, or some specific sunglasses with power available. Customer can choose to buy these eye-wears with or without Lenses.

When choosing a product, they will have the option to choose from different types of lenses. Lenses won't be available either in catalog or in the search.

What do you think is the best solution for this case? I am already aware of this question, but is there a better solution using Bundled/Grouped/Configurable products? How would you go about solving this?

Update

As per @Marius's suggestion, I have implemented the grouped products. It works flawlessly in front-end. Screenshot:

This is exactly what I wanted. However, I am facing some trouble in the backend now. For some reason, I am not being able to enter Stock Quantity  for bundled products.  Please refer to the screenshot below:

and the grid shows zero stock, yet the product is available in front-end.

If I could somehow specify the stock amount in backend, it would have been a perfect solution! Thanks for the help so far.


texts: What is process that Magento processes customer registration?

texts:
It all starts with the createPostAction:

public function createPostAction()
{
    /** @var $session Mage_Customer_Model_Session */
    $session = $this->_getSession();
    if ($session->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }
    $session->setEscapeMessages(true); // prevent XSS injection in user input
    if (!$this->getRequest()->isPost()) {
        $errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
        $this->_redirectError($errUrl);
        return;
    }

    $customer = $this->_getCustomer();

    try {
        $errors = $this->_getCustomerErrors($customer);

        if (empty($errors)) {
            $customer->cleanPasswordsValidationData();
            $customer->save();
            $this->_dispatchRegisterSuccess($customer);
            $this->_successProcessRegistration($customer);
            return;
        } else {
            $this->_addSessionError($errors);
        }
    } catch (Mage_Core_Exception $e) {
        $session->setCustomerFormData($this->getRequest()->getPost());
        if ($e->getCode() === Mage_Customer_Model_Customer::EXCEPTION_EMAIL_EXISTS) {
            $url = $this->_getUrl('customer/account/forgotpassword');
            $message = $this->__('There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account.', $url);
            $session->setEscapeMessages(false);
        } else {
            $message = $e->getMessage();
        }
        $session->addError($message);
    } catch (Exception $e) {
        $session->setCustomerFormData($this->getRequest()->getPost())
            ->addException($e, $this->__('Cannot save the customer.'));
    }
    $errUrl = $this->_getUrl('*/*/create', array('_secure' => true));
    $this->_redirectError($errUrl);
}

And I guess that customer data is retrieved inside $this->_GetCustomer():

protected function _getCustomer()
{
    $customer = $this->_getFromRegistry('current_customer');
    if (!$customer) {
        $customer = $this->_getModel('customer/customer')->setId(null);
    }
    if ($this->getRequest()->getParam('is_subscribed', false)) {
        $customer->setIsSubscribed(1);
    }
    /**
     * Initialize customer group id
     */
    $customer->getGroupId();

    return $customer;
}

But here comes the problem. In which command does Magento process the POST request? Here is my guess for each command:

$customer = $this->_getFromRegistry('current_customer'); This one gets the current customer from registry.
This paragraph means, if the current customer doesn't exist, you assign an empty model to it. If it exits, check from the POSTed data whether to subscribe to the newsletter.:

if (!$customer) {
    $customer = $this->_getModel('customer/customer')->setId(null);
}
if ($this->getRequest()->getParam('is_subscribed', false)) {
    $customer->setIsSubscribed(1);
}

$customer->getGroupId(); gets the group id.

But where is the main information of a customer processed? Is it inherent in the _getFromRegistry?

Digging deeper, the function is:

protected function _getFromRegistry($path)
{
    return Mage::registry($path);
}

public static function registry($key)
{
    if (isset(self::$_registry[$key])) {
        return self::$_registry[$key];
    }
    return null;
}

It seems only a simple global storage service. So is it inherent in the _getModel? But again I found nothing about getRequest() in the Customer model.

So where is the interaction between the frontend and the backend? Where does the POSTed data go? I can only see the explicit one $this->getRequest()->getParam('is_subscribed', false), but where are the others?


texts: Turpentine/Varnish does not flush on expected events

texts:
I run an Varnish(version 3.0.5)->Magento(1.9.2.1)/Turpentine(0.6.9) server and have difficulties figuring out the correct configuration for the ESI blocks of my theme (bookshop form ubertheme https://www.ubertheme.com/magento-themes/bookshop/) shopping cart.

I think I do understand now more or less how the whole thing is supposed to work, but somehow I seem to miss some major points still. This is what I did so far:

I let turpentine create a configuration for varnish and I copied it into the varnish machine. (I can't use the turpentine functionality of pushing the config directly, since this is not allowed by my hosting environment)
I added the an ESI configuration to my theme's local.xml to make the jmtoolbar private (see config below). In my trial-and-error attempts I included pretty much every possible event in the flush_event section. Probably this is not needed, but in my case it does not seem to work at all.

my theme's local.xml:

<reference name="jmtoolbar">
        <action method="setEsiOptions">
            <params>
                <method>ajax</method>
                <access>private</access>
                <ttl>60</ttl>
                <scope>global</scope>
                <flush_events>
                    <checkout_cart_save_after/>
                    <sales_quote_save_after/>
                    <sales_quote_delete_after/>
                    <catalog_product_compare_add_product/>
                    <catalog_product_compare_remove_product/>
                    <catalog_product_compare_item_collection_clear/>
                    <wishlist_item_save_after/>
                    <wishlist_item_delete_after/>
                    <checkout_cart_product_add_after/>
                    <checkout_cart_update_items_after/>
                    <checkout_cart_product_update_after/>
                </flush_events>
            </params>
        </action>
    </reference>

Here are my problems:

The cache works, because I see the shopping cart in the top bar update and when I change pages the top bar clearly comes out of the cache. However, the top bar still remains unchanged if I add an item to the cart. If I wait 60 seconds and reload, the cache version is expired and I get an updated and correct version.
The block cache does not seem to work if I switch to <method>esi</method>. In this case the cache never flushes.

The question:

How can I flush the ESI block cache on cart updates? And why does esi not work for me?


texts: Sell products in packet form using magento

texts: I am working on one magento site. Question: I have some products in grams like 0.100 grams, 0.250 grams and some of them are in kgs and I want to sell all these products in packet format like 1 kg = 1 packet also 100 grams = 1 packet, 250 grams = 1 packet.How I can set or solve this.My Magento Version: 1.9.1.0 Any suggestion or help please. Thanks.


texts: How should I add custom brand slider in magento site.?

texts:
I am new user of Magento.I am try to add owl carousel but it doesn't showing on my home page.
I added the css and js in magento\skin\frontend\rwd\default\ pathin css and js folder respectively and create on static block for at admin and added following html code:-

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

and I want to display it on home page so added a static block widget(i.e. brand)on home page. also added following code at layout xml section:-

<reference name="head">
 <action method="addItem"><type>skin_js</type><name>js/jquery-1.11.2.min.js</name></action>
 <action method="addItem"><type>skin_js</type><name>skin/frontend/rwd/default/js/owl.carousel.js</name></action>
 <action method="addItem"><type>skin_css</type><name>skin/frontend/rwd/default/js/owl.carousel.min.js</name></action>
 <action method="addItem"><type>skin_css</type><name>skin/frontend/rwd/default/js/owl.homepage.js</name></action>
<action method="addCss"><type>skin_css</type><name>skin/frontend/rwd/default/css/owl.carousel.css</name></action>
<action method="addCss"><type>skin_css</type><name>skin/frontend/rwd/default/css/owl.theme.css</name></action>
<action method="addCss"><type>skin_css</type><name>skin/frontend/rwd/default/css/owl.transitions.css</name></action>
</reference>

still it not showing in home page at frnt end..
If anything is wrong then please suggest me suitable solution to implement this activity...


texts: correct way to customize rwd theme ce 1.9

texts:
I want to edit some of the theme files without changing the default, but the files of the design/frontend/default/default folder is not overriding this theme. I also tried to create the folder design/frontend/default/rwd but not resolved.

Is there a way to replace only some files. In the latter case, I'm thinking of duplicating the theme and change the call in the admin panel.


texts:
While doing

  setup:upgrade

What Magento actually does to register the unregistered module !!,
 Can anyone define the flow?
Actually I want to send a notification to admin whenever a new module is registered.

Any help would be appreciated..!

Thanks in advance.


texts: Require js error - Mismatched anonymous define() module: function () kakao implementation magento 2

texts:
On test.php over root, login authentication is working fine. While i am trying to implement 'Kakao' login/sign-up process in magento2, I have included 'kakao.js' in the respective login page, its loaded but its giving js error in console "Mismatched anonymous define() module: function ()".

here is the sample code through which I am using to include kakao.js over customer_account_login page -

path - app/code/MyCompany/CustomerAttribute/view/frontend/layout/customer_account_login.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
       <script src="MyCompany_CustomerAttribute::js/kakao.js" order = '5000'/>
     </head>

I also create a requirejs-config.js file -

path - app/code/MyCompany/CustomerAttribute/view/frontend

var config = {
    map: {
        '*': {
            kakao: 'MyCompany_CustomerAttribute/js/kakao'
        }
    }
};

kakao.js file included on customer login  page by override customer_account_login.xml but its giving js error on console - Uncaught Error: Mismatched anonymous define() module: function......require.js 166
Don't know what i am doing wrong.

I also tried by remove override customer_account_login.xml but than its not loading kakao.js

here is thel url of kakao.js  - developers.kakao.com/sdk/js/kakao.min.js

Please help me sort-out this.


texts: Fetch Grand total is not working in backend

texts:
I would like to display Grand total in custom page in backend.

i can able to display Subtotal successfully. but when  i tried to display

sub total + Shipping charge [ means Grand total ]. Its not fetching Grand total.

Order view page :

$tot_price = $item->getBasePrice() * $_qty;

$order = Mage::getModel('sales/order')->loadByIncrementId("increment_id");
$shippingCostIncludingTax = $order->getShippingInclTax();

$main_price = $tot_price + $shippingBaseCostIncludingTax ;


texts: Magento 2.1.8: How to get product final price and regular price

texts:
Below is my product collection code:

$productCollection = $this->productCollectionFactory->create();
$productCollection->addMinimalPrice();
$productCollection->addFinalPrice();
$productCollection->addAttributeToFilter('status',
                      array('eq' => \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED));
$productCollection->addAttributeToFilter('type_id',
                      array('eq' => \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE));
$productCollection->addAttributeToFilter(
                        'visibility', array('in' =>
                                array(
                                    \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH,
                                    \Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_CATALOG
                                )
                             )
                    );
        if ($productCollection->count())
        {
         foreach ($productCollection as $product)
          {
            echo $product->getFinalPrice();
            echo $product->getPrice();
          }
        }

Both price gives same amount.It should give product original price and special price.
Please advise me for if I have missed something in code.


texts: Magento ver. 2.2.9: Import/Export options are not available

texts:
Import/Export option is not visible under .

System->Data Transfer User: admin Magento ver. 2.2.9


texts:
I have created a controller that uses the orderfactory because i need to load and modify a order.

The class looks like this:

class Accept extends \Magento\Framework\App\Action\Action
{

    protected $_myFactory;
    protected $_orderFactory;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Bla\Blabla\Model\myFactory $myFactory,
        \Magento\Sales\Model\OrderFactory $orderFactory)
    {
        parent::__construct($context);
        $this->_myFactory = $myFactory;
        $this->_orderFactory = $orderFactory;
    }

    public function execute() {
       //some code
    }
}

Upon using this controller i get the following error:

  Argument 3 passed to Bla\Blabla\Controller\Callback\Accept::__construct() must be an instance of Magento\Sales\Model\OrderFactory, none given

It worked at a start then it just refused to inject the factory. Can anyone see a problem with my code? I am going nuts over this.


texts: Overriding ConfigurableSwatches Helper 1.9.1

texts:
I want to override ConfigurableSwatches within Magento 1.9.1

I have config file at /app/etc/modules/Vlad_ConfigurableSwatches.xml

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

I have created a folder for files: /app/code/local/Vlad/ConfigurableSwatches/
Folder has two more folders: "Helper" and "etc"

"etc" folder has Config.xml file with:

<?xml version="1.0"?>
    <config>
        <modules>
            <Vlad_ConfigurableSwatches>
                <version>0.0.1</version>
            </Vlad_ConfigurableSwatches>
        </modules>

        <global>
           <helpers>
              <tag>
                  <rewrite>
                      <data>Vlad_ConfigurableSwatches_Helper_Productimg</data>
                 </rewrite>
              </tag>
           </helpers>
        </global>
  </config>

"Helper" folder has a file "Productimg.php" with following data:

class Vlad_ConfigurableSwatches_Helper_Productimg extends Mage_ConfigurableSwatches_Helper_Productimg
{
    public function getSwatchUrl($product, $value, $width = self::SWATCH_DEFAULT_WIDTH,
         $height = self::SWATCH_DEFAULT_HEIGHT, &$swatchType, $fallbackFileExt = null
    ) {
        echo 1; exit;
    }
}


texts: how to sorting product in listing page by group product in magento 2

texts: How do I show all group product first in the product listing page first and then the rest of the product shown


texts: Add multiple products to cart from wishlist through check box in magento 2

texts: I Want to add multiple products to cart from wishlist through checkbox, such as selected products along with their quantity are transferred to cart and the selected items are removed from the wishlist


texts: "Please specify shipping method" - Paypal express/free shipping

texts:
First of all I have very limited knowledge of magento so please excuse any stupid questions I might be asking.

I have a magento website built for me, only using paypal express checkout and up until recently I've had no issues. I offer 2 shipping methods - a flat rate of £2.99 for orders under £25 and free delivery for orders of £25 or more.

Since Monday any customer placing an order of £25+ and selecting the free shipping option is experiencing problems. They are completing the payment process with paypal however the transaction is failing and they are then being redirected back to my site with an error message "please specify shipping method". Alongside this message is a drop down box to select a shipping method, however it only provides customers with the option of £2.99 shipping, not the free delivery they initially selected and qualify for.

I've never had this issue before and customers placing orders of less than £25 and selecting the paid for delivery option are not having any issues.

Any advice on what might be causing this and how to fix it would be greatly appreciated.


texts: How to delete order in magento from order id 100000050 to 100000080 by using MySQL query.


texts: How to set the Store View after login automatically for the whole session?

texts:
After logging into the backend and navigating to Catalog / Manage Products, the the dropdown "Choose store view" is set to "All Store Views" instead of the defined default Store View.

After changing the dropdown "Choose store view" to the desired Storeview the Store View is set.

How is it possible to set the Store View after login automatically for the whole session?


texts: Magento 2. Installation full release with simple data

texts:
Hi have been trying to install magento 2 package full release with simple data buto unsuccessfully.

I thought I just had to download the package. Unzip it and follow the 5 steps wizard installation. But despite seeing a successfully installation at the end admin does not exist. Front end has no template....

I did it on wamp 2.5 on windows 7.
All requirement met on readNess checking page.

If someone else tried successfully thanks to exchange me the steps used.


texts: M 2.3.0: Can't Access Design Configuration - Global View page. Getting Error "Uncaught ReferenceError: Base64 is not defined."

texts:
After updating to Magento 2.3.0 from 2.2.6, I am unable to access the Design Configuration - Global View page. When I open the page, the GIF Spinner keeps rotating, but the page never fully loads.

Checking the console log, I can see the following error:

VM1667:2 Uncaught ReferenceError: Base64 is not defined
at UiClass.processFile (eval at require.load (static.min.js:9), <anonymous>:2:1857)
at Array.map (<anonymous>)
at UiClass.setInitialValue (eval at require.load (static.min.js:9), <anonymous>:2:1150)
at UiClass.initialize (eval at require.load (static.min.js:9), <anonymous>:2:1202)
at UiClass.eval [as initialize] (eval at require.load (static.min.js:9), <anonymous>:4:186)
at new UiClass (eval at require.load (static.min.js:9), <anonymous>:4:16)
at Object.initComponent (eval at require.load (static.min.js:9), <anonymous>:9:51)
at fire (eval at require.load (static.min.js:9), <anonymous>:213:223)
at Object.fireWith [as resolveWith] (eval at require.load (static.min.js:9), <anonymous>:219:181)
at Object.deferred.(/adMin/theme/design_config/edit/scope/default/key/9b7ba6c60a1a953e7c9f503841ea105378552041ca0bbd78fa9e7a700aa732b2/anonymous function) (eval at require.load (https://pub/static/version1545029869/adminhtml/Magento/backend/en_US/mage/requirejs/static.min.js:9:216), <anonymous>:221:56)


texts: dymnamic or specific product ids not match in my collection magento?

texts:
I want to filter dynamic product ids in category and product collection. But the below code is not working.

$catIds = array(4);
$notCatIds = array(3,10);
foreach ($specificProductIds as $productId) {
    $productCollection = Mage::getResourceModel('catalog/product_collection')
        ->setStoreId(0)
        ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id='.$productId, null, 'left')
        ->addAttributeToFilter('category_id', array('in' => $catIds))
        ->addAttributeToFilter('category_id', array('nin' => $notCatIds))
        ->addAttributeToSelect('*');

    $productCollection->getSelect()->group('product_id')->distinct(true);

    echo '<pre>';
    print_r($productCollection->count()); // this is also not work
}

Here filter is  not working with $productId. Please suggest


texts:
I have created custom order item  and quote item named logo.

$installer->getConnection()->addColumn($this->getTable('sales_flat_quote_item'), 'logo', 'varchar(255) NOT NULL');
   $installer->getConnection()->addColumn($this->getTable('sales_flat_order_item'), 'logo', 'varchar(255) NOT NULL');

I am able save value into this while placing order. But how to show this value below the product SKU on order details page in admin.
I don't want to make changes in core files.


texts: Magento 2 placeholder image only showing in thumbnail

texts:
I have the same placeholder image uploaded for all four options: base, small, swatch, and thumbnail. The placeholder is showing fine for the thumbnail on the category page, but when I click on one to go to the product details page it shows  default magento placeholder instead of the custom one I have uploaded.

Any clue as to what could have caused this? I have already tried both clearing the cache and running setup:static-content:deploy.


texts: updating Analytics code for Google Optimize

texts:
Google has released a new product - Google Optimize. Is it possible to modify the standard Universal Analytics code in Magento (enabled under Google API in 1.9.3) to implement the change?
The actual change needed is:

Paste into your existing Analytics snippet as shown below:

<script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxx', 'auto');
ga('require', 'GTM-xxxxxx');
ga('send', 'pageview');
</script>

so only 1 extra line is needed


texts: Website showing error log after running Magento Setup:static-content:deploy -f ..?

texts:
I am creating magento website and run stativcontent deploy -f after that i get Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/soft/public_html/megahaat.tk/var/cache/" is not writable in ..
how to fix it


texts: How to upload category image via REST API

texts:
Using swagger I am not seeing any interface out of the box that would allow me to upload category images via API calls, in the same fashion as I can do with product images by base_64 encoding them.

Does anyone have a ready module that would allows me to upload category images? or give point me in the right direction.


texts: Magento 2 - Really need help "Server can´t understand Content-Type HTTP header..."

texts:
I´m a newbie with Magento 2 and the REST API so I need a little help with this code because I tried many things and the result is always the same.

$adminUrl='http://mylink.com/index.php/rest/V1/integration/admin/token';
$ch = curl_init();
$data = array("username" => "user", "password" => "password");
$data_string = json_encode($data);
$ch = curl_init($adminUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$token = curl_exec($ch);
$token= json_decode($token);

$headers = array("Authorization: Bearer $token");

$requestUrl='http://mylink.com/magento2/index.php/rest/V1/products';

$ch = curl_init($requestUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);

$post ='{
            "product": {
                            "sku": "0010001234",
                            "name": "PRODUCTO DE PRUEBA",
                            "attributeSetId": "4",
                            "price": 20,
                            "status": 1,
                            "visibility": 4,
                            "typeId": "virtual",
                            "weight": 0,
                            "extensionAttributes":  {
                                "stockItem":
                                    {
                                        "stockId": 1,
                                        "qty": 20,
                                        "isInStock": true,
                                        "isQtyDecimal": false,
                                        "useConfigMinQty": true,
                                        "minQty": 0,
                                        "useConfigMinSaleQty": 0,
                                        "minSaleQty": 0,
                                        "useConfigMaxSaleQty": true,
                                        "maxSaleQty": 0,
                                        "useConfigBackorders": false,
                                        "backorders": 0,
                                        "useConfigNotifyStockQty": true,
                                        "notifyStockQty": 20,
                                        "useConfigQtyIncrements": false,
                                        "qtyIncrements": 0,
                                        "useConfigEnableQtyInc": false,
                                        "enableQtyIncrements": false,
                                        "useConfigManageStock": true,
                                        "manageStock": true,
                                        "lowStockDate": "string",
                                        "isDecimalDivided": true,
                                        "stockStatusChangedAuto": 0,
                                        "extensionAttributes": {}
                                    }
                                },
                            "options": [],
                            "tierPrices": [],
                            "customAttributes": []
                        },
                        "saveOptions": true
        }';

$options = array(
    CURLOPT_VERBOSE=>0,
    CURLOPT_RETURNTRANSFER=>true,
    CURLOPT_USERAGENT=>"Mozilla/4.0 (compatible;)",
    CURLOPT_POST=>true,
    CURLOPT_POSTFIELDS=>$post
);

curl_setopt_array($ch, $options);
$result = curl_exec($ch);
$result=  json_decode($result);
print_r($result);
return $result;

after run this I recieved the following message:

stdClass Object ( [message] => Server cannot understand Content-Type HTTP header media type application/x-www-form-urlencoded )

honestly I have many days trying to resolve this issue but not luck until now. So that is why I am asking for help now.

So thank you in advance for any help.


texts: Auto update quantity to a minimum value in cart on cart page

texts:
I am trying to create a page that updates the quantity off all items that are in the shopping cart to a minimum value. I am using an adaptation off the cart page for this. Below is the code I am using:

<?php
$x= $this->getQty();
$minValue = 8;
if ($x>= $minValue) {
echo 'Proceed with number: '.$x;
}
else {
    $x= 8;
    echo 'Minimum number is: '.$x;
}

?>

    <input type="text" pattern="\d*" name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $x?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12"/>

    <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update'); ?>" class="button btn-update"><?php echo $this->__('Update'); ?>
    </button>

This code is working as expected. Unfortunately users will need to hit the update button for the update to have effect. When the user just continues to the checkout the original value is transfered to this page.

Any idea on how to update the value in the input box without the user having to click a link?

Note: I know the best way off having a similar function is to have a minimum quantity placed in your shopping cart in the first place (which is in Magento's basic settings). Unfortunately in this case I need an update on the cart page.

Update. This adaptation (Please do not change core files) off the cart page seems to do the trick. It retrieves the number off items and updates the cart. Next to this I removed all links directly to the checkout page so people are forced to visit the cart page first.

AS anybody can see who has any experience in coding can see. I am not a programmer. So any recommendations to make this code better are greatly appreciated.

template/checkout/cart.phtml

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

Number of people:
<input type="text" id="mhpeople" size="6" value="" class="input-text qty" maxlength="12" />
<button onclick="myEventCalc()">Calculate</button>

(minimum amount is 8)


texts: How to change the category collection before load?

texts:
I'm trying to figure out how to change the category collection before load.

To be more specific, I've created a category 'Sales'. The category is empty with no products. I want to automatically add to this category all the products with discounts.

So i have tried to change the getProductCollection() function from Magento\Catalog\Model\Layer and add a logic check.

The check is simple, if the current category id matches the id of the 'Sales' category, create a new collection and return it otherwise return the default but I can't make it work. The collection's getSelect() seems to be right and when I execute the query to my database I get the products I want.

In the class, though the collection keeps coming back with no products.
My collection is being instantiated from this class Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection because I saw the default collection is of the same type.

Thank you in advance.


texts:
I'm looking at our Magento store's report on GA under the Multi-Channel Funnels Overview, and this Conversions number is way off. It's about 9 to 10 times larger (!) than our actual number of conversions for a given period of time. Am I missing something about this report?

It does report, however, the correct order numbers and amount of dollar amount.

We have GA enabled in Magento admin as you would normally set up. Is this report buggy? Magento's GA script is not easy to edit or examine. (it looks like a code generates the script).

We're using Enterprise 1.12.0.2


texts: Using cart rules (coupons) in addition to catalog rules

texts: When running a catalog rule we are finding that customers can still use coupons that get added in addition to the catalog discount already applied. We have the discard subsequent rules turned on for all pricing rules, and have changed the priorities for the cart rules to be after the catalog rule. Does anyone know if these modules talk to each other, or had any other issues with running a catalog rule where coupons can still be applied?


texts:
I have just noticed that in my 1.9.0.1 store, the drop down boxes for selecting store view at the top left of the category and product pages are missing.

I have had a look at my old 1.6.2.0 store which has them. Have they been removed in the later versions and I just haven't noticed until now, or should they be there and something has just gone wrong to not load them?

1.6.2.0 Store:

1.9.0.1 Store:


texts: What PHP class executes the SQL to select models and collections from the database?

texts: When I have a PHP model or collection of a Magento entity (such as a product or customer), what PHP class(es) is in charge of constructing and executing the SQL that selects that model or collection of models from the database?


texts: Fatal error: Call to a member function create()

texts:
I refered to https://www.magestore.com/magento-2-tutorial/how-to-create-an-admin-form-look-like-a-configuration-page-magento-2-configuration-p3/ but there is an issue.

namespace Demo\Pro\Controller\Adminhtml\Index;

class Configuration extends \Magento\Backend\App\Action
{

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

    /**
 * constructor
 *@param Context $context
 *@param PageFactory $resultPageFactory;
 * @return void
 */
protected function _construct(
    \Magento\Backend\App\Action\Context $context,
     \Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
    parent::_construct($context);
    $this->resultPageFactory = $resultPageFactory;
}

/**
* Index action
*
*@return \Magento\Backend\Model\View\Result\Page
*/
public function execute()
{
    /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
    $resultPage = $this->resultPageFactory->create();
    $this->getRequest()->setParam('section','demo_pro');
    $resultPage->setActiveMenu('Demo_Pro::Configuration');
    $resultPage->getConfig()->getTitle()->prepend(__('SL Pages Authentication'));
    return $resultPage;
}
}


texts: Create dependent variable (product attribute) that follows other variable

texts:
I have created a product variable “IsOrderable”. When Salable Quantity <=0 IsOrderable should get value “No”. Else IsOrderable = “Yes”.
So, no manual adjustments, just a dependent variable which must be recalculated automatically when SalableQuantity has been updated.
What would be the easiest way to do this?
Thanks.


texts: Magento 2: Fails to upload a transactional email logo from admin

texts:
I'm trying to change transactional email logo from.

  Admin > Content > Design > Configuration > Edit any record ->
  Transactional Emails

It's on Magento 2.1 but logo showing broken image after save.
please refer attached screen shot.


texts:
I have a custom role in magento 2.4.1 to manaege the backend and I have given the user restricted resources.
Firstly there was no 2FA enabled but after enabling it during the time of the login of that role created it shows the following

What is the solution for this problem?


texts: HOW: Currency switch via URL code: ?currency=CAD and ?currency=USD

texts:
I want my Magento store to switch currency to Canadian dollars when adding ?currency=CAD suffix in the URL.
www.website.com/accessirues?currency=CAD

As well as, when adding ?currency=USD suffix in the URL, I want to switch to USD currency.
www.website.com/accessirues?currency=USD

Please someone help me out, I am trying to figure it out for several weeks and no luck.

Help very much appreciated!


texts: Magento 2: Get order list items for a customer

texts:
I want to display on a .phtml file a list of order items for a logged in user. I don't want to use object manager.

I can get the id of the logged in user ($customerId) on the phtml.

I have created a block class

namespace 'moduleNameSpace';
class Orders extends \Magento\Framework\View\Element\Template
{
    protected $_customerSession;
    protected $_orderCollectionFactory;
    protected $orders;
    public function __construct(
            \Magento\Backend\Block\Template\Context $context,
            \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory,
            \Magento\Customer\Model\Session $customerSession,
             array $data = []
        ) {

    $this->_orderCollectionFactory = $orderCollectionFactory;

    parent::__construct($context, $data);
    $this->_customerSession = $customerSession;
}

public function getLoggedinCustomerId() {
    if ($this->_customerSession->isLoggedIn()) {
        return $this->_customerSession->getId();
    }
    return false;
}

public function getOrders($customerId)
{

    if (!$this->orders) {
        $this->orders = $this->_orderCollectionFactory->create()->addFieldToSelect(
            '*'
        )->addFieldToFilter(
            'customer_id',
            $customerId
        )->setOrder(
            'created_at',
            'desc'
        );
    }
    return $this->orders;
}
}

and then on the .phtml template i have

$customerId = $block->getLoggedinCustomerId();
$orders = $block->getOrders($customerId);
foreach ($orders as $order) {
foreach ($order->getAllVisibleItems() as $item){
   ...
}
}

The problem is that foreach is not working, even when I want to count the  number of orders for example

foreach ($orders as $order) {
$orderCount++ ;
}
echo $orderCount;

How can I get all order items?
I think the problem may be on the block class


texts: I want to save my custom message to the quote items. How do I do that? What file should I modify and the best approach for this? Been looking for tutorial but I got no answer


texts: How to get the value of quantity entered in the input field in single product page to input field in cart page in magento?

texts:
I have build a ecommerce website in magento. In the website, I have a single product page for all products which has a quantity input field, When I am entering a value in the quantity input field and clicking the add to cart button, it goes to a cart which also has a quantity input field but it doesn't show the value inputted in the quantity field in the single product page. Can anyone tell how to solve this issue?

In the database, sales_flat_item has a quantity attribute but has a default value 1 being stored.


texts: Displaying a message when hover on a readonly attribute!

texts:
I'm trying to display message on hover over a readonly select in a product page,
( Magento 2.2.4, Php 7)

Here's my attempt:
CSS:

#select_801[readonly]{
  background: #eee;
  pointer-events: none;
  touch-action: none;
}

Javascript:

jQuery('#select_801 option[value=2561]').attr('selected','selected');
jQuery('#select_801').attr('readonly', true);
jQuery('#select_801').attr('data-title', 'This Element is disabled');
jQuery( "#select_801" ).hover(function() {
    jQuery(this).find('data-title').fadeIn(300);
});

I tried using tooltip but it said it's not a function on Magento.


texts: Problem with installing mcrypt on PHP 7.3.13 Ubuntu

texts:
I have moved my magento 2 project from one vps server to another. So im currently setting up all the PHP modules. But there seem to be some problem with the mcrypt module.

This is what I have been doing.

$ sudo apt-get -y install gcc make autoconf libc-dev pkg-config
$ sudo apt-get -y install libmcrypt-de
$ sudo pecl install mcrypt-1.0.2
> libmcrypt prefix? [autodetect] :

Im adding "extension=mcrypt.so" to php.ini

Then I do

sudo bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so > /etc/php/7.2/cli/conf.d/mcrypt.ini"
sudo bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so > /etc/php/7.2/apache2/conf.d/mcrypt.ini"

I followed these instruction: https://lukasmestan.com/install-mcrypt-extension-in-php7-2/

But when I check with php -i | grep mcrypt

I get this is my output:

P

HP Warning:  PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20190902
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
/etc/php/7.3/cli/conf.d/20-mcrypt.ini,
/etc/php/7.3/cli/conf.d/mcrypt.ini

I have checked both 20-mcrypt.ini and mcrypt.ini and they look exaclty the same. But my PHP seems to be compiled with the wrong module API. I google around but couldn't find anything specific on that. Any idéas? Thanks!

What I have been using

https://websiteforstudents.com/install-php-7-2-mcrypt-module-on-ubuntu-18-04-lts/
https://stackoverflow.com/questions/48275494/issue-in-installing-php7-2-mcrypt
https://gist.github.com/arzzen/1209aa4a430bd95db3090a3399e6c35f
https://stackoverflow.com/questions/50354696/howto-ubuntu-18-04-install-activate-php-extension-ext-mcrypt


texts: How to show customer registration date on the Sales Order Grid

texts:
I would like to add the customer registration date on the sales Order Grid.

I added the bolow code in app\code\local\Mage\Adminhtml\Block\Sales\Order\Grid.php

$this->addColumn('customer_created_at', array(
            'header' => "Date d'inscription",
            'index' => 'customer_created_at',
            'type' => 'datetime',
            'width' => '100px',
        ));

I also added in a config.xml file

<fieldsets>
    <customer_account>
        <created_at>
            <to_quote>customer_created_at</to_quote>
       </created_at>
    </customer_account>
    <sales_convert_quote>
        <to_order>customer_created_at</to_order>
    </sales_convert_quote>
</fieldsets>

I managed to diplay the field in the grid, but can't get the right data.

I also added a customer_created_at column in sales_flat_order, sales_flat_order_grid and in sales_flat_quote.

Thank you


texts: Translate Magento String "Search Results for"

texts:
On my Magento install Im using Portuguese language, all strings are translated OK, except on search page results the page title shows english text

Search Results for...

On app/design/frontend/base/default/template/catalogsearch/result.phtml I have:

<h1><?php echo ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper

('catalogsearch')->getEscapedQueryText()) ?>

I know that that's the one line that produces the page title since if I add a character to the section

$this->__("Search results for '%s'"

The website shows that change...

On Mage_Catalogsearch.csv I have:

"Search results for '%s'","Resultados da pesquisa por: '%s'"

But still, translation not working for this specific string.

Any idea why??


texts: Magento is creating 700 + connections leading to database breakdown whenever cache is flushed or indexing is triggered. Production site remain down for 20 mins till all connections clears. All connections firing same query. And remain in state creating sort index. Using very high database configuration. DB on Amazon rds.Any help is appreciated. This is breaking our production site


texts: Magento database repair tool throws 500 HTTP ERROR

texts:
I'm trying to fix a Magento 1.9.3.1 database but I get the 500 HTTP ERROR everytime, after I fill in the database credentials (the corrupted database connection login details and the reference database connection login details).

I really don't understand why I get this error.... Can anyone help, please?

UPDATE: after checking the error logs, I saw this message:

  [:error] [pid 10608] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /path/to/magento/db-repair-tool.php:79


texts: Copy a customer-attribute value into another one programmatically

texts:
i have a customer attribute with id: mobile, which is a required field in account creation. i want an observer to copy mobile attribute value into Magento default _address_telephone attribute automatically on account creation.

how should its observer.php and config.xml be?

I did it for product attribute this way: How to copy a product's attributes value to another attribute?


texts: Magento 1.9 return 403 error while uploading downloadable products

texts: I am getting 403 error for downloadable products,


texts: How to add cart rule for specific categories in magento 2

texts:
I have magento 2.2.3 store, I am try to add shopping cart rule for products in specific categories only.But if someone adds has one product from selected categories and has more products from unselected categories the discount applies to all products.I was wondering if I am doing something wrong. please see attached image.

Thanks a lot.


texts:
I installed a magento with sample data. Everything working fine. Only i am unable to login to admin.

When i access magento login page: at localhost/admin
Then it shows this normal magento login:

But after login it again shows a login page but with session key in url (which seems i login)

this is the url generated

http://localhost/index.php/admin/index/index/key/daa4f07e53bab68173031a1b566a6c87/index.php/admin/dashboard/index/key/f5af74af31bc336d09d1bff85da57625/?SID=napqsla40jor8f5kjvt4r27210

And when i modify this url to

http://localhost/admin/dashboard/index/key/f5af74af31bc336d09d1bff85da57625/?SID=napqsla40jor8f5kjvt4r27210

Then it shows actual dashboard but without loading js and html files. ONLY HTML version.

Any idea why it is doing like this?

Apache Rewrite enabled

Curl Enabled


texts: How to remove url /contact/index in contact page in Magento 2

texts:
When we entering contact form in footer from any page it redirect only - /contact/index/ Any options such that we can submit form in footer section not redirect /contact/index

After submit form it show -

I add contact form in footer section using this link - Magento2 contact form in CMS page, how to submit form without redirection and contact details not show in above footer section .Please reply me


texts: Migration from 2.2.4 enterprise to 2.3.5-p2 - setup:upgrade mysql error

texts:
I am working on a 2.2.4 enterprise to 2.3.5-p2 migration.
I have gone through all steps such as composer, internal modules solutions, until setup:upgrade step. I searched for solution on the web, and tried to raise memory limits on MySQL server, but it doesn't work yet.
The upgrade ran smooth on a small development version of the database. But this is a huge client with +40k SKUs and some thousand monthly orders.
Anyone can help ?
Thanks !!!

Updating modules: Schema creation/updates: SQLSTATE[23000]: Integrity
constraint violation: 1452 Cannot add or update a child row: a foreign
key constraint fails (magento.#sql-1c_10, CONSTRAINT
SALES_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID FOREIGN KEY
(customer_id) REFERENCES customer_entity (entity_id) ON DELETE
SET NULL), query was: ALTER TABLE sales_order MODIFY COLUMN
entity_id int(10) UNSIGNED NOT NULL  AUTO_INCREMEN....


texts:
I would like to change or remove the phone number on top right of this Magento site.

Please can someone assist me. I have tried every where in the admin section to find it but couldn't find where to remove it.
Thanks in advance  guys.


texts: Error when filtering order by date in Magento 1

texts:
Hi i am getting this error after i filter the order by date on magento here is the screenshot:

Actually, I recently added mailchimp extension & that is causing the problem with magento 1.9 is anyone aware of a solution?


texts: What does "setIsSuperMode" do on Quote Object in Magento 2?

texts:
I am creating a Quote programmatically, I have found a field IsSuperMode on Quote object.

What effect does it have on the Quote ?

Class: /Magento/Backend/Model/Session/Quote.php

https://github.com/magento/magento2/blob/c20732c44c3373dec86e40e5885969a46a6524ef/app/code/Magento/Backend/Model/Session/Quote.php#L173


texts: Magento 1.9 - What event used for observe Minimum Order Value Condition?

texts:
Selected customer able to place an order even minimum order condition applied. Eg: My store Minimum order value: 500 if selected customer order value 200 he should place an order.

What event used for this? How to trigger observer?


texts: Get product attribute value in GraphQL api

texts:
I'm having a problem with the GraphQL API for Magento 2. I cannot retrieve the attribute value of multiselect or dropdown attributes when I retrieve my products.

In this example my attribute "material" returns an integer of the value ID instead of the textual value. I'm currently using the endpoint https://devdocs.magento.com/guides/v2.3/graphql/reference/custom-attribute-metadata.html to retrieve all the option values, but this is not very efficient.

{
  products(
    search: "Chair"
    pageSize: 10
  )
  {
    total_count
    items {
      name
      sku
      material
      price {
        regularPrice {
          amount {
            value
            currency
          }
        }
      }
    }
    page_info {
      page_size
      current_page
    }
  }
}

returns:

{
  "data": {
    "products": {
      "total_count": 48,
      "items": [
        {
          "name": "Brown Chair",
          "sku": "4203894",
          "material": 209,
          "price": {
            "regularPrice": {
              "amount": {
                "value": 89,
                "currency": "EUR"
              }
            }
          }
        },
    .......

Is there a way to get the textual value of the "material" attribute ("Leather") in this call?


texts: Magento 2.2 - Cannot update attribute values

texts:
I've created some custom product attributes with REST API, correctly populated them and assigned values to products.

Everything works fine in  dev environment whereas I got difficulties in staging environment, even though values and settings are the same, even in the DB.
If, for example, I want to update the value of "is_filterable" option in an existing attribute from the backend, Magento says it saved the attribute correctly, but actually no changes are made.

I've tried to update with a PUT call to REST API with correct values, but I'm able to update only the attribute labels,

This is the json i'm passing to "products/attributes/my_attr"

    {"attribute":{"attribute_code":"my_attr","attribute_id":174,"scope":"Global","default_frontend_label":"my_attr","frontend_labels":
[{"store_id":1,"label":"my_attr"}],"frontend_input":"select","is_searchable":true,
"is_visible_in_advanced_search":true,"is_comparable":true,"is_filterable":true}}

And this is the Json response, where you can see it is totally ignoring the values for is_filterable and scope.

    {"is_wysiwyg_enabled":false,"is_html_allowed_on_front":false,"used_for_sort_by":
true,"is_filterable":false,"is_filterable_in_search":false,"is_used_in_grid":
true,"is_visible_in_grid":true,"is_filterable_in_grid":true,"position":0,
"apply_to"[], "is_searchable":"0","is_visible_in_advanced_search":"0",
"is_comparable":"0","is_used_for_promo_rules":"0","is_visible_on_front":"0",
"used_in_product_listing":"0","is_visible":true,"scope":"global",
"attribute_id":174,"attribute_code":"taglia","frontend_input":"select",
"entity_type_id":"4","is_required":false,"....

Obviously I've reindexed and cleared caches continuously.

The only way I managed to change those values is directly from the DB.
I'm going to try with an extension but I'm not sure to succeed.

I've seen there was an issue that should have been fixed in older Magento versions and actually other attributes work fine.

Any clue?

EDIT: I managed to update values with a REST API request, but still not able to save directly from the backend. This is the updated call (array version)

$data = [
    "attribute" => [
        "attribute_code" => $my_opt,
        "attribute_id" => 173,
        "entity_type_id" => 4,
        "scope" => "global",
        "default_frontend_label" => $my_opt,
        "frontend_labels" =>  [
            ["store_id" => 1,
            "label" => $my_opt ]
        ],
        "frontend_input" => "select",
        "is_wysiwyg_enabled" =>   true,
        "is_html_allowed_on_front" =>  true,
        "used_for_sort_by" =>  true,
        "is_filterable" =>  true,
        "is_filterable_in_search" =>  true,
        "is_used_in_grid" =>  true,
        "is_visible_in_grid" =>  true,
        "is_filterable_in_grid" =>  true,
        "position" =>  1,
        "is_searchable" =>  true,
        "is_visible_in_advanced_search" =>  true,
        "is_comparable" =>  true,
        "is_used_for_promo_rules" =>  true,
        "is_visible_on_front" =>  true,
        "used_in_product_listing" =>  true,
        "is_visible" =>  true
    ]

];

EDIT2:
Moreover, if I try to update some info from the backend, Magento resets the values of the default view store label to empty and the "use in layered navigation" to "No". Stranger at any try.

EDIT 3
seems like the most possible issue can be caused by duplicated values in these dropdown attributes, but I carefully removed all of them from

eav_attribute_option
eav_attribute_option_value

in the db, but actually removing options only, works from the backend too, whereas the creation of new options is not working


texts: What are the ramifications of not re-indexing the price index after updating product prices

texts: We are working with a third party on developing a Magento plugin for us. This plugin pulls data from an external web service and updates the prices of products in bulk on an interval. For example, it might run every 5 minutes and update the prices of 250 products. In our development testing so far we found that to update the prices of 250 products takes less than 4 seconds. However, if we re-index the the price index (just once after all the updates) it takes almost 3.5 minutes. My question is what do we risk if we just don't re-index prices? What on the site (if anything) will not work right or as expected? Any user experience risks? Issues with user carts, checkouts, or orders?


texts: graphql filer options do not represent filters data

texts:
When I query the test site with chomeIQL extension using the query:

query category($cat: String) {
  products(filter: {category_id: {eq: $cat}}) {
    filters {
      name
      filter_items {
        label
        value_string
        __typename
      }
    }
  }
}

I get filters like:

"name": "Fashion Color",
"filter_items": [
  {
    "label": "Gold",
    "value_string": "14",
    "__typename": "LayerFilterItem"
  },
  {
    "label": "Peach",
    "value_string": "18",
    "__typename": "LayerFilterItem"
  },

But the graphQl docs (Docs => Query => Producs => filter) is of type ProductFilerInput and that has nothing resembling color.

The data for the price is:

    {
        "name": "Price",
        "filter_items": [
        {
            "label": "$0.00 - $99.99",
            "value_string": "-100",
            "__typename": "LayerFilterItem"
        },
        {
            "label": "$100.00 and above",
            "value_string": "100-",
            "__typename": "LayerFilterItem"
        }
        ]
    }

How does that represent ProductFilterInput.price which is FilterTypeInput ({gt:String,lt:String ...}?

Is this caused by settings not being correct or is it a thing with Magento graphql not fully compatible with the rest of the application?


texts: Is their any way we can create partial credit memo using order object & item ?


texts: ItemID is not available at checkout_cart_product_add_after

texts:
I am basically trying to implement the scenario where certain special products can only be brought once in customer's lifetime. So need to make sure that if they are added again after being purchased in past, they are swapped with another regular product.

All this is working on checkout_cart_product_add_after except the problem that the product which has been just added doesn't have Item ID assigned to it yet. My understanding is that the item ID hasn't been assigned to it since I am in middle of the saving process.

This is what it looks like inside the observer:

How can I remove an item at this point of execution without itemID being available? I studied Cart & Quote classes in Core and I don't see any way of removing item without knowing its ItemID since its basically just an element of array.

Should I be using another event to do this where this is available? My only concern is that I need to implement the whole swapping in place, not just removed the just added item in cart. So need a combination that works for both (removing the just added product + add more as its replacement).

Any pointers?


texts: Magento2: Adding CMS Pages to menu with URL Rewrites

texts:
Following the magento1.x method for adding cms pages to the menu doesn't seem to work for magento2.x

At present I activate the autogenerated url for my homepage/home category which works - changing the url from homepage.html to catalog/category/view/id/19

I then create a custom url rewrite to change catalog/category/view/id/19 to home which fails

Is this a bug, or has the method changed for adding cms pages to the main menu?


texts: How To Create a Custom Block in Custom Module?

texts:
I have followed a tutorial to create the block. All codes are in here
http://www.pierrefay.com/magento-create-block-44

but I cant seem to connect to the template file, no matter where i put it. i tried the base then tried the default and then tried the rwd. it still does not connect. i changed the default package through admin panel to rwd and it still wont work. any comment or suggestions will be highly helpful. I am stuck in it for days.


texts: Magento 2 : Search, Mini cart and menu disappear from website

texts:
I have Magento 2.1.7 store and it was working properly since last 3 months. But yesterday Search, Mini cart and menu disappear from website ,there is no error log for this.
I didn't find how to fix the issue.

Can anyone suggest what should I do to find out the error?


texts: Where to use object manager in Magento 2

texts:
I have doubt on object manager someone saying You should not use the ObjectManager directly!
but I have questioned if I want to get customer session in my phtml how can I get?. that time can I use object manager in that file create customer session and get customer data.

And if need to filter my custom collection for that can use object manager or can I create an object in the block and call that function into phtml file to send filter value.

Can anyone tell coding standards?


texts: Show Pincode/shipping availability checker in magento 2 header

texts: I have implemented Pincode checker in Magento 2 product detail page by creating a custom module, but I need to show it in the header section and hide it from the product detail page. How can I achieve this?


texts: Different Prices for Frontend and Backend for Same Customer Group

texts:
I have a situation where I want to show the different (actual) price on the front-end for same customer group, where as I want to use a discounted price  (assigned to that group) in the back-end when creating order in back-end.

Is this possible?

I have no clue where to start, may be we can detach customer group information when customer logs in from front-end? or use some hook to override the pricing?

Any help will be great!


texts: Calling footer links in child template file of footer

texts:
I have local.xml like this,

<?xml version="1.0"?>
    <layout>
        <default>
            <reference name="footer">
                <block type="core/template" name="footerblock" template="footerblock.phtml" >
                <block type="core/template" name="copyright" template="copyright.phtml" />
            </reference>

        </default>
    </layout>

So in the footer, I can access child templates footer.phtml,

<?php echo $this->getChildHtml('footerblock'); ?>
<?php echo $this->getChildHtml('copyright'); ?>

And I can access footer links in footer.phtml file, but how can I access it in footerblock.phtml file like this?

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


texts: How to create a product finder/selector in my Magento store?

texts:
I want to create an interactive Product selection survey or quiz selector in my Magento store. The quiz selector will ask a number of questions with multiple answers, leading to a certain product depending how the customer answers each question.

You can see an example here of what I want to create:
http://www.nationwideplatforms.co.uk/platform-selector (having a product selector that leads to advising the right forklift vehicle based on a number of questions)

Would anybody be able to point me in the way of a plugin they think would achieve this or where to start, as I can't find much online at all.

Any help would be much appreciated.


texts: Customer data not showing after login in magento 2.2.9 rest api

texts:
I am using Magento 2.2.9 rest /V1/customers/me it didn't respond.
steps 1. Use  rest/V1/integration/customer/token
Response Get: bf03bdurbv7pelhgtjnw5yu7kqkr6pbd
http://prntscr.com/vfxtsx
Steps 2: rest /V1/customers/me
Authorization: Bearer bf03bdurbv7pelhgtjnw5yu7kqkr6pbd
Response:
{
"message": "Consumer is not authorized to access %resources",
"parameters": {
"resources": "self"
}
}
can you please help me to sort out this as soon as possible?


texts: Upsell product disappear after adding to Cart - CE 1.9.1

texts:
product X has 1 upsell product Y and Y is displaying on the product page of X. After adding Y to the basket, it disappear as upsell product on product page X.

Does anybody know how to display upsell products on product page constantly whether the product is added to the basket or not?


texts: What is the current UPS shipping gateway? (outage 2019-01-06)

texts:
I'm using Magento 1.7, and it uses the UPS shipping calculator at

http://www.ups.com/using/services/rave/qcostcgi.cgi

Since yesterday afternoon, it has been returning a 404 not found and this is preventing anyone from placing an order!   I'm very surprised that the entire Magento community isn't on fire with this event... so maybe I just have an old URL that nobody is using anymore?  Does anyone know if this service has been retired or if it is a temporary outage?


texts: use datetime in expiration date for cart price rule

texts:
I am using Magento CE 2.4 and I am using admin API to create a coupon and cart price rule
I want the coupon duration to become 10 min and then it is expired
so I found that in the cart price rule they use 'from_date' and 'to_date' without time and also it declares in the database as  a date type, not  DateTime
and also in Magento\SalesRule\Model they say " @deprecated 101.1.3 Coupon expiration must follow sales rule expiration date." for expiration_date of the coupon
so how I can put the period of the coupon or cart price rule 10 min ??


texts: Disable shipping method based on category

texts: Currently I'm working on a new shipping method. I want this shipping method (pick-up at store) to be enabled for all categories, except for the category 'sale'. By category I mean the categories you can create in the backend of Magento, under the tab 'Products'. I did some research, but can't find a working code.


texts: Aschroder Extensions having error 404 page not found

texts: Form SMTP configuration I have added extention Aschroder Extensions. I have installed it. It is enabled too. But while selecting option I got error 404 page not found. Please help anybody knows. Version community edition 1.8 and 1.9 on both have tried.


texts:
I am trying to figure out the issue with receiving the BCC of orders placed. in the process, resend an older test order.

I am wondering if resending an older order triggers an email to the Send Order Email Copy Method and thus the emails be sent to Send Order Email Copy To also or do i have to place another new test order to figure this out?


texts: how to get custom attribute value for related products in product details page

texts:
I am overriding default related.phtml in custom theme
 Magento_Catalog but data is not showing properly.If Any One have idea
 please help me.

<?php
if ($currentProduct = $block->getProduct()) {
    $relatedProducts = $currentProduct->getRelatedProducts();
    $blockObj = $block->getLayout()->createBlock('Vendor\Module\Block\Feature');
    if (!empty($relatedProducts)) {

        foreach ($relatedProducts as $relatedProduct) {

                $productId = $relatedProduct->getId();
                $ProCollection = $blockObj->getProductData($productId);

                $ProductType = $relatedProduct->getData('type_product');
                 //$productType = $relatedProduct->getResource()->getAttribute('type_product')->getFrontend()->getValue($relatedProduct);
                ?>

                <?php

        }

    }

}

?>


texts: addJs with name vs script: Image Uploader not working after SUPEE-8788 on 1.9.1.0

texts:
I'm having an Issue with SUPEE-8788 and the new uploader feature on a 1.9.1.0 magento. The patch originally created the files in the wrong parent directory (don't know why for now, looks like the root taken for the realtive path was wrong). So these files were created in the /skin/frontend/rwd/default/js/lib instead of the /js/lib:

lib/uploader/flow.min.js

lib/uploader/fusty-flow.js

lib/uploader/fusty-flow-factory.js

I found this with a colleague that had the same issue and he moved the files to the right place, flushed the cache and the new uploader was functional. That worked for one of my websites(1.9.2.4), but not for another one that is 1.9.1.0. I have a js error that says :

  Uploader is not defined

No wonder, the 3 new files are not included by looking at the source code. My js are not combined by magento.

I noticed this by reading the patch, I end up having this in the /app/design/adminhtml/default/default/layout/main.xml;

<action method="addJs"><name>lib/uploader/flow.min.js</name></action>
<action method="addJs"><name>lib/uploader/fusty-flow.js</name</action>
<action method="addJs"><name>lib/uploader/fusty-flow-factory.js</name></action>

So the new files were added using the action method addJs but instead of having inside the action tag < script >, I have < name >. Does it make any difference?

I tried to change the < name > with < script >, with no luck. Could this be the cause of the issue and if so, how to fix this?


texts: If simple product has parent product,Join simple product review to group product

texts: I want to join simple product review to there parent product,if the simple product is associated with any product,then the review will also attached to the paent product


texts: Magento Redis "Read error or connection" in every 5 minutes when cron run

texts:
We are running magento EE ver. 1.14.1.0. It was running fine for a long, but suddenly we got an issue as follows in storefront.

Redis Read error on connection

  Uncaught exception 'CredisException' with message 'read error on
  connection' in
  /var/www/vhosts/project/httpdocs/lib/Credis/Client.php:631

  Sample stack trace

  …:__call called at /var/www/vhosts/project/httpdocs/lib/Credis/
  Client.php (440)

  …alled at /var/www/vhosts/project/httpdocs/lib/Cm/Cache/Backend/
  Redis.php (117)

  …_construct called at /var/www/vhosts/project/httpdocs/lib/Zend/
  Cache.php (153)

  …akeBackend called at /var/www/vhosts/project/httpdocs/lib/Zend/
  Cache.php (94)

  …/var/www/vhosts/project/httpdocs/app/code/core/Mage/Core/Model/
  Cache.php (137)

  …var/www/vhosts/project/httpdocs/app/code/core/Mage/Core/Model/
  Config.php (1354)

  …getModelInstance called at /var/www/vhosts/project/httpdocs/app/
  Mage.php (463)

  …t /var/www/vhosts/project/httpdocs/app/code/core/Mage/Core/Model/
  App.php (401)

  …t /var/www/vhosts/project/httpdocs/app/code/core/Mage/Core/Model/
  App.php (269)

  …_Model_App::init called at /var/www/vhosts/project/httpdocs/app/
  Mage.php (616)

  in Mage::app called at /var/www/vhosts/project/httpdocs/index.php (89)

This happens every 5 minutes when magento default cronjob runs.

We tried increasing read_timout, disabling redis snapshot feature etc. But no luck.

Our redis version is 3.2.10


texts:
following code:

<?php
namespace UV\Adressen\Observer;

use Magento\Framework\Event\ObserverInterface;

class LieferadresseEditObserver implements ObserverInterface
{
    private $customerRepository;

    public function __construct()
    {

    }

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

        /*
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $orderRepository = $objectManager->get('\Magento\Sales\Model\OrderRepository')->create();
        print_r(get_class_methods($order)); exit;
        $addressRepository->save($billingAddress);
        */

        $address = $observer->getEvent()->getAddress();
        if($address->getAddressType() == 'shipping') {
            error_log("Das ist eine Lieferadresse");
            $order = $address->getOrder();
            #print_r(get_class_methods($order)); exit;
            $order->setBillingAddress($order->getShippingAddress());
            #$order->setShippingAddress($address);
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $orderRepository = $objectManager->get('\Magento\Sales\Model\OrderRepository');
            #print_r(get_class_methods($orderRepository)); exit;
            $orderRepository->save($order);
        }
    }
}
?>

Why is the billing address not being changed to shipping address?
They should be equal after the code has been executed.
Thanks!


texts: Checkout Process Redirect to Shopping Cart is empty

texts:
My checkout page not work properly. I have recently installed SSL and memcache.
When click on addtocart its work fine. but when click on process checkout its redirect to Shopping Cart is empty. I dont know what is problem. below my backend setting.


texts: 'php magento setup:di:compile' generated cache file with wrong user groups

texts:
Suppose user-a run the command php magento setup:di:compile, it generated cache file with wrong user group, the wrong user group is user-a(the primary group of user-a), in fact it should be apache(the apache group in CentOS), then it will result file permission error when visit website in browser.

I had set the SetGID, most files generated with right user group(apache), only the files in var/cache/mage-tags folder has wrong user group(user-a), so I have to set its group manually every time, anyone has better way to solve the problem? Thanks.


texts: Is it a way, command to findout which extension extends a class? Bundle product - Order email Issue

texts:
I have an issue with order email, when the order has a bundle product the confirmation mail is:
Error filtering template: The product that was requested doesn't exist. Verify the product and try again.
I think that a extension extend the class \Magento\Bundle\Block\Sales\Order\Items\Renderer
and i wonder if it is a command to show what extend this


texts: Magento 2: Collection getSelect does not load the results

texts:
I have this method

  public function getCarBrands() {
    return $this->_objectManager->create('Scandimedia\Wheels\Model\CarModels')->getCollection()->getSelect()->group('brand');
}

But when I execute it and try to foreach the results with:

foreach($this->getCarBrands() as $model) {
echo $model->getData();

}

It does not do anything.
But when I echo it returns:

SELECT `main_table`.* FROM `scandimedia_wheels_car_models` AS `main_table` GROUP BY `brand`

If I do get_class, it gives me this result: Magento\Framework\DB\Select

How can I actually load the results from the group and get the data without running the string as a query?