texts: Correctly adding constructor in my class

texts:
I have created a layout processor for checkout field, where I also set the validations for the field:

'validation' => ['validate-jurgis' => true],

I want true to be replaced with a value from my admin config.

As far as I know, you have to use a __constuct to get admin values in M2:

protected $_scopeConfig;
public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
    {
    $this->_scopeConfig = $scopeConfig;
    }

Then I could call my value like:

$value = $this->_scopeConfig->getValue('helloworld/general/enable', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

I really don't know much about classes and haven't been able to integrate it correctly.

How do I correctly add __construct to my layout processor so that I could use it in the afterProcess() function?

Full layout processor code:

<?php
namespace Vendor\namespace\Block;

class LayoutProcessor
{
     /**
     * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject
     * @param array $jsLayout
     * @return array
     */

     public  function afterProcess(
         \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
         array  $jsLayout
     ) {
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
    ['shippingAddress']['children']['shipping-address-fieldset']['children']['street'] = [
        'component' => 'Magento_Ui/js/form/components/group',
        'label' => __('Street Address'),
        'required' => true,
        'dataScope' => 'shippingAddress.street',
        'provider' => 'checkoutProvider',
        'sortOrder' => 60,
        'type' => 'group',
        'children' => [
            [
                'component' => 'Magento_Ui/js/form/element/abstract',
                'config' => [
                    'customScope' => 'shippingAddress',
                    'template' => 'ui/form/field',
                    'elementTmpl' => 'ui/form/element/input'
                ],
                'dataScope' => '0',
                'provider' => 'checkoutProvider',
                'validation' => ['validate-jurgis' => true, 'validate-jurgis2' => true, 'validate-jurgis3' => true],
                'additionalClasses' => 'additional',
            ],
            [
                'component' => 'Magento_Ui/js/form/element/abstract',
                'config' => [
                    'customScope' => 'shippingAddress',
                    'template' => 'ui/form/field',
                    'elementTmpl' => 'ui/form/element/input'
                ],
                'dataScope' => '1',
                'provider' => 'checkoutProvider',
                'validation' => true,
            ],
            ]

        ];

         return $jsLayout;
     }
 }


texts:
We installed Redis cache on in our live server & it's working fine for us.
Website URL: https://ghanda.com/
Sometimes, we face some issues related to menu overlapping due to Redis cache. Is anyone know How we can find exact issue & solve it in Magento2 enterprice project.
Before applied solution: https://prnt.sc/yxbfvg
After applied solution: https://prnt.sc/yxbhya


texts: Magento 2 - Add shipping cost to mini cart

texts:
How can we display the shipping cost in the mini cart subtotal?
At the moment we only have the subtotal in the mini cart.
We tried a lot in the mini cart tax template;
/Magento_Tax/web/template/checkout/minicart/subtotal/totals.html

data-bind="html: cart().shippingAmount"
data-bind="html: cart()['shipping_amount']"

But we can not get the value, what are we missing here?


texts: Magento 2 | Add tier prices to filter advanced search

texts:
What I would like to do is filter the advanced search by requested quantity and price.
Example: I would like 1000 pcs with a price of $ 0.70 and lower per piece.
Is it possible to filter a similar search in Magento2? How can I do?
Thanks


texts: SQL Category Name Tree Query - no write access

texts: I need to query our Magento 1.9 installation for a list of category names with full parent/child paths - this is not the request path, I mean the full branch from the category name tree. I've seen a few solutions but they seem to rely on temp tables. I only have read access to our install at the moment. Anyone have an alternative? Thanks.


texts: Correct syntax to only output custom attribute if it exists else display default one

texts:
This works perfectly, displaying a dropdown of products to offer as a free gift, the label for each option takes the name of the product.

<select id="select_28" class="product-custom-option" title="" name="freeGiftId">
    <option value=""><?php echo $this->__('-- Please Select --')?></option>
    <?php foreach($freeGifts as $giftId): ?>
    <?php $productGift = Mage::getModel('catalog/product')->load($giftId); ?>
    <option value="<?php echo $productGift->getId()?>">
        <?php echo $productGift->getName()?> /*THIS IS THE LINE IN QUESTION */
    </option>
    <?php endforeach; ?>
</select>

I've created a custom attribute however that will be outputted instead of the name but only if it exists.

I'll use <?php echo $productGift->getXyz(); ?> instead of <?php echo $productGift->getName()?>. But I need to add an if statement so that it is only shown if it exists.

I'm trying this and many other variations:-

<select id="select_28" class="product-custom-option" title="" name="freeGiftId">
    <option value=""><?php echo $this->__('-- Please Select --')?></option>
    <?php foreach($freeGifts as $giftId): ?>
    <?php $productGift = Mage::getModel('catalog/product')->load($giftId); ?>
    <option value="<?php echo $productGift->getId()?>">
        <?php if ($productGift->getXyz()): ?> /*THIS IS THE LINE IN QUESTION */
            <?php echo $productGift->getXyz(); ?>
        <?php else: ?>
            <?php echo $productGift->getName()?>
    </option>
    <?php endforeach; ?>
</select>

This isn't working though. Please could someone advise on the correct syntax to use in order to show custom attribute 'Xyz' if it exists, otherwise show the product 'name'?


texts: What setIsSubscribed() function does when called on a Mage::getModel('customer/customer') object!

texts:
I am working on newsletter subscription bug. In this case the subscription status is always becoming not subscribed even when the customer chooses subscription. There are two cases.

Bug-1: When a customer creates account and opts or don't opt for subscription,  his/her status is coming not subscribed.

Bug-2: There is edit option for subscription but that is also not working, customers are not able to change subscription status. If they are old customers and their status is subscribed, it remains subscribed - even when they edit to unsubscribe.

What I dug is that Magento provides module for newsletter subscription, and data for subscription goes into the table newsletter_subscriber.For first scenario nothing is going into this table for newly created accounts. For second case after editing subscription status ManageController/saveAction of newsletter module is called which calls setIsSubscribed() function on Mage::getModel('customer/session') object.

But there is no definition of setIsSubscribed() function. That means magic function is called. I am trying to solve these bugs. So I gave definition of setIsSubscription() into local/namespace/customer/model/customer and was able to solve bug number 2. But for bug-1 please someone give some suggestions and also please suggest if I did right thing for bug-2.

Thanks for your valuable time.


texts: Order saving error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry for key 'UNQ_SALES_FLAT_ORDER_INCREMENT_ID'

texts:
No changes, updates, or upgrades of any sort in the last few months to the system, Magento 1.9.2.2

Order saving error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100084489' for key 'UNQ_SALES_FLAT_ORDER_INCREMENT_ID', query was: INSERT INTO sales_flat_order (coupon_code, protect_code, shipping_description, is_virtual, store_id, customer_id, base_discount_amount, base_grand_total, base_shipping_amount, base_shipping_tax_amount, base_subtotal, base_tax_amount, base_to_global_rate, base_to_order_rate, discount_amount, grand_total, shipping_amount, shipping_tax_amount, store_to_base_rate, store_to_order_rate, subtotal, tax_amount, total_qty_ordered, customer_is_guest, customer_note_notify, customer_group_id, gift_message_id, quote_id, base_shipping_discount_amount, base_subtotal_incl_tax, shipping_discount_amount, subtotal_incl_tax, weight, customer_dob, increment_id, applied_rule_ids, base_currency_code, customer_email, customer_firstname, customer_lastname, customer_middlename, customer_prefix, customer_suffix, customer_taxvat, discount_description, global_currency_code, order_currency_code, remote_ip, shipping_method, store_currency_code, store_name, x_forwarded_for, customer_note, created_at, updated_at, total_item_count, customer_gender, hidden_tax_amount, base_hidden_tax_amount, shipping_hidden_tax_amount, base_shipping_hidden_tax_amnt, shipping_incl_tax, base_shipping_incl_tax, auctaneapi_discounts) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '2018-12-19 16:55:40', '2018-12-19 16:55:40', ?, ?, ?, ?, ?, ?, ?, ?, ?)

Went to database to eav_entity_store, tried increasing order ID by 1, invoice ID, etc - multiple times - no luck. Any other ideas?


texts: thumbs image not appearing at main image after selection magento in mobile web

texts: I am using 1.9.2 magento version for my store. In my product page there are 3 images, 1 image as main Image and others are alternate(thumgs) images from different angle. Whenever I select the Alternate image to view as main image from Mobile web the main image wont change. I am new to it so i am sure where to look at it. It just works fine for Desktop Browsers. Attaching image for refernce


texts: Need to Index a Magento 1.9 table with Algolia search

texts:
I've got a magento extension that is a custom blog ( Amasty ) .  It doesn't use attributes of any kind to index the posts , but it's own custom table - blog_posts.

I'm not sure what is the best angel to take with this.  If I could create an index of attributes that indexed the table? ( doesn't sound like a good idea )

I found a few posts about customising the extension

https://community.algolia.com/magento/doc/m1/customize-extension/
https://community.algolia.com/magento/doc/m1/indexing/

But I don't think they touch on what I need.

Thanks or your time.


texts:
I am trying to point a php SoapClient at htp://.../api/?wdsl and when I call login, I get:

"PHP Fatal error:  Uncaught SoapFault exception: [Sender] DTD are not supported by SOAP in ..."

I have tried adding options to the SoapClient constructor but nothing works.  Any ideas?


texts: Is there a way to pass a coupon code as a URL parameter?

texts:
I would like to create URLs which activate a specific coupon.  It could be as simple as passing the coupon code as a URL parameter.   When a coupon is passed, I'd like it to automatically be populated at time of checkout.

Is there a way to capture a coupon parameter into the session to automatically be applied to the cart?


texts: Magento 2: Before Place Order Give Error Message

texts:
I need to put my custom validation before place order.

magento\app\code\Custom\Module\etc\events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_place_before">
        <observer name="check_price" instance="Custom\Module\Observer\BeforePlaceOrderObserver" />
    </event>
</config>

magento\app\code\Custom\Module\Observer\BeforePlaceOrderObserver.php

namespace Custom\Module\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\ObjectManager;

class BeforePlaceOrderObserver implements ObserverInterface {

    public function execute(Observer $observer) {
        die("Error Message");
        exit;
    }
}

It still places order. Need to used $this->_messageManager->addError(__('Error'))


texts: Set CopyTo for confimation email by ordered products in Magento 2.4

texts:
im searching for a solution to send the confirmation email to an other email as specified at "sales_email/order/copy_to" based ob product sku range.
For example when sku of all products is in the range 7000 -> 7999 the confirmation should be send to email xxx@yy.com.
When not all products are in the sku range the confirmation mail should be send to yyy@xx.com
In \vendor\magento\module-sales\Model\Order\Email\SenderBuilder.php is the function sendCopyTo which gets the mails from config. Do i need to overwrite the whole class SenderBuilder? or is it possible to set the emails by an before Plugin? Not realy want to override the class because of issues with new versions.
And when override how i can get the ordered items in that class?
Would be nice if someone give me a hint on what is the best method to archive my goal.
thanks forward


texts:
I'm working on Magento CE verison  1.7.0.2 and found a very strange bug. In a static block there are some static images linked, but i can't see any anchor tag.

Instead, using phpmyadmin, i can see those and  was able to change it!
Any idea what is going wrong?


texts: How to skip any category in seo meta title template?

texts:
We have magento 2 on website we have 4 categories, we sell photocopier parts, let me give an example what issue we are facing and what we want.

Konica Minolta - Bizhub Color Series- Bizhub 203 - Toner Cartridges

Category 1 - Category 2 - Category 3 - Category 4

We have magewrox seo suit installed on website , we made a template for meta titles when we call categories in this template the meta title goes like this

"Konica Minolta Bizhub Color Series Bizhub 203 Toner Cartridges"

We want to skip series category in seo templates , but when we change the sequence like Category 1 - Category 3 - Category 4 on different pages and stages it catches the sequence at current stage of ccategory breadcrumbs and does not skip. We want to show this category to customers but want to hide and skip it in meta titles. We talked with magewrox they said that it is not possible in their extension. Do we have any customization in which we can show category on front end but it should be hidden in seo templates. Like on any page when we call category 2 in any template it should not consider the series category it should consider next one as category 2. Hope it make sense if you dont understand I will try to elaborate it more


texts:
I'm trying to get oauth access token for a third party application, following documentation here.
However, I always end up with a 404 error. I tried with different clients (python and postman), with different signature methods (HMAC and PLAINTEXT). I also tried to put the oauth_callback as a request param (against offical doc, but I saw that in another tutorial) but it didn't help either. I'm attaching a screenshot displaying the python script used and the output showing the correctly constructed Authorization header (I'm not sure if I should put the /index.php in the BASE_URL so I tried both). Also, I (obviously) anonymized the key and secret after execution.

I've been struggling with this for a few days now, any help will be really appreciated.

Thank you.


texts: magento 2 tables not created in the database using installerschema

texts:
The module is correctly enabled and it shows in the setup_module - and i can see him on front end with the route. But tables is not created in the database. I don't no whats wrong in it.

My installerschema.php:

<?php
namespace Inchoo\Helloworld\Setup;
use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

class InstallSchema implements InstallSchemaInterface {

    public function install( SchemaSetupInterface $setup, ModuleContextInterface $context ) {
        $installer = $setup;

        $installer->startSetup();

        /**
         * Create table 'posts'
         */
        $table = $installer->getConnection()->newTable(
            $installer->getTable( 'inchoo_blog_posts' )
        )->addColumn(
            'post_id',
            Table::TYPE_SMALLINT,
            null,
            [ 'identity' => true, 'nullable' => false, 'primary' => true ],
            'Post ID'
        )->addColumn(
            'title',
            Table::TYPE_TEXT,
            255,
            [ 'nullable' => false ],
            'Post Title'
        )->addColumn(
            'content',
            Table::TYPE_TEXT,
            '2M',
            [ ],
            'Post Content'
        )->setComment(
            'Blog Post Table'
        );

        $installer->getConnection()->createTable( $table );

        $installer->endSetup();
    }
}

Please help me.


texts:
I am new to Magento and just learning.  Tried something and got stuck.

I have a footer.phtml and it has a few links.  One link is "Terms & Conditions" and I have a page called terms.phtml

When someone click "terms and conditions"  want to load the page terms.phtml in the "contents" block.

In the local.xml file I add this

<reference name="content">
    <block type="core/template"  name="terms" as="terms" template="page/html/terms.phtml" />
</reference>

</default>

But it is not working.  Please help me

1) what should I give in the a href for terms and conditions

Terms & Conditions

2) What should I write in the local.xml

3) how to call the block in href to load the Contents


texts:
I have Need to run some script after logged in admin user in magento 2.

But, Its not calling for me.

What i did:

I have created js file this location.

app/code/Vendor/Module/view/adminhtml/web/js/seo_field.js

seo_field.js

   define([
        "jquery"
    ], function($){

        console.log('user logged  in');
    });

Then create my Observer:

app/code/Vendor/Module/Observer/BackendAuthUserLoginSuccess.php

BackendAuthUserLoginSuccess.php

    <?php

    namespace Vendor\Module\Observer;

    use Magento\Framework\Event\ObserverInterface;

    class BackendAuthUserLoginSuccess implements ObserverInterface
    {

        protected $logger;

        protected $_request;

        protected $authSession;

        public function __construct(
            \Psr\Log\LoggerInterface $logger,
            \Magento\Framework\App\RequestInterface $request,
            \Magento\Backend\Model\Auth\Session $authSession

        )
        {
            $this->logger = $logger;
            $this->_request = $request;
            $this->authSession = $authSession;

        }

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

            if ($this->authSession->getUser()->getAclRole() == 4) { ?>

                <script type="text/x-magento-init">
                    {
                        "*": {
                            "Vendor_Module/js/seo_field":{}
                        }
                    }

                </script>
                <?php $this->logger->addDebug($this->authSession->getUser()->getEmail());
            }
        }
    }

After Called this Observer, its does not call this x-magento-init

Suggest me, What's problem in this code and how to fix this.


texts:
After recently moving my site, specific users are unable to log in after a password reset. This only happens for specific users and the password does actually reset in the database. Regardless of which way I reset the password, I cannot log in with the new password given. The steps I took:

Initiated a password reset through the admin panel / or the user initiated password reset function.
Reset the password
Checked the database and the password hash had changed to the correct password hash using MD5($salt.$pass)
I try to log in and get the invalid username or password message.

The odd thing is that it is only specific accounts that are having this issue, so I possibly thought that it could be to do with a account flag somewhere that is blocking the account.

I would be happy with any input at all as I'm stumped to why it would be specific accounts. If someone could also possibly tell me where the login functions reside, then I an try using Mage::log to find the issue throughout the code.


texts: Configurable/virtual product not showing up on website

texts:
I created a class (with a date) as a configurable product for my site. Even when I gave it all the right attributes, making sure it had correct inventory and such, it said it was out of stock. I figured I need to create a virtual product with all the same information and add the date (as a catalog attribute) and a different SKU to resolve it, as it has in the past, but it's not. It still says out of stock, so am I missing something?

Here are the settings I changed from the default settings for both products:

Name, description, short description
SKU (unique)
Status (enabled)
URL Key (same)
Visibility (catalog, search)
Price, no tax
Quantity
Stock Availability (in stock)
Category
Custom option (drop-down menu)

Is there a step I missed or a feature I haven't enabled? Are my configurable and virtual products not merging correctly, if at all? How do I get my product to show as in-stock and have a date be an option for purchase?

Thanks in advance.


texts: Adding custom field in prices tab in backend

texts:
I want to create a custom field called Price1. I tried this code.

$fieldset->addField('Price1','text', array(
                'name'=>'Price1',
                'class'=>$attribute->getIsRequired()?'required-entry':'',
                'lable'=>Mage::helper('catalog')->_('Price1'),
                'title'=>Mage::helper('catalog')->_('Price1'),
                ));

And I got this error.

Fatal error: Call to a member function getIsRequired() on a non-object in C:\wamp\www\multiplecurrencies\app\code\core\Mage\Adminhtml\Block\Catalog\Product\Edit\Tab\Attributes.php on line 71

What am I missing?


texts: Estimate Shipping On Cart Display Including Tax In Magento 2?

texts:
I was wondering if anybody knows how to show the "Estimate Shipping" on the /checkout/cart page including tax?

I don't believe this can be achieved with a configuration setting and was wondering if anybody else has come across this problem and found a solution?


texts:
Can any one help me to edit the email template design in magento2
Please find the screen shots below.

by default iam getting email like this  below screenshot

i want to modify the like below screenshot

png


texts: Magento 2.2 any issue will arise if we truncate import export history?

texts:
If I truncate import_history table from database in Magento 2.2 version.

But thing is that some of the values in execution_time column it's showing as In Progress which seems to that product import is still running on in the backend.

I checked the code in the magento-import-export module and magento-indexer but not found any thing.

Anyone has faced this kind of issues?


texts: Add an additional field for Upfront Fee under Subtotal

texts:
I want to add an additional field (in Magento's built-in cash-on-delivery method) for Upfront Fee right below the Subtotal. This Upfront Fee would be displayed OR calculated ONLY when the subtotal is greater than $250. If the subtotal is greater than $250 this Upfront Fee will get calculated as 20% of whatever the Subtotal amount is i.e >$250

How can i do this>?
Do i need a module or what?

It is one minute game in PHP we just have fetch value,define condition and echo the result but i have no clue about how to do this in Magento.


texts: Admin tab content that has grid table but also other blocks. How to?

texts:
I need to create custom tab on admin customer edit page, that has grid table(with search, filters, sortings etc) and also another blocks (template block and custom form). Here is part of layout xml for this tab

 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
 <container name="root" label="Root">
   <block class="VendorName\ModuleName\Block\Adminhtml\Edit\Customer\Tab\View\SomeBlock" name="someblock1" template="VendorName_ModuleName::customer/tab/mytemplate.phtml" />
   <block class="VendorName\ModuleName\Block\Adminhtml\Edit\Customer\Tab\View\MyForm" name="someblock2" />
   <block class="Magento\Backend\Block\Widget\Grid" name="customer.transaction.edit.tab">
        <arguments>
            <argument name="dataSource" xsi:type="object">VendorName\ModuleName\Model\ResourceModel\CustomModel\Collection\Grid</argument>
            <argument name="id" xsi:type="string">Grid</argument>
            <argument name="use_ajax" xsi:type="string">true</argument>
            <argument name="grid_url" xsi:type="url" path="*/*/path-to-this-tab">
                <param name="_current">1</param>
            </argument>
        </arguments>
        <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="customer.edit.tab.columnSet">
.
.
.

So here you see I have two blocks and grid description. It works until you try to interact with grid (sort columns, search etc) because grid uses grid_url argument for ajax requests so it loads whole layout again what causes duplication of other blocks(template and custom form).

Then I created separate layout xml and controller for grid and specify its path in grid_url(in both layouts) This way it works good, but now I have the same piece of xml code to determine the grid that repeats twice in two layouts, which is not good, but I don't know how to solve this problem another way. Maybe you can suggest better solution. Thank you


texts:
[Magento 1]

I want to show prices on checkout inclusive of GST (Indian). Currently, it's adding the tax separately on checkout page resulting in increase final price. We would like to configure it in the way that CGST & SGST are bifurcated & displayed, but are not added separately.

Ex. If the price on the product is Rs.1000 & GST amount is 18%, it should show like this on checkout:

Price: Rs.1000

CGST (9%): Rs.90

SGST (9%): Rs.90

Total: Rs.1000

which means the cart shouldn't add the GST separately but it should be inclusive in the final price. Same should appear on email invoices as well. How can I do it?

Also, this shouldn't affect the price on the product page because prices entered by me would be inclusive of all taxes.


texts:
I'm using Magento's default sales emails.

I've inserted my logo as logo_email.gif in all themes

found > skin/frontend/theme/images,

uploaded in backend Configuration > Design > Transactional Emails,

cleared cache in backend and > var/cache. Yet, it still shows Magento's logo.


texts: OpCache - Recommended Configuration for Magento2

texts:
I'm working with a Magento 2 stack, I'm reusing some of my Magento 1 OpCache configuration. I've already learned that now we need to enable comments but I'm pretty sure that other values can be improved, so here is my current configuration:

[opcache]
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=256
opcache.interned_strings_buffer=12
opcache.max_accelerated_files=65406 // thanks Mage2.Pro!
;opcache.max_wasted_percentage=5
;opcache.use_cwd=1
opcache.validate_timestamps=0
;opcache.revalidate_freq=2
;opcache.revalidate_path=0
;opcache.save_comments=0
;opcache.load_comments=0
opcache.fast_shutdown=1
opcache.enable_file_override=1
;opcache.optimization_level=0xffffffff
;opcache.inherited_hack=1
;opcache.dups_fix=0
;opcache.blacklist_filename=
;opcache.max_file_size=0
;opcache.consistency_checks=0
;opcache.force_restart_timeout=180
opcache.error_log=/var/log/php5/php5-opcache.error.log
opcache.log_verbosity_level=3
;opcache.preferred_memory_model=
;opcache.protect_memory=0

NOTE:
I will edit the configuration block in the question (while opened) with all good answers in order to make it useful for everyone, and avoid repeated suggestions too, if there is any problem about that or represents a violation to the site rules, just let me know.


texts:
So I just started to manage, not really develop, a Magento 1.9 for a new employer. With my previous employer we made certain anyone creating new products, via duplicating existing, wiped out the url key field as to not create duplicate keys. this company has not done that so the url rewrites are about 500 points above the product id value in the url path and growing with each reindex. So i figure the core_url_rewrite table must be huge.... but the core_url_rewrite table is not even in the database..

So where would it be writing them to? Is there another place to look? Did a patch delete the table?

System>Config>Web>SEO>Use Web Server Rewrites is set to yes

Please advise and thanks for the help and guidance

ps. I don't understand shell scripts via ssh yet so that is not gonna happen ;-)


texts:
when contact us page submit but email not received but messages display

Thanks for contacting us with your comments and questions. We'll respond to you very soon.

in debug.log I get this error.

main.CRITICAL: Unable to send mail: Unknown error {"exception":"[object] (Magento\\Framework\\Exception\\MailException(code: 0): Unable to send mail: Unknown error at /public_html/vendor/magento/module-email/Model/Transport.php:104, Zend\\Mail\\Transport\\Exception\\RuntimeException(code: 0): Unable to send mail: Unknown error at /public_html/vendor/zendframework/zend-mail/src/Transport/Sendmail.php:305)"} []

in exception.log I get this error.

main.CRITICAL: Invalid header value detected {"exception":"[object] (Magento\\Framework\\Exception\\MailException(code: 0): Invalid header value detected at /public_html/vendor/magento/module-email/Model/Transport.php:104, Zend\\Mail\\Header\\Exception\\RuntimeException(code: 0): Invalid header value detected at /public_html/vendor/zendframework/zend-mail/src/Header/HeaderValue.php:112)"} []


texts: Magento 2.4.1: Image in the Magento admin category editor doesn't appear in the site's category page

texts: Recently upgraded to Magento 2.4.1. The image in the Magento admin category editor doesn't appear in the site's category page. Also, some text that appears in the sites category description doesn't show up in the category editor. Is there any sitting in Magento admin controlling the display of the image for the category page? Below is the image as seen in the Admin, which doesn't appear on the live site in the category page.


texts: Install the magento 2.2.5 and no products or examples

texts:
I just installed magento 2.2.5 but to my surprise I have no products example, an empty homepage and nothing to test effectively is this normal?

On the home page I have "CMS homepage content goes here."
thank you in advance


texts:
In a multistore setup one of the installed themes is conflicting with the other themes.

The -conflicting- theme itself works perfectly, yet the product pages in the other stores (with different themes) are not displaying anymore and they generate the following error:

2014-12-05T19:42:25+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Anowave_One_Block_Product' in /var/www/magento.live/htdocs/app/Mage.php:595
Stack trace:
#0 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('catalog/product...', Array)
#2 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('catalog/product...', 'product.info')
#3 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('catalog/product...', 'product.info')
#4 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /var/www/magento.live/htdocs/app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /var/www/magento.live/htdocs/app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(Mage_Catalog_Model_Product), Object(Mage_Catalog_ProductController))
#9 /var/www/magento.live/htdocs/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(179, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#10 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#11 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#12 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /var/www/magento.live/htdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /var/www/magento.live/htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /var/www/magento.live/htdocs/index.php(90): Mage::run('launchportshop_...', 'store')
#16 {main}

This theme comes with an extension that pours some special sauce, and I did find the following in the modules /app/code/local/Anowave/One/etc/local.xml:

    <blocks>
        <one>
            <class>Anowave_One_Block</class>
        </one>
        <core>
            <rewrite>
                <html_select>Anowave_One_Block_Core_Html_Select</html_select>
            </rewrite>
        </core>
        <catalog>
            <rewrite>
                <product_view>Anowave_One_Block_Product</product_view>
                <product_price>Anowave_One_Block_Product_Price</product_price>
            </rewrite>
        </catalog>
    </blocks>

I'm pretty sure that this is the cause of the problem. However, the big question is: How do I rewrite this so that the stores using this (anowave) theme keep working and the others start working again....


texts:
someone knows why, if I look at the HTML code of one page from my Magento website, I see the Translator var two times, with the same values?

First time:

<script type="text/javascript">//<![CDATA[
        var Translator = new Translate({"HTML tags are not allowed":"...

Second time:

<script type="text/javascript">
//<![CDATA[
optionalZipCountries = ["IE","PA","HK","MO"];
//]]>
</script>
<script type="text/javascript">//<![CDATA[
        var Translator = new Translate({"HTML tags are not allowed":"...


texts: issue in block rendering and product review post action rewriting

texts:
I am creating captcha for product review form. For that I have faced two problem.

First I tried to rewrite post action url, using this code in config.xml.

<rewrite>
            <namespace_module>
                <from><![CDATA[#^/review/product/post/#]]></from>
                <to>/module/review/post/</to>
            </namespace_module>
</rewrite>

this code is not working. when I submit form it redirect me to homepage.

Second issue is that, I am trying to add block on just above submit button using this code.

in base/default/layout/namespace_module.xml

<review_product_list>
        <block name="product.review.form" >
            <block type="core/template" name="custom_block" template="namespace/module/form.phtml"/>
        </block>
</review_product_list>

in base/default/template/review/form.phtml

echo $this->getChildHtml('custom_block');

This code is also not working.
Do you have idea what I am missing?


texts: Magento 2 + Varnish + Nginx + SSL get real IP

texts:
I'm having a setup for Magento 2 with Nginx + Varnish + SSL in ubuntu server 18.04. Now with my setup, I only get all logs in Nginx and inside Magento admin coming from same localhost IP which Varnish listens.

I want to change that.

What the best way to do it?
Using Nginx and

  ngx_http_realip_module

Or reconfigure Varnish with a GeoIP module I found here:
Varnish GeoIP

For option one will this add in my Nginx conf file work?

server {
    listen 8082;
    set_real_ip_from   127.0.0.1;
    real_ip_header     X-Forwarded-For;
    <Other Server Options>
}

Do I need to change something in Magento

  Nginx.conf

file?


texts: Magento2 : How to add a new product custom option type?

texts:
Two years ago, I developed under Magento 1.9 a module aiming at adding a new product custom option input type using this tutorial :

http://magento.ikantam.com/qa/custom-input-types-custom-options

I would like now to do the same under Magento 2.1, but as I am just starting developing under Magento 2, I did not manage...

I saw the method to add a product type was to write a product_types.xml file declaring the new type. Is it possible to do the same way, i.e. creating a product_option_types.xml or something like?

Could you please help me on this custom option input type xml declaration?

Thanks for your help,

EDIT :

I started the module using other module examples :

Mine/Custoptiontype/etc/module.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Mine_Custoptiontype" setup_version="2.0.0">
        <sequence>
            <module name="Magento_Catalog"/>
        </sequence>
    </module>
</config>

Mine/Custoptiontype/etc/product_types.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_options.xsd">
    <option name="xfile" label="X File" renderer="Mine\Custoptiontype\Block\Adminhtml\Product\Edit\Tab\Options\Type\Xfile">
        <inputType name="xfile" label="X File" />
    </option>
</config>

Mine\Custoptiontype\Block\Adminhtml\Product\Edit\Tab\Options\Type\Xfile.php

<?php
namespace Mine\Custoptiontype\Block\Adminhtml\Product\Edit\Tab\Options\Type;

class Xfile extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\AbstractType
{
    /**
     * @var string
     */
    protected $_template = 'catalog/product/edit/options/type/xfile.phtml';
}

I then installed the module.
My new option type is present in the backend under product, but when I select it, the file.phtml is not displayed...


texts: How to show validation or disable checkout until the phone number get verified with otp in magento 2?

texts:
I am verifying the phone number through OTP in Magento 2 one page checkout. when the user clicks the place order button before the phone number gets verified, I need to show a validation message to verify the phone number.

I have created the OTP verification module for the phone number based on the below link:
How to add custom button under the phone number field in one page checkout in Magento 2?


texts: "To" date issue when fetching order collection in custom model

texts:
I have the following custom model:

class CompanyName_Orders_Model_FetchOrderInfo extends Mage_Core_Model_Abstract {
private function createDate($lookBeforeDateInDays = null){
    if(($lookBeforeDateInDays===null) || (!is_int($lookBeforeDateInDays))){
        // 'No date or invalid date supplied.
        return $lookBeforeDateInDays=date(now());
    }else{
        $varToTime = strtotime("-".$lookBeforeDateInDays." day");
        return $lookBeforeDateInDays=date("Y-m-d 00:00:00",$varToTime);
    }

}
public function unpaid($lookBackInDays = null) {
    echo $lookBeforeDateInDays=$this->createDate($lookBackInDays);
    echo '
';
    /*
     * Get Orders where not cancelled or complete and have not captured any funds.
     */
    $missingOrders = Mage::getModel('sales/order')->getCollection()
            ->addFieldToFilter('status', array('nin' => array('canceled','complete')))
            ->addAttributeToFilter('base_total_paid', array('null'=>true))
            ->addAttributeToFilter('created_at',array('to'=>$lookBeforeDateInDays));
    echo $missingOrders->count().'
';
    echo $missingOrders->getSelect();
    return true;
}
}

Please excuse the bonus "echo's" in the model - they're for debugging.

I am attempting to replicated the same results as you'd see in Sales > Orders when Filter = Processing and Purchased On (To) = [date]. The createDate function take a numerical input, converts X days ago using strtotime or sets the date to now if no input is provided.

My Problem

The date is outputting correctly, but where $missingOrders->count() should be, lets say, 53 - it may be 35.

I've verified that it isn't because of the "status" filter so that leads me to believe that my server time differs from Magento's time. How can I sync the two so that the results line up? And, since this is in a model, shouldn't the timezone match up anyway?


texts: i have a put validation on telephone field like phone no format should valid for chile phone no format

texts:
I have overide file in my theme
vendor/magento/module-ui/view/base/web/js/lib/validation/rules.js
I have try to below code but not working checkout page.
'phoneCL': [
function (value) {
return utils.isEmpty(value) || value.length > 9 &&
value.match(/^((?(0|+55)[1-9]{1}\d{1,4}?)?\s?\d{3,4}\s?\d{3,4})$/);
},
$.mage.__('Please specify a valid phone number')
]


texts:
Whenever I tried to add product to cart from list page or product page in fresh setup Magento Ce 2.1 release it redirects to checkout page and no product gets added.

I tried disabling cache also.


texts: Magento 1.8.1 - Customer grid date display bug

texts:
I'm having a problem with the signup date display in customer grid: when a customer signs up the date is wrongly entered in the database, our date format is yyyy-mm-dd, but when the day is before the 12th of the month, it switches to yyyy-dd-mm, resulting in a wrong display in customer grid.
For example, if a customer signs up on 2014-08-11, it'll be displayed as 2014-11-08, but if it's 2014-08-13 it's fine.
Seems like it's a native bug since we didn't touch the customer model, did anyone encountered that issue?
Thanks


texts: Magento 2 - how to upload an image from admin CRUD

texts:
I'm new to Magento, created a simple CRUD module, which have a name, description and logo columns, Name and description are saving to the DB without any problems, but I need help on how to upload an image.
Here is my whole module file structure, and code of Save controller,
Thanks everyone for helping me!

<?php
namespace Elogic\Vendors\Controller\Adminhtml\Vendors;

use Magento\Backend\App\Action;

class Save extends Action
{
    /**
     * @var \Elogic\Vendors\Model\Vendors
     */
    protected $_model;

    /**
     * @param Action\Context $context
     * @param \Elogic\Vendors\Model\Vendors $model
     */
    public function __construct(
        Action\Context $context,
        \Elogic\Vendors\Model\Vendors $model
    ) {
        parent::__construct($context);
        $this->_model = $model;
    }

    /**
     * {@inheritdoc}
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Elogic_Vendors::vendors_save');
    }

    /**
     * Save action
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        $data = $this->getRequest()->getPostValue();
        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultRedirectFactory->create();
        if ($data) {
            /** @var \Elogic\Vendors\Model\Vendors $model */
            $model = $this->_model;

            $id = $this->getRequest()->getParam('id');
            if ($id) {
                $model->load($id);
            }

            $model->setData($data);

            $this->_eventManager->dispatch(
                'vendors_vendors_prepare_save',
                ['vendors' => $model, 'request' => $this->getRequest()]
            );
            try {
                $model->save();
                $this->messageManager->addSuccess(__('Vendor saved'));
                $this->_getSession()->setFormData(false);
                if ($this->getRequest()->getParam('back')) {
                    return $resultRedirect->setPath('*/*/edit', ['id' => $model->getId(), '_current' => true]);
                }
                return $resultRedirect->setPath('*/*/');
            } catch (\Magento\Framework\Exception\LocalizedException $e) {
                $this->messageManager->addError($e->getMessage());
            } catch (\RuntimeException $e) {
                $this->messageManager->addError($e->getMessage());
            } catch (\Exception $e) {
                $this->messageManager->addException($e, __('Something went wrong while saving vendor'));
            }

            $this->_getSession()->setFormData($data);
            return $resultRedirect->setPath('*/*/edit', ['entity_id' => $this->getRequest()->getParam('id')]);
        }
        return $resultRedirect->setPath('*/*/');
    }
}


texts: How to close a purchase for specific customers in Magento 2?

texts: Is it possible to close a purchase for a specific customer when the value of his user attribute is suspended, but he can login the site. I need to close only the purchase for this customer.


texts: Magento 2 Migration Tool Integrity constraint violation

texts:
I'm getting the following error using the Magento 2 Migration Tool 2.3.0 during the Map Step:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '0--0--0.0000-0.0000-0-' for key
  'UNQ_D2BA9F275EE0D3F3C26A1EC39FD4924D'

I have searched on Google for this error but cannot find anything similar. How can I find where this is coming from?


texts: How do I add additional options to customer gender?

texts:
I have a client who would like to add the option 'Transgender' in addition to Male and Female in the gender field.

Can I do this directly in the database? Would I need to update anything beyond the following tables:

eav_attribute_option
eav_attribute_option_value

I'm on CE 1.7

Thanks


texts:
You are working on a Magento store which will be selling in two countries. Each country has its own set of payment methods.
How do you organize the project to support this requirement?
A. Create one website, two payment scopes
B. Create one website, one store view
C. Create one website, two store views
D. Create two websites, two store views
Can anyone answer this


texts: Magento 2 Possible to make Stock Status working for storeviews?

texts:
In Magento, Stock Status is global, so when a product is Out-Of-Stock, then it's disabled for all websites / storeviews.

Are there anyways to make Stock Status working on storeview level? I have bought the Advanced Inventory module from Wyomind, but it only allows you to created different warehouses for different storeviews. And when a warehouse having 0 on the stock, it won't disable the product for that website the warehouse is associated with.

Can I make my own module to have Stock Status working on storeviews? or are there extensions available for this?


texts:
I want to set license to my own extensions, mean that want to sell my extensions per domain license like https://landofcoder.com/ modules.
what should i do?


texts:
I'm getting hit with carding attacks on my website. I've enabled AVS options like so in Paypal.

This doesn't seem to be doing enough to stop the attacks.

Paypal threatens to shut off my account, what can I do to stop carding attacks? They recommend a Captcha on the checkout form but I haven't found a good quick solution to that if someone can recommend. Has anyone had this happen to their site?


texts: is there a overview for the new form validation attributes in Magento 2?


texts: Allow user to chose amount of bundled products

texts:
I am trying to achieve the following scenario and looking for a solution:

E-cigarette device is: £20.00 + 1 bottle of e-liquid or £25.00 + 4 bottles of e-liquid. The e-liquids are configurable (strength).

Can I use bundled product for that? Or I need to create 2 bundles?

Any suggestions how I can achieve the above?


texts: Mage::getModel('customer/address') broke the system

texts:
I was developing a custom shipping module using

  Mage::getModel('customer/address')->getCollection()->setCustomerFilter($sellerIDVar)

Using this code broke the page or module. Could you please anybody find the problem ?

I'm using Magento 1.9.4.1

EDIT

I wanted the default billing or default shipping address set of the customer. So when i get the collection with entity_type_id filtered, theres no address !!!

And when i use the Load method, i get all addresses of the customer. So im in trouble with both methods.

helps solicited dears.


texts: magento 2 category and subcategory name for single category

texts:
I am trying to fetch current subcategory name of specific parent  category which id is  5 for example my category is Brand and subcategory is Brand1/Brand2/brand3 so i want fetch current subcategory category on product page .

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
          $current_category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
          $parent_category = $current_category->getParentCategory();
          echo $current_category->getName();
          echo $parent_category->getName(); ?>


texts: remove ordernumber -1 suffix on ordernumber when admin changes order

texts:
When you get an order in Magento and the calls you to add an extra item to the order, you need to change the order, but Magento creates a new ordernumber for this order.

For example the order number was #1000001 and after the admin changes the order the new order number is #1000001-1. This is not really consistent and when exporting the orders I'm not able to read this because of our connection with the accountancy software.

Is it possible for magento to increment the order by the latest available order number? So in this particular case after editing the order, the order number changes to #1000002 of even better, the order number keeps #1000001.


texts:
I'm exporting grid and I want to customise it.
I have a boolean field say status that displays Active/Inactive as shown in below image.

How do I export this column with value Active/Inactive ?
In database I set it to 1/0 (tinyint)
NOTE: Also I don't want to add new hidden column with Active/Inactive value


texts: Magento 2 : How to add a product grid in custom module using ui component?

texts:
I have added product grid in Magento 2 admin form using this link:
product grid.
But now I am creating admin form using ui component and I am not able to change product grid using ui component. Please help me.

  view/adminhtml/layout/productlabel_productlabel_edit.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <uiComponent name="productlabel_form"/>
        </referenceContainer>
    </body>
</page>

  view/adminhtml/ui_component/productlabel_form.xml

<fieldset name="assign_products">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Products in Category</item>
            <item name="collapsible" xsi:type="boolean">true</item>
            <item name="sortOrder" xsi:type="number">40</item>
        </item>
    </argument>
    <container name="assign_products_container" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">160</item>
            </item>
        </argument>
        <htmlContent name="html_content">
            <argument name="block" xsi:type="object">Magento\Catalog\Block\Adminhtml\Category\AssignProducts</argument>
        </htmlContent>
    </container>
</fieldset>

Please Help!


texts: Assigning a role from edit a specific category-tree of catalog

texts: I need to assign a role to edit a specific separate category in the catalog. I was hoping that "Roles Resources" have the opportunity to select from category-tree of the catalog. But didn't find such opportunities. How can it be done? Thanks!


texts: How can i remove default rate in shipping method

texts:
I am created free shipping products configuration, Using by

https://www.youtube.com/watch?v=sNAm2KiYkwo

And result Look like,

How can i remove default ship by weight column.


texts:
i'm trying to read the attribute set id from a product on a custom page.
So if the article belongs to attribute set named "Hose" i want to get the custom attribute gtabelle_hose. if the article belongs to the attribute set named "Rock" the custom attribute "gtabelle_rock".

At this time i'm using this code

$product = Mage::getModel('catalog/product')->load(16);

$eavConfig = Mage::getModel('eav/config');
/* @var $eavConfig Mage_Eav_Model_Config */

$attributes = $eavConfig->getEntityAttributeCodes(
    Mage_Catalog_Model_Product::ENTITY,
    $product
);

but all of my attribute sets are in the array $attributes.

Thanks for your help.


texts:
We are currently in the process of redoing our main store front. I have set up a development server which currently replicates our production server. We would like to use the development server to re-theme the site, as well as do a major recategorization of our products. Then, on D-Day, the plan will be to migrate the changes (theme + categories) to the production site but obviously maintaining sales / customer data.

Any recommendations on how to do this? I don't mind scripting something, but would be more than happy to use an existing module.

I'm new to Magento but am familiar with PHP / MySQL / rsync etc.

Thanks


texts:
I have a Magento 2 website which has been set up to allow customers to have their own pricing. However, as a result of this the FPC (for category and product pages) is now being generated uniquely for each user.
To get round this, I want to load the price via Knockout JS so that the FPC can be shared across all logged in users, yet the pricing will be loaded dynamically depending on what pricing system that user has been assigned.
I started off by following this article: https://magently.com/blog/full-page-cache-hole-punching-in-magento-2/
I have been able to successfully configure the Knockout JS to render the 'timestamp' (from the above tutorial) on a category page and I have tested that the FPC is being shared across all logged-in users.
However, the problem I am now having is that I need to pass the product ID to the block, from the knockoutjs component so that I can use the class to return the correct price for that product. I have looked through various articles, questions on here etc. but can't seem to find an answer to this.
Here is the code:
Vendor/Module/CustomerData/CustomerPricing.php
<?php
namespace Vendor\Module\CustomerData;

use Magento\Customer\CustomerData\SectionSourceInterface;

class CustomerPricing implements SectionSourceInterface
{
    public function getSectionData()
    {
    return ['price' => 'XX.XX'];
    }
}

/Vendor/Module/etc/frontend/di.xml
<type name="Magento\Customer\CustomerData\SectionPoolInterface">
    <arguments>
        <argument name="sectionSourceMap" xsi:type="array">
            <item name="custom-price" xsi:type="string">
                Vendor\Module\CustomerData\CustomerPricing
            </item>
        </argument>
    </arguments>
</type>

Vendor/Module/view/frontend/js/customer-pricing.js
define([
  'uiComponent',
  'Magento_Customer/js/customer-data'
], function (Component, customerData) {
  return Component.extend({
    initialize: function (config) {
      this._super();
      this.privateVariable = customerData.get('custom-price');
      console.log("ProductID =",config.product_id);
    }
  });
});

Vendor/Module/view/frontend/templates/product/list.phtml

    <?= __('£') ?>
    <?= __("Loading...") ?>


texts: Magento 2. change customer custom attribute value from plugin

texts:
Here first question of mine.
Now i added custom attribute to my customer following this code

InstallData.php

<?php

namespace Kt\AddBonus\Setup;

 use Magento\Customer\Model\Customer;
 use Magento\Customer\Model\Customer;
 use Magento\Customer\Setup\CustomerSetupFactory;
 use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
 use Magento\Framework\Setup\InstallDataInterface;
 use Magento\Customer\Model\Customer;
 use Magento\Framework\Setup\ModuleContextInterface;
 use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{

const BONUS_ATTRIBUTE_CODE = 'customer_bonus';

/**
 * @var CustomerSetupFactory
 */
private $customerSetupFactory;
/**
 * @var AttributeSetFactory
 */
private $attributeSetFactory;

public function __construct(CustomerSetupFactory $customerSetupFactory,
                            AttributeSetFactory $attributeSetFactory)
{

    $this->customerSetupFactory = $customerSetupFactory;
    $this->attributeSetFactory = $attributeSetFactory;
}

/**
 * Installs data for a module
 *
 * @param ModuleDataSetupInterface $setup
 * @param ModuleContextInterface $context
 * @return void
 */
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $setup->startSetup();

    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

    $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
    $attributeSetId = $customerEntity->getDefaultAttributeSetId();
    $attributeSet = $this->attributeSetFactory->create();
    $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

    $customerSetup->addAttribute( Customer::ENTITY, self::BONUS_ATTRIBUTE_CODE, [
        'type' => 'int',
        'label' => 'Customer Bonus',
        'input' => 'text',
        'required' => false,
        'visible' => true,
        'user_defined' => true,
        'system' => false,
    ]);

    $attribute = $customerSetup->getEavConfig()->getAttribute( Customer::ENTITY, self::BONUS_ATTRIBUTE_CODE)
        ->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms'=>['adminhtml_customer']
        ]);

    $attribute->save();
    $setup->endSetup();

}
}

And now i need Plugin which will change custom attribute value to 1000.

this is what i have:

etc\di.xml

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
 <type name="Magento\Customer\Api\CustomerRepositoryInterface">
<plugin name="bonusPlugin" type="\Kt\Addbonus\BonusPlugin"/>
</type>
</config>

Plugin\BonusPlugin.php

<?php

namespace Kt\AddBonus\Plugin;

use Kt\AddBonus\Setup\InstallData;
use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Customer\Api\Data\CustomerInterface;

class BonusPlugin
{
 public function beforeSave(CustomerRepositoryInterface $customerRepository,
                           CustomerInterface $customer)
{
    $customer->setCustomAttribute(InstallData::BONUS_ATTRIBUTE_CODE,1000);
 }

}

when i press "Create An Account"  it just reset password fields in registration form and remains on this page, with the "we cant save Customer" error.
How i can create this plugin? And what i did wrong?


texts: Magento 2.3 - $product->getTypeInstance(true)->getOrderOptions($product) returning fatal error

texts:
I am using the following code in a plugin's aroundGetItemData() method.

$product->getTypeInstance(true)->getOrderOptions($product)

It's returning me the following error,

  Fatal error:  Uncaught Error: Call to a member function getName() on null in /vendor/magento/module-configurable-product/Model/Product/Type/Configurable.php:992
      Stack trace:
      #0 /generated/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Interceptor.php(310):

When I investigated, I found that some of the selected attributes are not valid for this product as the simple products as out of stock.

How to handle this error? Any help will be greatly appreciated.


texts:
I would like to add filters (with addFieldToFilter or other) in my customer collection Mage::getResourceModel('customer/customer_collection').

In sql it is:

WHERE (billing_country_id = "FR" AND (billing_telephone LIKE "06%"
OR billing_telephone LIKE "07%")) OR billing_telephone LIKE "00%"
OR billing_telephone LIKE "+%"

I have created:

(billing_country_id = "FR" AND (billing_telephone LIKE "06%"
OR billing_telephone LIKE "07%") ",

but i don't know how add:

 " OR billing_telephone LIKE "00%" OR billing_telephone LIKE "+%" ".

This is the beginning :

 ->addFieldToFilter(
        array(
            array('attribute' => 'billing_country_id', 'eq' => "FR")
        )
    )
    ->addFieldToFilter(
        array(
            array('attribute' => 'billing_telephone', 'like' => "06%"),
            array('attribute' => 'billing_telephone', 'like' => "07%")
        )
    )


texts: Failed to set PHP CodeSniffer installed_paths Config issue at Magento2.4 installation

texts:
I tried to install Magento2 using Composer.
After run
$ sudo composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento

the installation showed the error Failed to set PHP CodeSniffer installed_paths Config.

I tried
$sudo composer global require "squizlabs/php_codesniffer=*"

$composer global config bin-dir --absolute

Then I removed /var/www/html and created again.
Then I tried
$sudo composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento

It shows same error.
Does anyone know of a solution?
I'm using AWS EC2. After launching the instance, I run the following commands.
$sudo apt update
$sudo apt install nginx
$sudo systemctl stop nginx.service
$sudo systemctl start nginx.service
$sudo systemctl enable nginx.servic
$sudo apt install php7.4-fpm php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-cli php7.4-zip
$sudo systemctl restart php7.4-fpm nginx
$curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer

Before restarting hp7.4-fpm and nginx, I edit /etc/php/7.4/fpm/php.ini depending on https://devdocs.magento.com/guides/v2.4/install-gde/prereq/php-settings.html
OS:Ubuntu20.04  Web server: Nginx1.18.0 php:7.4.16 DB:RDS Mysql8.0


texts: All categories Always open only on the home page

texts:
I am not sure if this is possible so i thought i would ask as all my attempts have not worked so far. I have a top navigation where i have tabs "All Categories" , "consumable", "Furniture"  etc. However i want the All categories tab to be full extended only on the home page but not on any other page. Is this possible, if so how would i go about it?

This is my code which i believe is creating my "All Categories" tab as it is in my top.phtml

<?php $_menu = $this->renderCategoriesMenuHtml(0, 'level-top', 'sub-wrapper' ) ?>
<?php if($_menu): ?>

    <?php echo $this->__('Navigation'); ?>

        <?php if (Mage::getStoreConfig('midmedssettings/navigation/home')): ?>

            <a href="<?php echo $this->getBaseUrl(); ?>"><?php echo $this->__('Home'); ?>

     <?php endif; ?>

If i haven't explained myself very well please let me know or if you need more code just add a comment.

Thank you


texts: I'm looking to create a form on the back end that makes a registration in the bank using grid, but I don't think 1 tutorial that works, they are always out of date or incomplete. Can anyone inform me of a tutorial that will work out in the end?


texts:
I think I have a little understanding problem how magento layout works.

I have a template page/2columns-left.phtml with the following code in it:

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

Now in the page.xml I have:

<block type="page/html" name="root" output="toHtml" template="page/2columns-left.phtml">
    <block type="page/html_head" name="head" as="head">
        ...
        ...
<!-- Here comes my new block -->
        <block type="core/template" name="headmeta" template="page/html/head.phtml"/>
    </block>
</block>

As you can see I want to include the page/html/head.phtml in this block.
My first confusion was the block type. As I don't have any class to this template (I only have the phtml) I was not sure what to take as block type.
The page/html/head.phtml right now only contains 1 line of html:

<meta name="viewport" content="width=device-width, initial-scale=1">

But right now the output of <?php echo $this->getChildHtml('head') ?> is empty.

What did I wrong? How can I include this block as a "sub-block" of head ?


texts: Custom attributes for products Magento 2?

texts:
I'm trying to import around 5k products using Magento's native import. Unfortunately, I can't use third-party tools otherwise I would, I imagine this would simplify the process significantly.

My issue is, I'm trying to import a .csv from a wholesaler who has included a lot of extra information within the CSV I would like to provide potential customers. For example:

Multiple quantities say a pack of 5, pack of 10, pack of 15. I would like this to be a drop-down on my actual site for a user to select before adding to the basket - there doesn't seem to be a csv header for this.
Manufacturer, allowing me to group products by their respective manufacturer.
Other custom attributes that I could show under a "details" tab (Like the warranty, expected battery life, screen size) - these would not be applicable to all products, but relevant.

I've tried to look at this for reference, as well as this but I can't seem to get my head around it.


texts: Magento admin failing to load CSS when SSL is activated

texts:
I've activated SSL for the whole Magento store and it works perfectly on the frontend, but the issues I'm having is with the admin.

Once enabled, I can't access it.

Before I had an issue with ERR_TOO_MANY_REDIRECTS and fixed it by adding to my .htaccess this:

RewriteCond %{HTTPS} off
RewriteRule ^ https://domain.com%{REQUEST_URI} [R,L]

And it fixed the redirect issue. But now I can't use it because the site is broken.

I suppose the issue is because, the CSS/JS are still being loaded via HTTP.

How can I change it (manually or programmatically)?

UPDATE:

Is there a way to simply ignore the Admin(backoffice)?

If I set: Unsecure to https it automatically does apply the config for admin as well... It ignores the setting in Secure -> Use Secure URLs in Admin -> No

Could it be Re-Indexing problem?


texts: Magento Catalog Rules not working after sometime

texts:
I have discount on products of particular brand(eg. nike) for logged in users. Its works fine when I click on Save and Apply but after some time it not shows discount price for products.

I have created custom cron page to apply the catalog rules

$catalogPriceRule = Mage::getModel('catalogrule/rule');
$catalogPriceRule->applyAll();
Mage::app()->removeCache('catalog_rules_dirty');

I am confused by searching, and I don't find any correct answer.


texts: 1.9: remove specific meta tag from header

texts:
Is it possible when looking at:
Custom Design->Custom Layout Update XML

to completely remove a meta tag?

I'd like to remove the "robots" tag completely, as I will be adding in customized values for the pages using that template.

This is what I would use to CHANGE the value... but I'd like to remove it completely.

<reference name="head">
    <action method="setRobots">
        <value>NOINDEX,FOLLOW</value>
    </action>
</reference>


texts: Is there any solution to transfer a partitular category and there sub category from magento 2 to another magento 2

texts: I need to transfer a particular categories of products to another Magento 2 site with all the attributes image and all


texts: How to add Dynamic Image url for Product in Magento

texts: I am using a third party service to generate product images. How can I use a URL for product images instead of uploading media into server.


texts: Redirect customer login/register success to checkout Magento 2.2

texts:
I am creating a module for redirect login/register success to checkout if customer has some items on quote but that's not working.

If I stop the event with that die; on Observer/Redirect.php above that redirect works, but I need continue for merge quotes.

events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
   <event name="customer_login">
       <observer name="lima_customer_login_redirect" instance="Lima\CustomerLoginRedirect\Observer\Redirect" />
   </event>
</config>

/Observer/Redirect.php

<?php
namespace Lima\CustomerLoginRedirect\Observer;

use \Magento\Framework\Event\Observer;
use \Magento\Framework\Event\ObserverInterface;
use \Magento\Quote\Model\QuoteFactory;
use \Magento\Framework\Controller\ResultFactory;
use \Magento\Framework\View\Element\Context;

class Redirect implements ObserverInterface
{
  protected $_objectManager;
  protected $_quote;
  protected $_responseFactory;
  protected $_url;
  protected $_scopeConfig;

  public function __construct(
    Context $context,
    QuoteFactory $quoteFactory,
    \Magento\Framework\App\ResponseFactory $responseFactory,
    \Magento\Framework\UrlInterface $url
  ) {
    $this->_quote= $quoteFactory;
    $this->_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $this->_responseFactory = $responseFactory;
    $this->_url = $url;
    $this->_scopeConfig = $context->getScopeConfig();
  }

  public function execute(Observer $observer)
  {
    $module_status = $this->_scopeConfig->getValue('customer_login_redirect/redirect/status', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
    if($module_status){
      $cart = $this->_objectManager->get('\Magento\Checkout\Model\Cart');
      $quote = $cart->getQuote();
      $totalItems = count($quote->getAllItems());

      if($totalItems > 0){
        $redirectionUrl = $this->_url->getUrl('onepagecheckout');
      }else{
        $redirectionUrl = $this->_url->getUrl('/');
      }
      $this->_responseFactory->create()->setRedirect($redirectionUrl)->sendResponse();
      // die;
      return $this;
    }
  }

}

Thanks.


texts:
My one of the Magento 1 Project client recently come up with the issue is image upload is not working. I cross checked and found that Flash has end the service From 31-Dec-2020.
So instead of that they were suggested some new technologies like HTML5. So I've configured one of the HTML5 extension to support the image upload.
Question: In Magento1 product video upload is default feature or we need to do customisation to support the product video upload(as like image upload)
Thanks in advance for your support


texts: Magento error on add to cart configurable product after upgrade to 1.9.1.0

texts:
after update the store from 1.8.1 to 1.9.1.0, when i add to cart a configurable product and i logged in, the system return the page 503.

The same operation, but if not logged in work correctly.
The system.log and exception.log don't report an error related to this issue.

Our hosting provider, believe this error is caused by a bug in PHP/Zend framework. We have tried with PHP 5.5 as well with same results so at this point there is not much more we can do.

A bug report has been submitted: https://bugs.php.net/bug.php?id=68958

all suggestions are much appreciated.


texts: change title of create new customer account

texts:
I need to change the title of my registration form. ex. apply for customer account

How can I change the title?


texts: I am trying to re-size a container: col-2 registered users.

texts: When landing on http://designozstudio.com/magento/index.php/customer/account/login/ there are 2 buttons: 'login' and 'create account'. The login button is in a block or container and the width is 376px, it should be a simple task to resize this to 485px however I cant find where to make the changes. Is anyone able to point me in the ringht direction?


texts: How to use Magento 1.9.1.0 Configurable Swatches in Default package theme (or a custom theme)?

texts:
UPDATE: My answer now supports automated change of the product base
  image after swatch. You can also find a more detailed tutorial on how
  to do this including more images
  here.

Magento CE 1.9.1.0 comes with a very nice new feature: Configurable Swatches. Unfortunately, this is only available for the RWD package, that comes with the default Magento installation.
This is a self answered question on how to make the Magento Configurable Swatches available for the Default package. For anyone who wants to integrate the Configurable Swatches
into a custom theme, this info may come in handy as well.

Note 1: This is meant to be an introductional guide on how to make the Configurable Swatches available for Magento's Default package. This could (but may not) work for every custom theme.
Always backup your original files (and database) before making any changes.

Note 2: The swatches do work (screen shot below), but I did not yet get the product image to change automatically along with the swatches. I will try and look into this when I find some time.

Feel free to contribute by commenting and make suggestions!


texts: Magento Update: There is no Mage_All_Latest in Magento Connect?

texts:
I want to update my Magento 1.9.1.1 over Magento connect. BUT there are only the installed extensions listed. No Magento entries order even Mage_All_Latest.
So I followed some tips from this forum and tried to install Mage_All_Latest. but every time i got some errors that the files are exciting.

so how can i install Mage_All_Latest (and/or update my Magento)?
i hope i don't have to build my whole site new.


texts:
I'm running a Magento 2.3.2 B2B and opening my var/log/cron.log I see these messages below.
setup-cron: Please check var/log/update.log for execution summary.
update-cron: Please check var/log/update.log for execution summary.
update-cron: Please check var/log/update.log for execution summary.
setup-cron: Please check var/log/update.log for execution summary.
setup-cron: Please check var/log/update.log for execution summary.
update-cron: Please check var/log/update.log for execution summary.

Checking the var/log/update.log I see these messages bellow.
[2020-12-21 15:04:20] update-cron.WARNING: Update is already in progress. [] []
[2020-12-21 15:05:24] update-cron.WARNING: Update is already in progress. [] []
[2020-12-21 15:06:05] update-cron.WARNING: Update is already in progress. [] []
[2020-12-21 15:07:30] update-cron.WARNING: Update is already in progress. [] []
[2020-12-21 15:08:23] update-cron.WARNING: Update is already in progress. [] []

How could I do to stop seeing those messages?


texts: How to extend the checkout Success block?

texts:
In module-checkout, there are 2 blocks as below. I am working to show a custom success page so which one we have to override?
    what is the correct way?

Magento\Checkout\Block\Onepage\Success
and
Magento\Checkout\Block\Success

Is there any option that the success.phtml file call from custom module instead of the repective theme (checkout_onepage_success.xml)?


texts: Create custom product collection manager (same as Categories)

texts:
I want to build a custom module (called My_Collection) that works almost same as Catalog. It means:

In admin

Able to create new Collection and its data (name, url key, meta data,...).
Able to select products belong to the Collection and set position for each product.

In frontend

Listing products of Collection, the url is from Collection's url key.

I am familiar with creating modules and extending core codes. So, I need an outline instruction.

What are hints to do that?

Thank you all.

Notes:

A Collection may have products what are from varied Categories.
A product may belong to many Collections.
Should not alter Categories and Products data.


texts:
I received this error message when trying out my new shop:

PayPal gateway has rejected request. Billing address request is not enabled for merchant (#11601: Request for billing address failed).


texts: How can I get Products name from customer order in Magento

texts:
I have created custom payment gateway to redirect user to an external link where payment will be processed. This is the redirect.phtml which redirect to the external payment gateway

<?php
$order = new Mage_Sales_Model_Order();
$customer = new Mage_Customer_Model_Customer();

$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$customer = Mage::getSingleton('customer/session')->getCustomer();

$order->loadByIncrementId($orderId);
$orderData = Mage::getModel('sales/order')->loadByIncrementId($orderId);

$orderDetails = $order->getData();   // order details
$shippingAddress = $order->getShippingAddress();

$_SESSION['dataArray']['names'] = $orderDetails['customer_lastname']." ".$orderDetails['customer_firstname']." ".$orderDetails['customer_middlename'];
$_SESSION['dataArray']['amount'] = $orderData->getGrandTotal();

?>
  <div class = "row">

    <form name="mygatewayform" class="form-horizontal" method="post" action="<!-- my payment gateway -->">
       <input type="hidden" name="merchantid" value="376" />
     <input type="hidden" name="phone_number" value="<?php echo $shippingAddress->getTelephone(); ?>" />

      <input type="hidden" name="orderId" value="<?php echo $orderId; ?>">
      <input type="hidden" name="merch_txnref" value="<?php echo time()."_".$orderId; ?>">
      <input type="hidden" name="amount" value="<?php echo round($orderData->getGrandTotal(), 2); ?>">
      <input type="hidden" name="email_address" value="<?php echo $orderDetails['customer_email'] ?>">
      <input type="hidden" name="last-name" value="<?php echo $orderDetails['customer_lastname'] ?>" >

      <input type="hidden" name ="other-names" value="<?php echo $orderDetails['customer_firstname']." ".$orderDetails['customer_middlename'] ?>">
      <input type="hidden" name="currency" value="<?php echo $orderData->getOrderCurrencyCode(); ?>">

    </form>
 </div>
</div>
 <script type="text/javascript">
document.mygatewayform.submit();
</script>

As you can see I have been able to generate

Order Id
Customer Name
Grand Total Amount
Currency

Question

How can i generate the product(s) ordered by the customer, because I need to use it my payment gateway

Thanks


texts: How to style recently viewed products horizontally

texts:
I've just recently moved my recently viewed products to just below my product detail page and above the header. However, the items show up vertical and I'd like them to be horizontal. Is there a proper way of styling this (for example with css) so I don't have to touch any base/core files? Using CSS, I can't seem to find out what exactly to style. Edit: Code added, not sure what this could add but anyway here it is.

   <reference name="right">
         <action method="unsetChild">
            <name>right.reports.product.viewed</name>
         </action>

    <remove name="catalog.compare.sidebar" />

<catalog_product_view>

   <reference name="content">
   <block type="reports/product_viewed" name="my.reports.product.viewed" template="reports/product_viewed.phtml"/>
   </reference>

 </catalog_product_view>


texts: Magento 2 REST API filter products in stock

texts:
I am looking for an API filter to get in stock products but I could not find any option on the internet.
Any ideas ? Maybe some plugin code ?
Thanks !


texts: Magento 2 how to set cron config path value

texts:
I am working magento 2 extension development. i am now able to set cron config path. I have used following code but it is not working.

i have created crontab.xml and put following code into this xml but this is not working.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="test_cron" instance="MyCompany\Test\Cron\Test" method="execute">
            <config_path>mycompany/test/cron_daily</config_path>
        </job>
    </group>
</config>

Please let me know how can i set cron config path value?


texts: Magento 2 How to add country and state dropdown in admin form?

texts:
I need to add Country and State Dropdown in Magento 2 admin form.
Please help me.


texts: Custom Options price ordering when default is set to show ex. VAT

texts:
I have set the default price configuration to be entered without VAT and show the price both incl. and ex. VAT.
However it does not seem to apply to custom options. In custom options dropdown, it still show the default price incl. VAT. I would like to swap these to prices.
Take a look on these screenshots.
This is how it looks now (wrong order).

This is how it is supposed to display

Is there a setting somewhere, that i have overlooked or do I i need to change this in code?
If i need to fix this in code, can someone point me in the right direction of what file is responsible for this dropdown render?


texts: Zoomed image didn't close in Magento 2.2.3 and 2.2.4

texts:
I have just installed Magento 2.2.3 in my system. I have also added few categories and that of products. I can see a bigger image when I have clicked on it and it has been closed when I clicked on "X" (close) button. But when I checked in responsive design I am not able to close that image by clicking on close button. I have found the same issue in Magento 2.2.4 also.

Can someone please help me where the actual issue is ?


texts:
I installed patch 1533 then 5344 both of them were for correct version.

When I was installing the second one 5344 it gave me error.

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/controllers/DashboardController.php.rej

Do you know what I should do?


texts: Can anyone explain what how customized theme should be set up in design tab M2

texts:
I have three listings and I do not understand how these work or how I should be setting these up to use my customized theme Cool. I have just one store and one website. Should I have all three of these entries set to my customized theme or just one or just two?
Any insight would be much appreciated.


texts: Magento 1 - How to check whether user has logged in or not in magento?

texts: I am doing mobile apps and I would like to know how to check whether user is already logged in or not. Is there any observer event to track? If it is detected that the account is logged in, the user will be directed to Account Information page. If not, the user will be directed to login or registration page.


texts: How to write setHttpResponseCode() in magento 2 Observer

texts:
In Magento 1.x I m writing below code in Observer -

Mage::app()->getResponse()->setHttpResponseCode(403);
Mage::app()->getResponse()->clearBody();
Mage::app()->getResponse()->sendHeaders();

Now I want to write same functionality in Magento-2 Observer. Please let know what Injunctions need to implement and how to write above code.


texts: How can I calculate shipping costs before asking for shipping details

texts:
Our website is based in the UK, so shipping costs are calculated based around the post code.

We would like to pretty much calculate shipping costs before they continue.

Is this possible? And can you please point me in the right direction if possible please.

Much appreciated.


texts:
How to Set Other Country Users Minimum cart value $50
if any one knows this help me


texts: Magento: missing Dataflow options in Admin Panel

texts:
Magento 1.4.2 Admin Panel

Under System > Import / Export I have the following options:

Profiles
Advanced Profiles

I feel like I am missing Dataflow - Profiles and Dataflow - Advanced Profiles.

Were these present in Magento 1.4.2?

And if they were, how do I get them back?


texts:
I am facing Below issue,
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'item': Duplicate key-sequence ['validation'] in key identity-constraint 'itemName'.
Line: 1350
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'item': Duplicate key-sequence ['validation'] in key identity-constraint 'itemName'.
Line: 1350
As I checked Xml File with "item name="validation" "But its showing in 84 files, It will make me risky to change it on files
Can any one help me to resolved it


texts: Ho can i install Patch on WAMP localhost

texts:
Localhost magento panel securty alert, Community Edition 1.9.X and SUPEE-**** Security Enhancements. The patch download and moved to root folder, run by

  sh patchname.sh

Not working Getting error like,

  $ sh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.sh Error! Some
  required system tools, that are utilized in this sh script, are not
  installed: Tool(s) "patch" is(are) missed, please install it(them).

How can i solve the issue.


texts: Check out Cart item without Tax on specific countries

texts:
If I select the country as Germany, in Check out Cart, the product costs 39,90 . This is the price with tax and it is correct.

but when I select the country as Albania, in Check out Cart, the product costs 32,18 . This is the price without tax.

I need same tax for all countries

Any idea how I can fix this?


texts: How to hide top links from customer groups

texts:
Is it possible to hide certain top links depending on the customer group?
As we have anew feature which we have added a link to in the top link but it is only available to certain customers.

We have declared the link an xml file, and shows up perfectly i just now need to know if it is possible to hide the link if a customer is not logged in or is logged in but is not in a certain group

<reference name="top.links">
                <block type="advancedquickorder/index" name="add.advancedquickorder.link">
                    <action method="addAdvancedquickorderLink" ifconfig="advancedquickorder/general/active"><param>top</param></action>
                </block>
            </reference>


texts: How can I switch categories back to the non SEO-friendly URLs?

texts:
This may seem weird, but I want to know how to stop using the SEO-friendly URLs for categories.

So instead of something like:

/apparel/shirts.html

I want

/catalog/category/view/s/shirts/id/188/


texts: Magento 2 : How to know who admin_user added a product?

texts:
I created a new admin_user role, this role has access to the products page and can add a new product.

So, I want to save the ID of the current admin_user to know who's added the product.

The first method I think about is to add a new foreign key to catalog_product_website table on DB with the ID of admin_user table.

And after that, I will use an event to save the ID on this table, on save the product.

But with some search, I found there's EAV method.

So, it's better to use the first method? Or it's better to use EAV and create attribute not visibly and save on it the ID of the current user?


texts: Magento 2 Multi Store with Sub-domain for B2B

texts:
I need to create a new store for my e-commerce (not a new website, not a new store front) for B2B.

Now, my e-commerce is active on mobiroloshop.com (B2C) and I want the new store on b2b.mobiroloshop.com.

I've followed several tutorials but still have problems. If I create an alias (parked domain) on cPanel for B2B, when I type b2b.mobiroloshop.com,

I'm redirected to mobiroloshop.com. I tried both to change .htaccess file (following step-by-step this tutorial https://www.cloudways.com/blog/create-and-configure-multistore-magento-2/) and to use a switch statement on my index.php (to switch B2B or B2C based on $_SERVER content).

Can someone please help me with this struggling issue?

My Magento store configuration.


texts: Magento 2 Can not save custom attribute for customer

texts:
I am getting following error while register customer with API. It happen when i am try to save Company field.

"Property \"Company\" does not have accessor method \"getCompany\" in class

I have use \Magento\Customer\Api\Data\CustomerInterface as a argument in my API interface.

let me know if anyone have idea.


texts: Transactional emails are sent to my client after placing an order, but not to the customers. Why?

texts:
When looking in the logs, I see
exception 'Exception' with message 'This letter cannot be sent.' in /var/www/app/code/core/Mage/Core/Model/Email/Template.php:398, which leads to:

public function isValidForSend()
{
    return !Mage::getStoreConfigFlag('system/smtp/disable')
        && $this->getSenderName()
        && $this->getSenderEmail()
        && $this->getTemplateSubject();
}

Disable Email Communications is already set correctly. What else could it be? The user enters all of these details. We've been searching for hours.

Thanks in advance!

Edit: It turned out that the template subject was always returning null. After explicitly assigning the email templates in the back-end instead of using the defaults from the locale folder, it started working again. I still haven't been able to figure out just where it comes from, but it works.


texts:
I am trying to add additional colour to my attributes but when I save it won't save the additional colour.
Is there a limit or how can I increase the limit?


texts: Bitnami Magento 2 Installer - Installed on Azure VM Ubuntu

texts:
I'm a new guy on LAMP stack and trying to install Magento from a Bitnami insatller. (Bitnami Magento 2 installer for Ubuntu 14.04 on Azure VM).

The installation went very well except that I have to use port 8080 to access my online shop from public computer. The URL looks like this:
http://shop.waubulan.com:8080

Please help me on how to change it to a just normal URL http://shop.waubulan.com

Thanks.
Wan


texts: Theme CSS not updating on media/css_secure

texts: Recently my CSS files not updating to media/css_secure folder. I'm tried to kill cache but still its showing old CSS data. How to overcome to update my CSS. I am using Magento 1.9.2.2


texts: Prevent bots from registering in Magento

texts:
I noticed in my e-shop that there were a couple of mysterious customers that were signing up and I decided to stop it. The way I chose to do it was to create an extra field in the sign up page in

  app/design/frontend/xlcloset/deafault/template/officience/customerattributeform/register.phtml

Its style would be style="display:none" so that it would be not visible. This form sends tits data with the $this->getPostActionUrl(). So the concept would be to check if the field is filled and if yes, stop the execution of the program (like die(); ). I found the getFormData() function which is:

  public function getFormData()
{

    $data = $this->getData('form_data');
    $china = $data['firstname'];

    if (is_null($data)) {
        $formData = Mage::getSingleton('customer/session')->getCustomerFormData(true);
        $data = new Varien_Object();
        if ($formData) {
            $data->addData($formData);
            $data->setCustomerData(1);
        }
        if (isset($data['region_id'])) {
            $data['region_id'] = (int)$data['region_id'];
        }
        $variable = $this->setData('form_data', $data);

    }

    return $data;
}

What I am trying to figure out is how to perform the check in this method in order to check if the hidden field is filled. Thank you for the help in advance!!!


texts: Magento2 : How to migrate wordpress website into magento website

texts: How to migrate wordpress made site all data  in magneto2? if any one know reply me


texts: Exclude associate product of configurable product from catalog price rule

texts:
I am trying to exclude the associated simple product of configurable product from catalog price rule.The reason behind to doing this all that I have already added -price in super attribute configuration section and i don't want to give anymore discount to this particular product.

I have tried to exclude product to save in catalogrule_product table but i found that this table not saving the associated product it save configurable product id, and calculate the price using it.

Also i have tried to out some condition in configurable.php but no luck yet..

I don't want to use any dirty way to do this. Please tell me what is the smart way to do this..


texts:
I am a Magento 2 Developer but some work i start study on magento 1 so please tell me the following command of magento 2 instead used in magento 1.

=>setup:upgrade

=>setup:static-content:deploy -f.

=>indexer:reindex

=>di:compile


texts: How to test magento module without magento core?

texts:
Imagine, that you creating new module (for example) and you have only your module files without magento core files.

How do you run unit tests?
What is the best build-process to run tests on this module?

I suppose that you have docker containers with different magento versions and build script that installs your module and executes tests.

Is there any other way to do it?


texts:
im just developing a new site, and havent used Magento for a while.

I have downloaded Magento 1.7.0.2 and have been playing around with CSS based on the blank theme, in my own theme folders.

Now is the time i would like to delete and modified some of the top links by the search box, and i have been into customer.xml and tried to modified the addlinks and even delete them entirely! but to no avail, nothing changed what-so-ever.

Am i missing something?

What is the correct way to modify the links at the top near the search bar?

Thanks


texts: Magento 2 - how to use my css and js in the theme and in the components

texts:
I'm new with Magento.
I'm a rails developer and vue developer with frontend experience, and I have to work on a magento theme (it's a store of a friend of mine)
I read a lot of documents and I understand that I can create a new theme from scratch, and I also find a way to use Gulp and SCSS instead of LESS.
There is something that I cannot understand: at this moment the website is slow and the HTML generated is a mess. I know that I can create a new theme without a parent theme like Luna or Black, but I don't know how to manage the components the store is using.
For example, now the store has three carousel module and they use 3 js library for the frontend with a different HTML and CSS structure. I want to keep the admin gui of the component in the backend, But I want to rewrite the frontend: I want to choose the carousel lib, maybe compile the version I need, and I want to use my CSS.
I cannot find a way to do this.
I want a clean HTML output, with the JS loaded at the end of the body with defer, with the CSS splitter and organized, with the shared js in the theme and the js of the module loaded and bundled only in the page where the JS is used.
Is possible to have this?


texts: Magento 2 - How to create a custom product listing grid in admin?

texts: I want to create a custom page for product listing in admin like the image using my custom module. How could i do that? If anyone have any solution please lighten me up.


texts: Magento 2 - can't save changes to product

texts:
I try to change some product info text and then save, but after it saves, the text in the backend/frontend still remains the same. There is no error showing.
What can I do?

Additional Information
I am using Magento 2.4.2 Enterprise
This shows if I save the product, first I thought it is not related, so I did not mentioned it, but maybe it is:

exception.log:

Base table or view not found: 1146 Table
'company_m2.amasty_elastic_relevance_rule_index' doesn't exist

I already executed bin/magento setup:upgrade but the error remains.


texts: What is the module responsible for the signup form?

texts: In magento 1.9, I want to extend the signup form but couldn't find the module responsible for it.


texts: Trying to search a table with url api call

texts:
I need help figuring out whats is failing my search. I am new at this so if I need to rephrase something please let me know:

search 1 : (works)
https://staging.cherrydale.com/rest/default/V1/actionlog?searchCriteria[filter_groups][0][filters][0][field]=participant_id -- worked

search 2 : (fails)
https://staging.cherrydale.com/rest/default/V1/participants?searchCriteria[filter_groups][0][filters][0][field]=participant_id -- failed

I varified that the ID field I am using in the search is in both tables.

What I got back:

The server returned HTTP Status Code : 400 Bad Request
The response was: {"message":"%fieldName is a required field.","parameters":{"fieldName":"criteria"}}

I don't understand why it is not accepting a field name that exists.