texts: How to send transactional email programatically?

texts:
This is my code:

 $emailTemplate  = Mage::getModel('core/email_template')->loadDefault('newsletter_subscription_confirm_email_template');
            $emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email', $storeId));
            $emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name', $storeId));
            try {
                $emailTemplate->send($email, $order->getData('customer_firstname')." ".$order->getData('customer_lastname'), array());
                Mage::getSingleton('core/session')->addSuccess(Mage::helper('customer')->__('An email was sent with a confirmation url'));
                $this->redirectSubscribeSuccess();
            } catch (Exception $e) {
                throw new Exception($e->getMessage());
            }

I received the the email with the content of the transactional email, except that the

{{var subscriber.getConfirmationLink()}}
 is empty . Do you know why ?

Thanks.!

[UPDATE]

 $emailTemplate  = Mage::getModel('core/email_template')->loadDefault('newsletter_subscription_confirm_email_template');
            $emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email', Mage::app()->getStore()->getId()));
            $emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name', Mage::app()->getStore()->getId()));
            $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email);
            if (!$subscriber->getId()
                || $subscriber->getStatus() == Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED
                || $subscriber->getStatus() == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {
                $subscriber->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED);
                $subscriber->setSubscriberEmail($email);
                $subscriber->setSubscriberConfirmCode($subscriber->RandomSequence());
                $subscriber->setStoreId(Mage::app()->getStore()->getId());
                $subscriber->setCustomerId($order->getData('customer_id'));
            }
            try {
                $emailTemplate->send($email, $order->getData('customer_firstname')." ".$order->getData('customer_lastname'), array('subscriber' => $subscriber));
                Mage::getSingleton('core/session')->addSuccess(Mage::helper('customer')->__('An email was sent with a confirmation url'));
                $this->redirectSubscribeSuccess();
            } catch (Exception $e) {
                throw new Exception($e->getMessage());
            }


texts: Error while importing products through csv in magento 2

texts:
I am trying to update my product price through csv.
When I run this import, I am getting this error:
-> The value specified in the URL Key field would generate a URL that already exists.
https://prnt.sc/te05st
I checked the url, they are the same but They do belong to different store. What can be the issue with this? How to resolve this?


texts: Hackers exploit Magento e-commerce vulnerability

texts:
This blog, PC world, claims that the hackers are attacking the e-commerce websites. and I should get updated with the latest patch.

  Check Point, which found the flaw, reported it to Magento, which issued a patch (SUPEE-5344) on Feb. 9. Since Check Point revealed the flaw earlier this week, it appears attackers have picked up on it and are trying to find unpatched applications.

Should I get this patch?

How can I trust this patch?


texts: Attributes with Website Scope are empty in Frontend, when imported with store_id set

texts:
All product attributes with website scope are not showing any values in frontend after import. In the backend they do. I have one website, one store group and two store views (languages). In the backend the correct values are shown in both store views with a "[WEBSITE]" behind the textbox. The default values are empty.

To open the product in the backend on global scope and save it again fixes the problem.

The problem occured after some updates and reimporting all products. I'm importing by doing something like this:

$product = Mage::getModel('catalog/product');
$product
  ->setWebsiteIds(array('1'))
  ->setStoreId('1')
  ->setStatus(1)
  ->setSku('123')
  ...
  ->setAttribute('...')
  ->save();

Reindexing doesn't help.

Why are the attribute values not shown before saving via the admin?

UPDATE

I took a look to the DB. Before saving via Admin, I have two (identical) values, one for each store view. After there is a third with store_id = 0 and value = NULL.

I also tried without ->setStoreId('1') ... then the insert of a new product works, but the update doesn't work any longer. I looked to the DB again and only the value for store_id = 0 got updated.

Reformulated Question: Is it correct, that I have to handel insert and update differently, or am I missing something ... and if yes – why?

(I'm still very much confused with the scopes and in this case trying to brake it down to an explicit szenario.)

Summary

1st TRY: only ->setWebsiteIds(array('1')), here insert works, update doesn't.

Values after insert via script:

store_id    values
0           initial_value
1           initial_value
2           initial_value
... right value on the frontend :-)

Values after update via script:

store_id    values
0           updated_value
1           initial_value
2           initial_value
... old value on the frontend :-(

2nd TRY: ->setWebsiteIds(array('1')) and ->setStoreId('1'), here other way round: update works, insert doesn't (without open and save in the backend)

Values after insert via script:

store_id    values
1           initial_value
2           initial_value
... no value on the frontend :-(

Values after open/save via backend:

store_id    values
0           NULL
1           initial_value
2           initial_value
... right value on the frontend :-)

Values after update via script:

store_id    values
0           NULL
1           updated_value
2           updated_value
... right value on the frontend :-)


texts:
I am running 1.7 version of Magento on Website1.com. I am planning to create Website 2, install 1.9 version of magento, then install many new extensions and once that is completed I need to transfer all customer and product data from website1.com (OLD) to website2.com (NEW)

I am just not sure what exactly shall to transfer,
  Should I transfer full database from website1 (OLD) ?
  What files should I transfer ?

The way I was thinking of doing it is.
1. Make a copy of my website 1 and update it to magento 1.9.
2.Then instal new templates, extensions. But It will take me 2-3 weeks to make changes on new website. Once finished how can I transfer most latest customer information that were created during the period I will be developing the new website? (new orders, accounts, subscriptions to newsletters, etc.)

All I really need is customer data and product data. I don't need settings, extensions, and so on.


texts: Manage labels/options existing attribute not working

texts:
When I add new labels to my existing attribute, it looks fine in the catalog-->attributes tab.

When I try to add these new options to a configurable product that allready has this attribute set in it it won't work.

I try to add the new attribute label/option, by following the quick add option. After that I see the product in the list, but also 2 'false' products. (see screenshot). The problem is that were it says 'broodje' the new products don't have a value for 'broodje' and I don't know why not. You see that for example italiaanse bol and speltbroodje don't have a value on the right side, and all the others do. I've looked everywhere, but a few months ago adding a value wasn't this hard.

Can someone please help me with this?


texts:
We no longer have a web developer but need to add NOINDEX tags to all our products to help with our SEO

We have about 450 products at any one time

We are using Magento 1.8.1.0

We are complete novices when it comes to anything but the very basic Admin actions and all the answers we have seen instruct us to alter or add code.

This goes way above our heads.

Could someone please let us have step by step instructions on how to do this that even a complete novice can understand and implement

Thanks for your help


texts: What is Context Object purpose in any class's constructor DI ? How Context works?

texts:
In most of the class's Constructors, a Context object is passed . I couldn't  understand how this Context Obj works . I also noticed that sometimes this is passed to parent class's constructor like below.

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Catalog\Model\Design $catalogDesign,
    \Magento\Catalog\Model\Session $catalogSession,
....
    parent::__construct(
        $context,
        $layoutFactory,

Can you please explain how this specific context object works ?


texts: Mganeto2: doesn't exist or not a file .js

texts:
In exception log file I get every time issue:

[2018-08-26 10:41:56] main.CRITICAL: The path "/home/czasowe/domains/domain.com/public_html/var/tmp/_cache/merged/dff080226ea3597444c03925cb09364e.js" cannot be renamed into "/home/czasowe/domains/domain.com/public_html/pub/static/_cache/merged/dff080226ea3597444c03925cb09364e.js" Warning!rename(/home/czasowe/domains/domain.com/public_html/var/tmp/_cache/merged/dff080226ea3597444c03925cb09364e.js,/home/czasowe/domains/domain.com/public_html/pub/static/_cache/merged/dff080226ea3597444c03925cb09364e.js): No such file or directory {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): The path \"/home/czasowe/domains/domain.com/public_html/var/tmp/_cache/merged/dff080226ea3597444c03925cb09364e.js\" cannot be renamed into \"/home/czasowe/domains/domain.com/public_html/pub/static/_cache/merged/dff080226ea3597444c03925cb09364e.js\" Warning!rename(/home/czasowe/domains/domain.com/public_html/var/tmp/_cache/merged/dff080226ea3597444c03925cb09364e.js,/home/czasowe/domains/domain.com/public_html/pub/static/_cache/merged/dff080226ea3597444c03925cb09364e.js): No such file or directory at /home/czasowe/domains/domain.com/public_html/vendor/magento/framework/Filesystem/Driver/File.php:298)"} []
[2018-08-26 10:43:17] main.CRITICAL: The file "/home/czasowe/domains/domain.com/public_html/var/tmp/_cache/merged/dff080226ea3597444c03925cb09364e.js" doesn't exist or not a file {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): The file \"/home/czasowe/domains/domain.com/public_html/var/tmp/_cache/merged/dff080226ea3597444c03925cb09364e.js\" doesn't exist or not a file at /home/czasowe/domains/domain.com/public_html/vendor/magento/framework/Filesystem/Directory/Write.php:70)"} []

Anyone know how to solve this issue?


texts: Magento 2.1: Merge vendor menus into one?

texts:
Does anybody know of a way to "merge" extension vendors menu's into a single larger menu?

Reason I ask, is because we have 10+ 3rd party extensions installed in our site, and on the admin page, most of them, want to make their own "vendor" icon on the left menu, and most of them only link to the configuration panel, and maybe one other option.

Is there a way I could write a basic adminhtml extension that "grabs" those menu's and compiles them under one icon menu called "extensions" ?

I'm VERY new to writing modules for M2, so any/all help you can offer/suggest is greatly appreciated.


texts: Edit "Your credit card will be charged for" on onepage checkout to show desired currency

texts:
I think the picture is explaining the problem. I did a research and I simply have not enough time to create another 4 stores and set over 200 articles again and again. I would agree on removing the "Your credit card will be charged for" line completely, or change the functionallity to show the currency which was chosen by the customer.

Hope you can help :)


texts: How to display custom checkout field value in Admin Sales Order?

texts:
I have creat a custom module that adds a custom field to checkout. It is the input text field. I save this value to quote table and to the sales_order table. But now I want to display this value in admin panel Sales->Order, under Shipping Method information. How can I do this?

Thanks in advance for all the tips.


texts: How to find Customer cart overall weight?

texts: How can I find customer cart overall weight?


texts: How can i add lists of states to a country?

texts: How to add all State lists to a country India? Is it possible to add in Query or any other Magento extension available.?


texts: Add new tracking number to existing shipment using REST API

texts:
How can I add a new tracking number to an already existing shipment that was created using the following endpoint link ?
I can create the shipment for a sale/order with the initial tracking number/s, but if I use the same endpoint from above to add a new tracking number for the same order/sale, I get the following error: "you can't create a shipment without products"
Which endpoint should I use? Is it this one  or some other? I am a beginner and magento-documentation is confusing for me.


texts: Fatal error: Undefined class constant 'TYPE_TEXT' error after upgrading - magento

texts:
i am stuck with an issue. After upgrading my site from 1.5 to 1.6 i am getting this error

"Fatal error: Undefined class constant 'TYPE_TEXT' in /var..../app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade-1.4.0.13-1.4.0.14.php on line 49"

Please help me..


texts: Magento2 Product add form custom form values not posting in observer

texts:
I am Creating custom product add form in magento2.2.2.
I have added a new tab after product details & Loaded My custom phtml File into It,

First To Post Data from product form to observer, i added data-form-part="product_form" To input Fields Like:-

< input type="hidden" name="test" id="test" data-form-part="product_form" value="oldValue" / >

Now, When I click on save I called a event Like Below.

$(document).on('click','button[title="Save"], button[title="Duplicate"],  button[title="Save and Continue Edit"]',function(){
        $("#test").val('NewValue'); //Here I Changed Value According To My Requirement
});

In MyObserver.php For getting that hidden field value i used $this->_request->getPost();

By Printing Post Data of Test Hdden Input i got OldValue Instead of NewValue which is changed in jquery handler.

Any Solutions?


texts: Magento 2 upgrade from Merchant Beta to RC?

texts: Is there an established way to upgrade a Magento 2 Merchant Beta (master branch) install to the latest RC version? I haven't found a nice combination of commands / steps yet to complete an upgrade. The existing Merchant 2 Beta has the sample data already installed.


texts: Magento 2 splits order with shipstation with same order number

texts:
Can we split orders into two types?

We are using Magento2 stores.

We are using third party shipping service Shipstations

Suppose, there are 2 types of products in my website Product A & Product B,

When customer order Product A(any quantity) type product then from Magento will ship and that order information goes to shipstations and from shipstation users(admin) will decide shipping methods(carriers) - it ok for us.

In the same case, When customer order Product B(any quantity) type product then from Magento will ship and that order information goes to shipstations and from shipstation users(admin) will decide shipping methods(carriers) - it ok for us.

Now When customer order both Product A(2 items) & Product B(3 items) in a single order, Here we want to ship with different carriers like Product A must ship with Shipping A and Product B must ship with Shipping B

Please, anyone, know how it is possible.


texts:
In the current store Magento 1.9.2.1 I'm working I can't figure it out yet why disabled products appear in the frontend, for example in product view and search results.

Already reindexed, no flat catalog, no cache.


texts: Store session data as guest and get this data as logged in Customer in observer

texts:
I want to set data session when customer is not log in and if this customer logged in i want to retrive this data and i NEED to do it in observer. I used already for example this events to get data:

customer_login
controller_response_redirect
controller_action_predispatch

And for all of them my session data was cleared after logged in.

I set data like this:

$url = Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl(), array('_secure' => true));
$test =  Mage::getSingleton('customer/session')->setData('test', 'cos tam');
$test123 =  Mage::getSingleton('core/session')->setData('test123', 'cos tam12345');

And try to get like this:

$url = Mage::getSingleton('customer/session')->getBeforeAuthUrl();
$test = Mage::getSingleton('customer/session')->getData('test');
$test123 = Mage::getSingleton('core/session')->getData('test123');

How should i store this session or/and what event should i use?


texts:
I have a small request.. Is there code that I can use to change the logo link on the website to lead to /en/ on the English side and / on the Indonesian side?

This is the code right now

<?php echo $this->getLogoAlt(); ?><a href="<?php echo $this->getUrl(''); ?>" title="<?php echo $this->getLogoAlt(); ?>" class="logo"><img width="170" height="65" src="<?php echo $this->getLogoSrc(); ?>" alt="<?php echo $this->getLogoAlt(); ?>" />

The Indonesian side is linking to /id/ which isn't the homepage for that store. All of the folders have /id/ but the actual homepage is just the root /

Happy holidays :) Any help is much appreciated.


texts: Tables with non auto increment primary key

texts:
I have set-up a table in Magento that has two fields, id and date. The date is simply the set to now but the id is actually a foreign key attached to the order id.

My problem is that Magento does not save these objects, no errors happen but nothing is added to the database.


texts: Editor wysiwyg not resolve url of media directive

texts:
Currently i have normal form with editor field (wysiwyg) no-uicomponent implement.
When i insert image magento insertImage to content

but after click on button Show / Hide Editor Editor content show

Ofcourse my image not show. I expected that after click editor content must show my current image

What exactly happens, Where in code i should check to solve this problem?
i'm using Magento 2.1.2. Directory wysiwyg had full write permission


texts: Get Latest Ordered Items for a Customer Across Multiple Orders

texts:
I am trying to gather the latest 100 items a customer has purchased across all his orders. I know I can use itemCollectionFactory and go order by order, but I was wondering if there is a faster way to get directly all the items, instead of running multiple queries for each order.
With a single query, I'd also be able to make sure the same items are not shown twice in the list.
Thanks!


texts: Magneto 2 How to call Helper function in observer file

texts:
I am new to Magento development and I am using a custom MySQL query in some places like in observer/plugin etc.

These codes are repeating for all these files. so I want to make a new reusable function/class and want to call this method instead of writing the same thing in all files.

I don't know even to create controller and all, could you please help me to create this?

                $modelMaterials = $objectManager->create('Vendor\Module\Model\Grid');
                $dataMaterials=$modelMaterials->getCollection()->addFieldToFilter('entity_id', array('in' => array($material_id)))->setPageSize(1)->setOrder('entity_id','DESC');;
                if($dataMaterials->getSize()){
                     $materialsarr = $dataMaterials->getFirstItem();
                     $weight = $subject->getWeight();
                     $fineWeight = $data->getFineWeight();
                     $metalPrice = (double)$materialsarr->getAmount() * ((float)$weight + (float)$fineWeight);
                     $metalPrice += (double)$data->getSurcharge();
                     $metalValue = (double)$materialsarr->getAmount() * ((float)$weight + (float)$fineWeight);
                     $price = (double)$materialsarr->getAmount() * (double)$weight;
                     $tx_rates = (double)$materialsarr->getTax() / 100;
                     $tax = $tx_rates * (double)$metalPrice;
                     $specialPrice = $subject->getSpecialPrice();
                }


texts: Getting jQuery.browser is deprecated error in console magento 2.1.5

texts:
I keep on getting this error in my console,

JQMIGRATE: jQuery.browser is deprecated
migrateWarn @ jquery-migrate.js:41
get @ jquery-migrate.js:58
(anonymous) @ jquery.ba-hashchange.min.js:9
(anonymous) @ jquery.ba-hashchange.min.js:9
(anonymous) @ jquery.ba-hashchange.min.js:9
jquery-migrate.js:43 console.trace
migrateWarn @ jquery-migrate.js:43
get @ jquery-migrate.js:58
(anonymous) @ jquery.ba-hashchange.min.js:9
(anonymous) @ jquery.ba-hashchange.min.js:9
(anonymous) @ jquery.ba-hashchange.min.js:9

Please help!!


texts: Update Filters name which are present In Product Listing Page

texts:
I have enabled filters on Product Listing Page. I want to Update the Filters name.

For e.g - From Category To Sub Category, Price to Price Range.

Below is code from catalog/navigation/left.phtml file.

<?php
if (!Mage::registry('current_category')) {
    return;
}
?>

<?php
$categories = $this->getCurrentChildCategories();
$count = is_array($categories)?count($categories):$categories->count();
?>

<?php if ($count): ?>

                    <?php foreach ($categories as $category): ?>
                        <?php if ($category->getIsActive()): ?>

                                <a href="<?php echo $this->getCategoryUrl($category); ?>" <?php if ($this->isCategoryActive($category)): ?>class="current"<?php endif; ?>>
                                    <?php echo $this->escapeHtml($category->getName()); ?>
                                    <?php echo $category->getProductCount(); ?>

                        <?php endif; ?>
                    <?php endforeach; ?>

<?php endif; ?>


texts: search not working - Fatal error - magento 2

texts:
My website is in Magento ver. 2.2.3

early my search functionality was working properly ..but no idea suddenly from last week i am getting below error message ...

  Fatal error: Uncaught Error: Call to a member function getNext() on
  null in
  /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php:1465
  Stack trace: #0
  /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php(13):
  Magento\Catalog\Block\Product\ListProduct\Interceptor\Interceptor->___init()
   #1 /home/website/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111):
  Magento\Catalog\Block\Product\ListProduct\Interceptor\Interceptor->__construct(Object(Magento\Catalog\Block\Product\Context),
  Object(Magento\Framework\Data\Helper\PostHelper),
  Object(Magento\Catalog\Model\Layer\Resolver),
  Object(Magento\Catalog\Model\CategoryRepository\Interceptor),
  Object(Magento\Framework\Url\Helper\Data), Array) #2
  /home/website/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66):
  Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Catalog...',
  in
  /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php
  on line 1465

below is above path interceptor.php code line 1465:

/**
 * {@inheritdoc}
 */
public function ___init()
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, '___init');
    if (!$pluginInfo) {
        return parent::___init();
    } else {
        return $this->___callPlugins('___init', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function ___callParent($method, array $arguments)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, '___callParent');
    if (!$pluginInfo) {
        return parent::___callParent($method, $arguments);
    } else {
        return $this->___callPlugins('___callParent', func_get_args(), $pluginInfo);
    }
}

i tried :

rm -rf generated
rm -rf var/cache
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento cache:flush

and then

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

but still getting above error message .... as new to magento2 - no idea what going wrong ...

thanks


texts: Magento 1 Enterprise to Magento 2 Open Source Migration

texts: We are looking my migrate a site from Magento 1 Enterprise to Magento 2 Open Source. I am aware of how complicated a process this is and was just wondering if anyone knows of any tools to do this. Has anyone used Cart2Cart for this migration(if so how was their service?).


texts:
Please help me guys to fix it :

Fatal error: Class 'Mage_Parcelamento_Helper_Data' not found in C:\wamp64\www\magento\app\Mage.php on line 547

Error log

  Warning: include(Mage\Parcelamento\Helper\Data.php): failed to open
  stream: No such file or directory in lib\Varien\Autoload.php on line
  94

I'm not a programmer, it's so hard. Can you help me , please ?

Module


texts: Include associated products when checking if product is discounted to show sales tag in list

texts:
I'm currently showing a sale tag on products that are discounted in list.phtml:

$now = date("Y-m-d H:m:s");
$specialprice = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
$special_from_date = $_product->getSpecialFromDate();
$special_to_date = $_product->getSpecialToDate();

<?php if (($specialprice && ($special_from_date <= $now) && ($special_to_date >= $now || $special_to_date =="" ))) { ?>

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

<?php } endif; ?>

This works well, however if a product is a grouped product type and one of it's associated products is discounted, the sale tag does not show so I somehow need to include associated products when checking if the product is discounted.

The list template is just using the default loaded collection currently:

$_productCollection=$this->getLoadedProductCollection();

foreach ($_productCollection as $_product)

I believe I can get any associated products with the following?

$associatedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product);

Not quite sure how the best way of working this into the checking of whether the product is discounted or not though...


texts: Why my magento-1 website is showing as not secure?

texts:
I have worked on website https://puppetkart.com/

I have bought ssl certificate from the hosting provider.

I have configured in admin panel also.

But, stil website is showing as not secure at url

Note : Current domain is add-on-domain for another domain


texts: Does Magento 1.4.0.1 support PHP 5.4? Our service provider is upgrading the server's PHP soon and upgrading Magento to the most recent version is not possible with the given time frame.


texts: Magento2: Not able to check uncheck a Checkbox value while editing the page?

texts:
I am not able to check and uncheck a Checkbox value and save in edit page in Magento2:

My input field:

 Shipping
                    <input type="checkbox" name="product[shiping]" id="shiping" value= 1 <?php if($product_coll->getShipingValue() == 1){ echo "checked='checked'"; }?> class="checkboxvalue">

Any help would be appreciated.


texts:
Does Magento 2 have a profiler?  The

Stores -> Settings -> Configuration -> Developer -> Debug

panel still exists, but there's no settings for a profiler there.

If Magento 2 does have a profiler, is it configurable via the GUI?

If it's not configurable with the GUI, how do you enable it?


texts:
I am using magento 1.9. I have upgraded hostmonster server and before upgrading the website was working fine. After upgrading the server now images are not showing on frontend and backend.
I have tried a lot and searched the solution but unable to resolve the issue.
Any guidance or hint will be appreciated.


texts: How to auto fill the shipping address field

texts:
I'm a beginner magento 2 user. Now, I want to set some default value in the shipping address's field, could you teach me what should I do? What file should I need to code?

Thank very much.

The below image is my expect result:


texts: Unit Price tax method with discount: bug or a feature?

texts:
Magento CE 1.7. Say, I have a product, $1799.99 (incl. 8.25% tax) and a 10% off coupon (-$180.00 discount amount). The "Apply Customer Tax" option is set to After Discount, and I am using the "Unit Price" tax calculation method. While debugging I landed at this code that calculates the tax total:

case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
    $discountAmount     = $item->getDiscountAmount() / $qty;
    $baseDiscountAmount = $item->getBaseDiscountAmount() / $qty;

    $unitTax = $this->_calculator->calcTaxAmount($price, $rate, $inclTax);
    $discountRate = ($unitTax/$price) * 100;
    $unitTaxDiscount = $this->_calculator->calcTaxAmount($discountAmount, $discountRate, $inclTax, false);
    $unitTax = max($unitTax - $unitTaxDiscount, 0);
    $baseUnitTax = $this->_calculator->calcTaxAmount($basePrice, $rate, $inclTax);
    $baseDiscountRate = ($baseUnitTax/$basePrice) * 100;
    $baseUnitTaxDiscount = $this->_calculator
        ->calcTaxAmount($baseDiscountAmount, $baseDiscountRate, $inclTax, false);
    $baseUnitTax = max($baseUnitTax - $baseUnitTaxDiscount, 0);

app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php, line 379

Note how $discountRate is obtained: instead of using the tax rate applied to calculate the unit tax it calculates its own value that can be expressed in terms of $rate as $discountRate = $rate / (1 + $rate), or, given $rate = 8.25% (0.0825): 0.0825 / 1.0825 = 0.0762. The discount tax calculated with this rate is then $12.75 and leads to the tax total of $137.18 - $12.75 = $124.43.

Interesting is that in the same routine a few lines below, the hidden tax (i.e. discount amount tax) is calculated using the $rate value (0.0825 in my example):

if ($inclTax && $discountAmount > 0) {
    $hiddenTax      = $this->_calculator->calcTaxAmount($discountAmount, $rate, $inclTax, false);
    $baseHiddenTax  = $this->_calculator->calcTaxAmount($baseDiscountAmount, $rate, $inclTax, false);
    $this->_hiddenTaxes[] = array(
        'rate_key'   => $rateKey,
        'qty'        => $qty,
        'item'       => $item,
        'value'      => $hiddenTax,
        'base_value' => $baseHiddenTax,
        'incl_tax'   => $inclTax,
    );

app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php, line 393

This “hidden tax” total (in my example: $180 - $180 / (100 + 8.25%) / 100 = $13.72) is later used to calculate the grand total, as in sum of net subtotal, tax and hidden tax, minus discount: $1662.81 + $124.43 + $13.72 - $180.00 = $1,620.96. The problem here is that while calculating the tax total the system has used two different rates on the same discount amount! Is it a bug or a feature?


texts: Magento 2: How to change price formatting for the API interface?

texts:
I need for the (soap) sales order API all prices with 4 decimal places.

Example:

9.45 => 9.4500

But only for the API not for other prices! I know the prices are already stored with 4 decimal places in the database. But I have no idea how I can change the API output.

Thank you and regards,
Michael


texts: how to route to the configuration page for specific module?

texts:
i am facing a route in my action attribute this url 'adminhtml/system_config/edit/section/Mymodule' but i have no idea for what is this separately or where they have declared it, for example what is this action value means :

 <add id="Vendor_Module::resource_config"
             title="Configuration"
             module="Vendor_Module"
             parent="Vendor_Module::resource"
             resource="Vendor_Module::resource_config"
             action="adminhtml/system_config/edit/section/Mymodule"
        />

what does (action="adminhtml/system_config/edit/section/Mymodule") means?


texts: Getting quote (cart) items programatically shows duplicate SKUs for both the configurable and simple product

texts:
I'm getting the shopping cart using:

$cart = Mage::getSingleton('checkout/session')->getQuote();

And then iterating through it using:

foreach ($cart->getAllItems() as $item) { }

But it seems to be returning duplicate items with the same SKUs, but different product ids! On the main site, when I open the cart, however, it shows the single product.

cart: {
    id: 680,
    items: [
        {
            name: "Tori Tank",
            price: "60.0000",
            id: "418",
            sku: "wbk004"
        },
        {
            name: "Tori Tank",
            price: "60.0000",
            id: "286",
            sku: "wbk004"
        }
    ]
}

My question is.. Why is this happening? Shouldn't the parent (configurable) product be showing its own unique Sku?

Also, if I want to add a product to the cart, should I add the configurable product? Or do I add the simple product and Magento handles the rest?


texts: How do I undo the installation of an extension? Getting "Base table or view not found" for "eav_attribute" table

texts:
I tried to install the "Amazon Payments" extension in my Magento 1 community edition, and the installation didn't go through. Now when I try to access my Magento site, I get an error. The error is the following:

a:5:{i:0;s:478:"Error in file: "/mysite/mag/app/code/community/Amazon/Payments/sql/payments_setup/install-0.1.0.php" - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'carving_magento.mageav_attribute' doesn't exist, query was: SELECT `main`.*, `additional`.* FROM `mageav_attribute` AS `main`
 INNER JOIN `magcatalog_eav_attribute` AS `additional` ON main.attribute_id = additional.attribute_id WHERE (main.attribute_code = :id) AND (main.entity_type_id = :entity_type_id)";i:1;s:932:"#0 /mysite/mag/app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /mysite/mag/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.4.0')
#2 /mysite/mag/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.4.0')
#3 /mysite/mag/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /mysite/mag/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /mysite/mag/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /mysite/mag/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /mysite/mag/index.php(85): Mage::run('', 'store')
#8 {main}";s:3:"url";s:10:"/mag/admin";s:11:"script_name";s:14:"/mag/index.php";s:4:"skin";s:7:"default";}

From the error, I notice that it's looking for a database table that I don't have:

Table 'carving_magento.mageav_attribute' doesn't exist

NOTE: All my tables are prefixed with "mag" so the real table is "eav_attribute" which also doesn't exist in my DB

You can view the full "install-0.1.0.php" script from Amazon Payments here.

How do I undo the installation of this extension?

Or should my next step be trying to create the "eav_attribute" table as described here?

I restored my database back to yesterday's database using my host (Dreamhost)'s control panel. This didn't help; it is still trying to install the extension when I try to get to my magento admin control panel.

There are also instructions from Amazon Payments on how to install the extension here.


texts:
I getting this warning when I test in online seo tester.

Warning, no 301 redirects are in place to redirect traffic to your
preferred domain. Pages that load successfully both with and without
www. are treated as duplicate content!

Also like below.

Search engines see www.example.com and example.com as two different
websites with the same content. This causes them to see a lot of
duplicate content, which they don't like.
Right now your website is not directing traffic to www.example.com and
example.com to the same URL. It is crucial that you fix this.
Use the rel="canonical" tag to tell search engines which is the
definitive version of your domain. Use a 301 redirect to divert
traffic from your secondary domain.
This issue can be caused by problems with a website's SSL
configuration. Check your site's SSL configuration for any errors.
If you need help resolving issues with your SSL configuration,
consider using a professional service to set it up for you.

How could I redirect www to https. Also dynamic canonical tags. Please suggest!!


texts: How to set custom certificate for Node in Magento PWA?

texts:
I use remote staging server to test my PWA application which is under development and based on Magento 2.3 Venia theme. I see the Node instance generates devcert certificate automatically on application run. But it is not trusted by browsers of course. I have my own Lets encrypt certificate for staging domain and want to force using it for my application.

How can I do it? I found only instructions of how to specify custom cert files for Express.js app, but Magento 2 PWA studio is quite complex and I don't know where should I specify it.


texts: If category has image then show if not don't

texts:
I want my categories to have the image above the content and the left column, whilst using 2columns-left.phtml and don't want an image placeholder showing if there's no image. So I need an if statement but not sure how to go about it!

Here's my code so far

<?php $categoryImage = Mage::getModel('catalog/layer')->getCurrentCategory()->getImage(); //Get the file name of the Image stored for the category ?>

<img src="<?php echo Mage::getBaseUrl('media').'catalog/category/'.$categoryImage  ?>" />

If anyone could help that would be much appreciated.


texts: Syntax error or access violation: 1064 issue , Magento 2

texts:
if news_to_date is empty i get syntax error, how can i check if news_to_date is empty or not? Code below, thanks
\Magento\Framework\Stdlib\DateTime\DateTime $stdlibDateTime,

$currentTime = $this->_date->date();
$collection = $this->_productCollectionFactory->create();
$collection->addAttributeToSelect('*');
$collection->addAttributeToSelect(array('entity_id','sku'));
$collection->addFieldToFilter('news_from_date', ['lteq' => $currentTime])
        ->addFieldToFilter('news_to_date', ['gteq' => $currentTime])
        ->setOrder('sort_order', 'ASC');


texts: I want to change content in checkout page but can not find it

texts:
After reaching the shopping cart and clicking checkout we get the page: checkout/onepage

it is the regular step by step checkout and it is called onepage

here is my question:

In step 1 of this page there is some info like : register and save time!

I want to have some different lines of text that better cover what we want to tell our customers.

In what file should i do that? i have searched in app/design/frontend/.../templates/html/ but i can't find a file that has this info...

And...

can i put that also in the translation files after that.?


texts:
I am trying to add column existing table sales_flat_order but it's returning an error

Can't retrieve entity config: sales/sales_flat_order

my code is:

<?php
 //@var $installer Mage_Sales_Model_Entity_Setup
$installer = $this;
$installer->startSetup();
$installer->run("
ALTER TABLE `{$installer->getTable('sales/sales_flat_order')}` ADD `giftwrap` SMALLINT NULL;
ALTER TABLE `{$installer->getTable('sales/sales_flat_order')}` ADD `giftwrap_price` DECIMAIL(12,5) NULL;
");
$installer->endSetup();

can I know where I went wrong?

thanks.


texts: How do validate checkoutpage Review & Payments billing address form

texts: I have no about this validation. And I can't find where this code coming from. Please give some ideas, How to validate this form


texts: Get Product Image with specific Role in Magento 2

texts:
Does anyone know how to get the image with a specific role from a product. For example, I've created a new role called 'global' and assigned one of the product images to that role. How can I get that image ?

Thanks


texts:
I had dozens of informtive links bookmarked.. Now they're all gone.

For example
https://www.magentocommerce.com/wiki/1_-_installation_and_configuration/using_collections_in_magento

Now all it does is forward me to the main page the new 'documentation', which has none of these things..


texts: Magento 2: How to reindex specific indexer method in Magento 2 programatically

texts:
I can reindex a specific indexer method by following way in Magento 1.x

$process = Mage::getModel('index/indexer')->getProcessByCode('catalog_product_price');
$process->reindexAll();

How to reindex catalog_product_price indexer in Magento 2.x


texts:
The DHL shipping method is not working in my magento Entriprise edition 1.12.0.2. I have enabled it from the Admin and it is displaying the error message specified in the configuration when trying to use it on the frontend.

I am getting the following error in the DHL error log:

  2015-04-27T10:59:16+00:00 DEBUG (7): Array
  (
      [0] => Error parsing body - doesn't seem to be a chunked message
      [1] => The response is in wrong format.
      [__pid] => 30216
  )

Please let me know if any one has experienced the same problem?


texts: How I set the customer based discount on Magento 2?

texts:
I want to set customer based discount in Magento 2.

For example: Xyz 10 % discount ABC 5 % discount.


texts: Magento 2.x - Menu not showing for custom role in custom module

texts:
I am working Magento 2.x custom module. I have setup ACL rules for this but it is not showing Menu of custom module for custom user roles.

  acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="technologymindz::base" title="TM Tag Manager" sortOrder="10" >
                    <resource id="technologymindz_googletagmanager::googletagmanager" title="General Settings" sortOrder="10" />
                </resource>
            </resource>
        </resources>
    </acl>
</config>

  menu.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Backend/etc/menu.xsd">
    <menu>
        <add id="technologymindz::base" title="TM Tag Manager" module="Technologymindz_GoogleTagManager" sortOrder="10" resource="Technologymindz_GoogleTagManager::sample"/>

        <add id="technologymindz_googletagmanager::googletagmanager" title="General Settings" module="Technologymindz_GoogleTagManager" sortOrder="10" parent="technologymindz::base" action="technologymindz_googletagmanager/items/" resource="Technologymindz_GoogleTagManager::items"/>
    </menu>
</config>

custom module menu listing in resource list and setting is saved.

But when login and check for custom user role, it is not showing.

  Index Controller is using permission

protected function _isAllowed()
{
 return $this->_authorization->isAllowed('technologymindz::base');
}

I have used static content deploy and cache flush


texts: How to know Admin user password in Magento 1.9

texts:
I have many admin users in my magento backend. I want to know one particular user's password, but password stored like below image.

How to know that user's password without reset password.

Is there any way in magento.?


texts: How to add and delete order in existing order uisng rest api in Magento 2

texts: How to add and delete products in existing order using rest api in Magento 2.Any modules available for add order in existing order in Magento 2


texts: Magento 1.8 Load More product button showing Uncaught Syntax error, unrecognized expression: [object HTMLButtonElement] in console

texts:
Am using coolbaby theme in magento 1.8. Here am trying to add load more product, but i got error message in console

  prototype.js:3574 Uncaught Syntax error, unrecognized expression: [object HTMLButtonElement]

i refer this link Reference Link

to add this code in app/design/frontend/coolbaby/default/template/catalog/product/list.phtml

Follwing my code:

list.phtml

<div style="text-align:center;">
   <button id="load-more-products" class="button btn-info">Load more products</button>
</div>
<script>
   function sendLoadMoreProductsRequest(url) {
            new Ajax.Request(url, {
                onSuccess: function(response) {
                    //Create dummy element
                    var div = document.createElement('div');
                    div.innerHTML = response.responseText;
                    //refresh the page class element
                    $$('.pages')[0].innerHTML = $(div).select('.pages')[0].innerHTML;
                    //append the list to the existing product list
                    $$('.category-products')[0].innerHTML += $(div).select('.category-products')[0].innerHTML;
                    //check if there are more products to be loaded or not
                    if(!$(div).select('.next.i-next')[0]){
                        $('load-more-products').style.display = "none";
                    }
                }
            });
         }

         function callbackFunc(e) {
            if($$('.next.i-next')[0]){
                var nextPageUrl = $$('.next.i-next')[0].readAttribute('href');
                sendLoadMoreProductsRequest(nextPageUrl);
            }
            else{
                //hide button
                $$(e.currentTarget).hide();
            }
         }

         //Assigning click event to the button which triggers the "next" link
         $('load-more-products').observe('click', callbackFunc);

</script>
<script>
   //<![CDATA[
          //check if there are more products to be loaded or not
          if($$('.next.i-next')[0]){
              $('load-more-products').style.display = "none";
          }

          function testScroll(ev){
              if($$('.scroll-to-top')[0]){
                  console.log(window.pageYOffset);
                  if(window.pageYOffset>400){
                      $$('.scroll-to-top')[0].style.display = "block";
                  }
                  else{
                      $$('.scroll-to-top')[0].style.display = "none";
                  }
              }
          }
          window.onscroll = testScroll;
      //]]>
</script>

When i click Load more products button it showing error in console and product not loaded.

  Note: Am tried Strategery / InfiniteScroll also its not working coolbaby theme.

How can i fix this error please help in this...!


texts: Trouble overriding layout file in Magento 2

texts:
I'm using Magento 2.02
I've created my own theme called 'cff', which is based on Luma.

I'm trying to remove the catalog.compare.link block in top.links

The layout for this block seems to be defined in

/vendor/magento/module-catalog/view/frontend/layout/default.xml

And if I add

<referenceBlock name="catalog.compare.link" remove="true" />

in that file, then as expected the 'Compare Products' text disappears from the top.links block.

However, I know I'm not supposed to change vendor files. So I'm looking for the correct folder in which to create my own default.xml file to place the remove code:

I've looked everywhere in the documentation and online but cannot find this info. I've tried several locations, none of them work. I thought this one should work but it doesn't either:

/app/design/frontend/cff/cff/Magento_Catalog/layout/default.xml

Please can someone tell me where the override layout should go?

This is the code inside my overriding layout default.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>
        <referenceBlock name="catalog.compare.link" remove="true" />
    </body>
</page>


texts: Magento patches / leave in directory or delete?

texts: Once a patch has been applied, does the patch file need to be deleted from the httpdocs directory? Or is leaving it there any kind of security risk? Or doesn't it matter?


texts:
I would like to change my header when I went to another page, but I am not able to put my html file. I searched before coming here to ask, I tried this way, but just remove the header, I can not add another.

ultimo/default/layout/local.xml

<checkout_cart_index>
    <reference name="checkout.cart">
        <remove name="header" />
        <block type="page/html_header" name="header" template="page/html/header_checkout.phtml"/>
        <block type="cms/block" name="block_cart_below_table">
            <action method="setBlockId"><block_id>block_cart_below_table</block_id></action>
        </block>
        <block type="cms/block" name="block_cart_below_totals">
            <action method="setBlockId"><block_id>block_cart_below_totals</block_id></action>
        </block>
    </reference>
</checkout_cart_index>

ultimo/default/template/page/html/header_checkout.phtml

test


texts: How to override .phtml files in Magento 2 for backend

texts:
I want to customize image file upload tab, So it required to override some .phtml files in following locations.

So I want to know, how to override .phtml files in

/vendor/magento/module-backend/view/adminhtml/templates/media/uploader.phtml


texts: Onepage checkout not working after upgrade

texts: I upgraded my site from Magento 1.7 to 1.8 but the onepage checkout is not working.I can never go to shipping method step.the continue button does nothing. I tried by modifying info.phtml and payment.phtml but no success. I have gone through the previous answers of same question and i tried everything. So THIS IS NOT A DUPLICATE QUESTION.


texts: is we need to pay and return to site successfully to get paypal order confirmation email

texts:
we are not getting order confirmation email if customer placed an order through paypal.but we get invoice and shipment mails.

we set Sale : Payment Action in paypal configuration.

so once we create the order, along with the order email [its not going to customer] i want to send invoice mail also to customer. i think this extension will send invoice only once order status become complete.

if we use SMTP extension will it work for us ?

is there any thing else we need to do ?

Edit

also I want to know is Email will send only if we pay money and succesfully return to site ? If we just click on "place order" & redirect to paypal page, will it not send email ?

2016-06-13T20:15:10+00:00 ERR (3):
exception 'Mage_Paypal_UnavailableException' with message 'Empty response.' in /home/site/public_html/app/code/core/Mage/Paypal/Model/Ipn.php:166
Stack trace:
#0 /home/site/public_html/app/code/core/Mage/Paypal/Model/Ipn.php(116): Mage_Paypal_Model_Ipn->_postBack(Object(Varien_Http_Adapter_Curl))
#1 /home/site/public_html/app/code/core/Mage/Paypal/controllers/IpnController.php(43): Mage_Paypal_Model_Ipn->processIpnRequest(Array, Object(Varien_Http_Adapter_Curl))
#2 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Paypal_IpnController->indexAction()
#3 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#4 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /home/site/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/site/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/site/public_html/index.php(87): Mage::run('', 'store')
#8 {main}


texts:
I am getting following error in my Browser's console.

Any suggestions are welcome.

  "NetworkError: 403 Forbidden - www.example.com/skin/frontend/mytheme/default/"


texts: How to move Review section in product page?

texts:
We would like to move the review to the right side in product page as below.

On the picture below where there is a red X that is where the product description text can be and where there is a red O that is where we need to move the review section

Could anyone please help me with this?


texts: CE1.9.2.4 - how to remove column from Customer Adminhtml Grid

texts:
I've successfully extended the core Customer Grid to show some custom attributes, but also need to remove the Country column - the site in question only operates in one country, so it's unnecessary and takes up space on smaller screens.

I've tried:

protected function _prepareColumns(){
    $this->removeColumn('billing_country_id'); // <---- this does not work :(
    $this->addColumnAfter('department', array(
        'header'    => Mage::helper('customer')->__('Department'),
        'index'     => 'department'
    ),'email');

    return parent::_prepareColumns();
}

but this does not seem to work. Is there another method that I can use?


texts: Payment methods not working in Magento 2.0

texts:
On our website wijnmaat.nl we are trying to integrate the paypal, bank transfer and Ideal payment methods. We were able to get the bank transfer working but the Ideal and Paypal pay methods are giving us a 500 internal server error:

Problem: Paypal according Google Chrome console

PUT http://www.wijnmaat.nl/rest/netherlands/V1/carts/mine/selected-payment-method 500 (Internal server error)

 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Object.process (error-processor.js:19)
at Object.<anonymous> (set-payment-method.js:50)
at j (jquery-2.1.4.min.js:2)
at Object.fireWith [as rejectWith] (jquery-2.1.4.min.js:2)
at x (jquery-2.1.4.min.js:4)
at XMLHttpRequest.<anonymous> (jquery-2.1.4.min.js:4)process @ error processor.js:19 (anonymous) @ set-payment-method.js:50 j @ jquery-2.1.4.min.js:2 fireWith @ jquery-2.1.4.min.js:2 x @ jquery-2.1.4.min.js:4(anonymous) @ jquery-2.1.4.min.js:4


texts:
I'm trying to understand how Magento is calculating the total amount for an order when using a coupon discount.

The item purchased is $554.26 without taxes.
The tax is 8.25%.
The coupon discounts 10% from the order.

The settings are Apply Customer Tax after discount, and Apply Discount On Prices excluding tax.

Shouldn't the total be calculated in this manner:
554.26(subtotal) - 55.42(discount) = $498.84
$498.98 + 8.25% ($41.17) = $540.15

Maybe I still don't understand exactly how the Apply Customer Tax and Apply Discount On Prices actually work.

Any idea how Magento is doing the calculations ?

Thanks.

PD: I'm using a vanilla install of Magento 1.12.0.2


texts: Show notice in admin order grid based on filter

texts:
Background

I am migrating a site to the Magento platform.  I have a requirement to notify the admin if they're searching for an order that comes from the old platform.  I have table of old orders.  I'm trying to use an observer, so that when the admin tries to filter by Order Number, I can see if that number matches an order from the old system.  If it does, I want to display a notice telling the admin that they can find details on this order by logging into the old system.

What I've tried

In my observer I have

$block = Mage::app()->getLayout()->getBlock('sales_order.grid');
foreach ($block->getColumns() as $column) {
    if ($column->getIndex() == 'increment_id' && $column->getFilter()->getValue()) {
        $value = $column->getFilter()->getValue();
        if ($this->orderExistsInOld($value)) {
            Mage::getSingleton('core/session')->addNotice($value . ' is from the old system.');
            break;
        }
    }
}

Here I am detecting if the admin has entered a filter value for increment_id.  If it does, I check the old system with orderExistsInOld.  If a match is found I display a notice.

The problem

I can't seem to find the event I should be using my observer on.

controller_action_predispatch_adminhtml_sales_order_grid is too early.  The block hasn't been rendered and the filters aren't set.
controller_action_postdispatch_adminhtml_sales_order_grid is late enough that filters are set and my conditions work.  However, it's so late that the session notice isn't being shown.  You can only see it after a refresh.

I've also tried various abstract block render events I checked for the order grid but I can't seem to get it work.

How can I show a notice in the admin grid based on the current filters?


texts:
Question is about Magento 1.8

While creating order in the admin panel -> Sales -> Orders -> Create New Order

When I add products, I can change the price to "Custom Price" and Update Items as below;

What I want

... What I want is to hook the event when we click "Update Items and Qty" to modify the price by some percentage.

What I have tried

I created a simple extension for observer for sales_quote_save_before but it's not firing the event, full config is below

<?xml version="1.0"?>
<config>
    <modules>
        <MyTest_Quote>
            <version>0.0.1</version>
        </MyTest_Quote>
    </modules>
    <adminhtml>
        <models>
            <MyTest_Quote>
                <class>MyTest_Quote_Model_Observer</class>
            </MyTest_Quote>
        </models>
        <events>
            <sales_quote_save_before>
                <observers>
                    <MyTest_Quote_price_observer>
                        <class>MyTest_Quote_Model_Observer</class>
                        <method>__set_quote_price</method>
                    </MyTest_Quote_price_observer>
                </observers>
            </sales_quote_save_before>
        </events>
    </adminhtml>
</config>

I may not be using the correct hook? Can you please help me with this, I want to interpret the the custom price added to modify it.

Thanks in advance.


texts: How to change breakpoint for custom theme in magento 2 using view.xml?

texts: I want change breakpoint for mobile view in custom theme magento 2 using view.xml


texts: Custom attribute value required in catagory page by using plugins

texts:
I want to add value my custom attribute in catagory product page
i am using this code "$temp= $subject->getCustomAttribute('option')->getValue();"
it give me  a value but value is not in my attribute it give me wrong value please help me


texts: Add a free gift that has different sizes set via custom options?

texts:
I am currently building a site and I am looking to give customers a free item of clothing with every purchase. I am using this extension below to try to achieve this:

http://www.magentocommerce.com/magento-connect/gift-rules-5571.html

When the customer orders anything from the site they should see a free pair of slippers appear in the basket. However the issue is that everyone needs to select the shoe size so they get the right ones.

I tried creating a product that had a required custom field of "Size" but when I added the rule to put that item as a free gift the system crashed and this was because the item was added with a required field that was empty.

Then I made that field not required and it worked thinking that the customer could edit the product in the basket and pick a different size, however when they do that a new pair of slippers is added to the cart at full price and the one set as gift isn't updated.

Has anyone got any ideas on how I can achieve this using either the extension I have installed or by another way?

Thanks


texts:
We recently stopped using magmi and we have gone back to the magento dataflow profiles to upload product data. One problem we are having though is with images.

This is what our upload CSV looks like:

sku,image,small_image,thumbnail
MCS-000000,/000000k.jpg,/000000k.jpg,/000000k.jpg
MCS-100000,/100000k.jpg,/100000k.jpg,/100000k.jpg
MCS-200001,/200001k.jpg,/200001k.jpg,/200001k.jpg
MCS-200002,/200002k.jpg,/200002k.jpg,/200002k.jpg
MCS-200101,/200101k.jpg,/200101k.jpg,/200101k.jpg
MCS-200102,/200102k.jpg,/200102k.jpg,/200102k.jpg
MCS-200103,/200103k.jpg,/200103k.jpg,/200103k.jpg

It's pretty standard stuff, and matches all examples I have seen.

The problem we are getting is this, the images are assigned to the product without a problem, but magento is not setting the images as default images. See here on the admin panel for a product.

To make the image appear where it should we have to manually click each checkbox and save the product.

I have tried indexing, clearing cache... all that sort of stuff.

I really am lost, what error am I making here?

Thanks


texts:
I get all stores by website but i want to exclude someone, his ID is=1 and his name is:store1.

to get all store by websites:

$websiteId=1;
$website = Mage::getModel('core/website')->load($websiteId);
foreach ($website->getGroups() as $group) {
        $stores = $group->getStores();
        foreach ($stores as $store) {
            echo $store->getId() ." ".$store->getName()."<br/>";
        }
    }

Someone knows how to do it with a collection ?


texts: How to add custom button in header.phtml which do custom functionality?

texts: I have created custom module and I need to add button in header.phtml which 'onclick' will call a method from my module but i'm not sure how to do this. Should I create block and template or any other way? Can you give me some tips because "View" part is still a mystery for me.


texts: how to add expires headers in magento cloud?

texts:
I have problem with expires headers.

I am using magento cloud with nginx server.


texts: Limit REST API access to specific store view

texts:
I am looking for a way to limit the access for specific REST users/roles to specific stores.

I am aware that I can pass a /store/storeid parameter for a GET products call, but I can´t use that with orders or customers for example. And to be honest, that call is everything i have found while looking for this topic.

Furthermore this won´t help me when someone is pulling data from a wrong store (multi store system) or from a test store within the Magento instance.

Has anybody got some ideas, code or whatever where to look and what to look for? I have searched for plugins but found none and I don´t want to change the core to lock it down to one store (if that´s possible at least).


texts: After magento upgrade to 2.3.0 product image background suddenly not transparent

texts:
After upgrading magento from 2.2.3 to 2.3.0 only SOME of the product images suddenly have a background color similar to product color. All product images in attachment are the same file type.

Does anybody experience the same issue?

Thanks for suggestions!


texts: How can I stop Magento from appending SKU?

texts:
So I have a bunch of products with custom options and I would like to stop Magento from appending those other SKUS for these orders.

This is how it shows: SKU1-CUSTOMOPTION1SKU-CUSTOMOPTION2SKU

How can I get it to only show the main products SKU? SKU1

  public function getSku($product)
    {
        $sku = $product->getData('sku');
        if ($product->getCustomOption('option_ids')) {
            $sku = $this->getOptionSku($product, $sku);
        }
        return $sku;
    }

    /**
     * Default action to get sku of product with option
     *
     * @param \Magento\Catalog\Model\Product $product Product with Custom Options
     * @param string $sku Product SKU without option
     * @return string
     */
    public function getOptionSku($product, $sku = '')
    {
        $skuDelimiter = '-';
        if (empty($sku)) {
            $sku = $product->getData('sku');
        }
        $optionIds = $product->getCustomOption('option_ids');
        if ($optionIds) {
            foreach (explode(',', $optionIds->getValue()) as $optionId) {
                $option = $product->getOptionById($optionId);
                if ($option) {
                    $confItemOption = $product->getCustomOption(self::OPTION_PREFIX . $optionId);

                    $group = $option->groupFactory($option->getType())
                        ->setOption($option)
                        ->setListener(new \Magento\Framework\DataObject());

                    $optionSku = $group->getOptionSku($confItemOption->getValue(), $skuDelimiter);
                    if ($optionSku) {
                        $sku .= $skuDelimiter . $optionSku;
                    }

                    if ($group->getListener()->getHasError()) {
                        $product->setHasError(true)->setMessage($group->getListener()->getMessage());
                    }
                }
            }
        }
        return $sku;
    }


texts:
I am looking to change some css settings on my Magento 2.1.8 store.

I understand that this file is created using .less files, but which less files is this made up of and where can i find them?

Thanks.


texts:
How can I add my Google fonts in the Magento2 head in layout file?

Does anyone have the dea?


texts: Two Tables, Cannot retrieve entity config on second table when joining tables

texts:
Problem
I'm creating a simple module that contains two tables named:

city_faq
city_faq_section

I'm having a difficult time joining city_faq with city_faq_section.  Each time I try to do so, I receive the following error:
Can't retrieve entity config: city_faq/city_faq_section.
Additional Information
UPDATE:
After a few hours of debugging, it appears that the problem may stem from the model calling the collection, City_Faq_Model_Faq.  In its constructor, I have $this->_init('city_faq/faq');, but this may not be correct.  Would this cause the above error?
Here is my join call:
/** $this refers to City_Faq_Model_Resource_Faq_Collection **/
    $this->join(
        array('sections' => $this->getTable('section')),
        'main_table.section_id = sections.section_id',
        array('sections.*')
    )
    ->setOrder('sections.sort', self::SORT_ORDER_ASC)
    ->setOrder('main_table.sort', self::SORT_ORDER_ASC);

Clearly, I'm choking on $this->getTable('section') - however, if add the following right above the join call, I see the correct table in the log file (city_faq_section), so it appears that the config is read correctly.
    Mage::log($this->getTable('section'))

The pertinent section of my config.xml looks like this:
<config>
    <modules>
        <City_Faq>
            <version>0.2.0</version>
        </City_Faq>
    </modules>
    <global>
        <helpers>
            <city_faq>
                <class>City_Faq_Helper</class>
            </city_faq>
        </helpers>
        <models>
            <city_faq>
                <class>City_Faq_Model</class>
                <resourceModel>city_faq_resource</resourceModel>
            </city_faq>
            <city_faq_resource>
                <class>City_Faq_Model_Resource</class>
                <entities>
                    <faq>

city_faq

                    </faq>

city_faq_section

                </entities>
            </city_faq_resource>
        </models>
        <blocks>
            <city_faq>
                <class>City_Faq_Block</class>
            </city_faq>
        </blocks>
        <resources>
            <city_faq_setup>
                <setup>
                    <module>City_Faq</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </city_faq_setup>
        </resources>
    </global>
</config>

Both tables (city_faq and city_faq_section) exist.  I'm sure I'm missing something silly.  What's interesting, is when completing the join call, the class City_Faq_Model_Resource_Faq is instantiated but City_Faq_Model_Resource_Section is not.  This leads me to believe that this is the issue.
Things I've tried

I've tried  $this->getTable('city_faq/section')
I've even tried setting directly via $this->getTable('city_faq_section')

File Structure
-City
    -Faq
        -Model
            -Resource
                - Faq
                    . Collection.php
                . Faq.php
                . Section.php
            . Faq.php
            . Section.php

        -sql
            -ciy_faq_setup
                . mysql4-install-0.2.0.php
        -etc
            . config.xml


texts: Backend + Frontend gone after Upgrade from 2.0.7 - 2.1.0 (Magento2)

texts:
Can't access backend nor frontend after upgrade...
That's what i can see:

  Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read
  Magento System Requirements.

Got it already running with PHP 7.0.6

Tried:

php bin/magento setup:upgrade

Which gives me:

[Magento\Framework\Exception\LocalizedException]
Area code is already set


texts: Search results - item count doesn't match up to actual count

texts:
Getting a weird issue on my Magento search results page.

Basically, it says "17 item(s)" in the header, yet if I manually count them up, I only have 12!

That was by selecting "all" from the item drop down. If I select "15", it gives me an additional page where it tells me there's no results.

It uses fulltext, but I've tried it with like, with a similar outcome. I've also reindexed and cached the heck out of it, but to no avail.

Struggling to think why it suggests there are 5 extra products coming through.

Can anyone help?


texts:
I would like to remove the 'Please select' option from a dropdown menu and assign my first option as the default option.

You can check it here: http://store.hbros.co.uk/beef-aubergine.html

I've already checked some tutorials but none of them works. What could I do?

Thanks


texts: What's the difference between order_id and Parent_id in sales Order?

texts: The question might look a bit stupid but I don't understand the difference between parent_id and order_id.


texts: magento 2 product align alphabetical order in pdf invoice

texts: how we can arrange product alphabetically order in PDF invoice if any extension please suggest me or code please share it


texts: "Custom Attribute" is a required field Error Message - Custom customer Attribute on register user

texts:
Hello I added an custom customer attribute "kndnumber" to my register page. Attribute is successfully created in DB.
My Problem is when I submit the user register request the error Messsage "Kundennummer" is a required field. shows up even if the value is in the request body.
I Implemented the frontend as following

Created custom Module
Added CustomModule/view/frontend/templates/additional.phtml
Added CustomModule/view/frontend/layout/customer_account_create.xml

additional.phtml

        <?= $block->escapeHtml(__('Kundennummer')) ?>

        <input type="text" name="kndnumber" id="kndnumber" value="" title="<?= $block->escapeHtmlAttr(__('Kundennummer')) ?>" class="input-text" data-validate="{required:true}">

customer_account_create.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceContainer name="form.additional.info">
            <block class="Magento\Framework\View\Element\Template" name="form_additional_info_customer" template="Magento_CustomerAttribute::additional.phtml"/>
        </referenceContainer>

</page>

But I´m getting the error displayed in the picture. The Backend says the field is required which is true because I want it that way. But I have the kndnumber in my request why does the backend say it´s not I dont get it.

Does anyone have a clue what the problem is?

This is the attribute in the table 'customer_eav_attribute'


texts:
I am getting error when I run the below query in my database

  Cardinality violation: 1241 Operand should contain 1 column(s)

SELECT `main_table`.*, COUNT( item1.product_id ) AS `i_count` FROM `sales_order` AS `main_table`
 INNER JOIN `sales_order_item` AS `item` ON main_table.entity_id = item.order_id AND
             item.parent_item_id IS NULL
 INNER JOIN `sales_order_item` AS `item1` ON main_table.entity_id = item1.order_id AND
             item1.parent_item_id IS NULL WHERE (`status` IN('pending', 'pending_payment')) AND (main_table.store_id = '1') AND (item.product_id = '36', '37') GROUP BY `main_table`.`entity_id` ORDER BY `i_count` DESC
 LIMIT 5;

That query though gives me an error:

  "#1241 - Operand should contain 1 column(s)"

What stumps me is that but this query would be working fine. Selecting columns, then selecting two more from another table, and continuing on from there. I just can't figure out what the problem is.

Is there a simple fix to this, or another way to write my query?


texts: how can add dynamic price in a custom module?

texts: I created a custom module, which act as a product view page for my bundle products. I have successfully displayed name, descriptions and options in my module. Now I am stuck in dynamic pricing section. I need to change the price of the bundle product dynamically, when check boxes of bundle product get clicked. How can I achieve this? Not that my module doesn't have any relation to the default product view page.


texts: Magento 2.3.1 Product detail thumbnail images are not resizing into rectangle shape

texts:
After Magento Upgrade my product detail thumbnail images (which are square by default) are not resizing into rectangle images as it was working in Magento 2.2.6.

in view.xml

        <image id="product_page_image_small" type="thumbnail">
            <width>88</width>
            <height>110</height>
        </image>

I tried using: <frame>false</frame> but got no result.
& also in design- > Catalog module -> gallery.phtml file

  "thumbwidth": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_small', 'width') ?>",
                "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
                ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,

but nothing is working.

any suggestion why?


texts:
Which interface instantiation is missing  in my constructor

namespace Vendor\Module\Block;

use Magento\Catalog\Block\Product\ListProduct;
use Magento\Catalog\Model\Layer\Resolver as LayerResolver;
use Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection;
use Magento\CatalogSearch\Helper\Data;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\Context;
use Magento\LayeredNavigation\Block\Navigation;
use Magento\Search\Model\QueryFactory;
use Magento\Catalog\Model\Layer\FilterableAttributeListInterface;
use Magento\Catalog\Model\Layer\FilterList;
use Magento\Catalog\Model\Layer\AvailabilityFlagInterface;
use Magento\Catalog\Model\Layer\Category\FilterableAttributeList;

class Result extends \Magento\Framework\View\Element\Template
{

   protected $tglssearchHelper;
   protected $catalogLayer;
   public function __construct(
   Context $context,
    LayerResolver $layerResolver,
    \Magento\Catalog\Model\Layer\FilterList $filterList,
    \Magento\Catalog\Model\Layer\AvailabilityFlagInterface $visibilityFlag,
    \Vendor\Module\Helper\Data $tglssearchHelper,
    QueryFactory $queryFactory,
    FilterableAttributeListInterface $filterableAttributes,
    array $data = []
) {
    $this->catalogLayer = $layerResolver->get();
    $this->tglssearchHelper = $tglssearchHelper;
    $this->queryFactory = $queryFactory;
    $this->filterableAttributes = $filterableAttributes;
    parent::__construct(
        $context,
        $data
    );
}

 protected function _prepareLayout()
  {

    $this->renderer = $this->getChildBlock('renderer');
    foreach ($this->filterList->getFilters($this->_catalogLayer) as $filter) {
        $filter->apply($this->getRequest());
    }
    $this->getLayer()->apply();
    return parent::_prepareLayout();
 }
}

my etc di

 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Vendor\Module\Controller\Result\Index" />
<preference for="Magento\Catalog\Controller\Category\View" type="Vendor\Module\Controller\Category\View" />
<preference for="Magento\CatalogSearch\Block\Result" type="Vendor\Module\Block\Result" />
<preference for="Magento\LayeredNavigation\Block\Navigation" type="Vendor\Module\Block\Navigation" />
<preference for="Magento\Catalog\Block\Product\ListProduct" type="Vendor\Module\Block\Product\ListProduct" />
<preference for="Magento\Catalog\Block\Product\ProductList\Toolbar" type="Vendor\Module\Block\Product\ProductList\Toolbar" />
 <preference for="Magento\Catalog\Model\ResourceModel\Product\Collection" type="Vendor\Module\Model\ResourceModel\Product\Collection" />
<!-- <type name="Magento\Catalog\Model\ResourceModel\Product\Collection">
    <plugin name="mymoduletag" type="Vendor\Module\Model\ResourceModel\Product\Collection" sortOrder="10"/>
</type> -->
 </config>

I get :

  Cannot instantiate interface Magento\Catalog\Model\Layer\FilterableAttributeListInterface in
  C:\xampp\htdocs\magento2x_2\lib\internal\Magento\Framework\ObjectManager\Factory\Dynamic\Developer.php on line 73


texts: How to remove the black dot in new product widget on main page?

texts:
I installed the rwd theme and set the new product widget on homepage.
But the list show a black dot each.
How can i remove the dot?
I checked the style.css in skin-> frontend -> rwd -> default -> css.
But I can't find the code.
Please help me.
Thank you.


texts: Magento2: What is the difference between referenceContainer and reference?

texts: I found some xml layout files that uses reference container and only reference. What is the difference between the two?


texts:
I got the following script loaded in the head:

<script src="https://selfservice.robinhq.com/external/robin/XXXX.js" async="async"></script>

What is the correct way (syntax) to remove it on every category page (syntax in the local.xml)?

<reference name="content">
    (remove method..........)
</reference>

Magento version 1.14.3.7


texts: Magento 2 Big numbers in backlog for indexer

texts:
When I run php bin/magento indexer:status I got the following result.

Title                                | Status           | Update On | Schedule Status             | Schedule Updated    |
+--------------------------------------+------------------+-----------+-----------------------------+---------------------+
| Aheadworks One Step Checkout Reports | Reindex required | Schedule  | idle (28 in backlog)        | 2018-10-09 05:20:56 |
| Catalog Product Rule                 | Ready            | Schedule  | working (264312 in backlog) | 2018-10-05 15:57:32 |
| Catalog Rule Product                 | Ready            | Schedule  | idle (0 in backlog)         | 2018-10-09 08:51:18 |
| Catalog Search                       | Reindex required | Schedule  | suspended (3491 in backlog) | 2018-10-05 15:57:28 |
| Category Flat Data                   | Ready            | Schedule  | idle (0 in backlog)         | 2018-10-09 08:38:30 |
| Category Products                    | Ready            | Schedule  | idle (0 in backlog)         | 2018-10-09 08:42:36 |
| Customer Grid                        | Ready            | Schedule  | idle (0 in backlog)         | 2018-10-09 08:36:39 |
| Design Config Grid                   | Ready            | Schedule  | idle (0 in backlog)         | 2018-10-09 08:36:18 |
| Product Categories                   | Ready            | Schedule  | idle (4413 in backlog)      | 2018-10-05 15:57:25 |
| Product EAV                          | Processing       | Schedule  | suspended (1 in backlog)    | 2018-10-09 08:51:18 |
| Product Flat Data                    | Ready            | Schedule  | idle (1 in backlog)         | 2018-10-09 08:38:24 |
| Product Price                        | Reindex required | Schedule  | suspended (2640 in backlog) | 2018-10-05 15:57:30 |
| Stock                                | Reindex required | Schedule  | suspended (1060 in backlog) | 2018-10-05 15:57:26

Notice the numbers in backlog under the column Schedule Status

Why it says 264312 in backlog for the Catalog Product Rule?  I have ran reindexing many times, but numbers in backlog get only bigger and bigger.


texts: Magento2: Can anyone describe crud operation?

texts: Can anyone describe the CRUD operations by admin panel ?


texts: Elegant way of constructor dependency injection when extending abstract class?

texts:
I'm wondering what the best way is to add extra dependencies in the constructor of a class when extending another (abstract) class?

In follow up to this answer regarding dependency injection when extending another class:

https://magento.stackexchange.com/a/74633/24375

Marius mentions this:

The class you are trying to extend has this constructor:

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageHelper,
    array $data = []
) {
    $this->_fileStorageHelper = $fileStorageHelper;
    parent::__construct($context, $data);
}

so you need to make your constructor look like this

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageHelper,
    \Creare\Seo\Helper\Data $creareHelper,
    array $data = []
)
{
    $this->_creareHelper = $creareHelper;
    parent::__construct($context, $fileStorageHelper, $data);
}

Conclusion...
In your child classes you need to specify all the parent class constructor params plus your new params.

To me this solution doesn't seem elegant at all. What if the constructor of a parent class changes? You'd have to rewrite all child classes depending on it.

I'm wondering if there's a way to include all dependecies of the parent class + some other dependencies, without specifying the parent dependencies in the child class?

Thanks!


texts: Magento 2: Add new attribute not showing in list

texts:
I've created new product and clicked Create Configurations at the bottom of the product page. I then clicked 'Create New Attribute', added a name for it and then a code. Once saved, I'm taken back to the Create Configurations page but my new attribut isn't listed, just the usual three (color, size and format).

Am I missing something?


texts: apk file required for creating mobile app for magento

texts:
we are trying to devolop a mobile app for magento site.

I want to know about is there any apk file or Activation key  required for creating mobile app.

is it a open source or is it paid one?

please guide me about this....


texts: Is it possible Magento 2 site work without ssh/command prompt?

texts:
I am installed Magento 231 site. After that, I want to installed Magento extension and theme but I have no ssh or command prompt?

Someone help me how can I achieve this.

Thanks in advance.


texts: Cannot find web/(un)secure/base_url entries in core_config_data table

texts:
When I installed Magento 1.8.xx on Windows, the database had the web/unsecure/base_url and web/secure/base_url entries in the path, which I was able to change from localhost to 127.0.0.1 to resolve the well-known 'cookie issue'. But in my 1.9.0.1 installation on my Ubuntu, these columns are missing. I have removed the Magento installation and reinstalled it, but still with the same result. Eventually, as advised by @benmarks in the answers, I simply added them and it worked.

But will anyone be able to tell me why they are missing in my new installation? Is it simply a bug, or because of my OS, or because of the different versions of Magento?


texts: Missing request_rewrite Node in Configuration

texts:
I'm seeing some weird behavior is a development system I upgraded from Magento CE 1.6 to Magento CE 1.8.1.  Specifically, the site never gets page front controller dispatch due to the following error.

  Fatal error: Call to a member function rewrite() on a non-object in /Users/alanstorm/Sites2013/magento-test-migration.dev/app/code/core/Mage/Core/Controller/Varien/Front.php on line 165

I traced this down to the following call failing to return an object.

$className = (string)Mage::getConfig()->getNode('global/request_rewrite/model');

For some reason, by global configuration does not have a request_rewrite node, even though I've cleared my cache, and this code exists on disk.

I recalls seeing similar reports in the past year since the release of 1.8.0.0.  Does anyone know why this happens?


texts:
I have same issue in Magento 1.9

i'm using magento 1.9.3.2

Login to a customer accounts
Try to add something to the shopping cart and place an order
After order is saved go back to store and try to add something else to the shopping cart.
It returns an error message: Cannot add the item to shopping cart.
If i logout and login back i can add the product to shopping cart and place order as normal


texts: How to Insert Product Selection Widget into Backend Form?

texts:
Magento has a widget where I can select a product. I need to embed it into my form. To be more clear I will provide screenshot:

From this widget I need only product id. I can see that I need something like this:

<id_path translate="label">
    <visible>1</visible>
    <required>1</required>
    <label>Product</label>
    <type>label</type>
    <helper_block>
        <type>adminhtml/catalog_product_widget_chooser</type>
        <data>
            <button translate="open">
                <open>Select Product...</open>
            </button>
        </data>
    </helper_block>
    <sort_order>10</sort_order>
</id_path>

But didn't found yet how to use it. I will be appreciate for any help.


texts: Magento Enterprise Latest Edition Force Uppercase URL

texts:
We are a new Magento Enterprise customer and have found the latest version of Magento Enterprise we are running on automatically converts our uppercase URLs indexed by Google to lowercase URLs creating for example:
http://mysite.com.au/Riedel-O-Cabernet-Merlot-Buy-6-Get-8.html

Magento forces it to be:
http://mysite.com.au/riedel-o-cabernet-merlot-buy-6-get-8.html

When we go live off our development server this week all our Google results will give 404.

Are you able to help us stop Magento from converting all URLs to a lower case?


texts: Order status not show in magento Orders List page

texts: In Orders page not showing order status but i got orders using API , in this orders have order status, but it not display in Magento


texts: Magento 2 prevent discount on gift card products

texts:
Here is the below code di.xml to add plugin code :

app/code/VendorName/ModuleName/etc/di.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <type name="Magento\SalesRule\Model\RulesApplier">
        <plugin name="sales_apply_plugin"
            type="VendorName\ModuleName\Plugin\SalesRule\Model\RulesApplier"
            sortOrder="1"/>
    </type>
</config>

Create RulesApplier.php plugin file

app/code/VendorName/ModuleName/Plugin/SalesRule/Model/RulesApplier.php

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

namespace VendorName\ModuleName\Plugin\SalesRule\Model;
use Magento\GiftCard\Model\Catalog\Product\Type\Giftcard as GiftCardType;
class RulesApplier
{

    public function aroundApplyRules(
        \Magento\SalesRule\Model\RulesApplier $subject,
        \Closure $proceed,
        $item,
        $rules,
        $skipValidation,
        $couponCode
    ) {
        $product = $item->getProductType();
    if ($product == GiftCardType::TYPE_GIFTCARD) {
        return;
    }
        $result = $proceed($item, $rules, $skipValidation, $couponCode);
        return $result;
    }
}

Getting error - TypeError: Argument 2 passed to Magento\SalesRule\Model\RulesApplier::setAppliedRuleIds()


texts: how to disable cache for the plugin in magento 2

texts:
I want to disable cache in plugin. eg(cacheable="false"). How to apply cacheable="false" in plugin.

I am try this code in plugin file.

$types = array('block_html', 'full_page');
foreach ($types as $type) {
    $this->_cacheTypeList->cleanType($type);
}
foreach ($this->_cacheFrontendPool as $cacheFrontend) {
    $cacheFrontend->getBackend()->clean();
}

please help me.


texts: Magento 2.2: Is it possible to use Vue.js in Magento?

texts: If is possible, how can I integrate it in my custom module?


texts: Magento 2 Can't add Attribute option upto 100 ? Is there any limit for the option?

texts:
I have an issue with the product options. There are 500 option for the attribute but can't add after 100 options.

Can you please let me know about this issue?

The Product Attribute is successfully saved but the option value not showing.


texts:
I'm very new in Magento.
I want to remove one of the attributes in Magento.

Call it PDF Preview.

When i click it, this error message pops up :

Can someone please advise what i need to do to remove the Attributes?
I've read the documentation : Remove custom attribute

But i don't undertand how to run the files.

Thank you!


texts: Avoid getting old data from customerRegistry in queue runner

texts:
We have a Magento 2 Queue Job which loads a customer
/** @var \Magento\Customer\Model\ResourceModel\CustomerRepository */
$this->customerRepository->getById($this->customerId));

Now we noticed, that on subsequent processing of queue messages for the same customer, always old data is returned.
We first thought we have a race condition and process events to quickly (before being persisted to the database), but later saw, that if we kill the queue runners in between, the right data is returned.
Digging deeper we see that the customer repository is caching in the customer registry
public function getById($customerId)
{
    $customerModel = $this->customerRegistry->retrieve($customerId);
    return $customerModel->getDataModel();
}

And the registry is just caching data in a the instance:
public function retrieve($customerId)
{
    if (isset($this->customerRegistryById[$customerId])) {
        return $this->customerRegistryById[$customerId];

So now the queue job runs a long time and will have eventually old data.
How can this be solved in a clean way?
Can we force somehow to get fresh data from the repository?


texts: Position not showing in category sorting dropdown

texts:
I have a problem with the sort order of products in the categories:

The Position option is not showing in the dropdown as you can see in the screenshot.

In the Magento backend the position is selected as filterable.

As you can see in the screenshot:

Is there a bug in magento which disables this?


texts:
There is a phtml file from a module that I want to override in my theme.  The path to the file is: \vendor\mageplaza\magento-2-social-login\view\frontend\templates\form\social.phtml.

I am trying to figure out what the path should be to my override social.phtml file but I am finding it confusing.  What is the correct path I should put my file?


texts: Magento 2: What is a Resource Model and how can I use it?

texts:
In Magento 1, using a resource model we are getting collections of data:

$products = Mage::getResourceModel('catalog/product_collection');

$category = Mage::getResourceModel('catalog/category_collection');

$order    = Mage::getResourceModel('sales/order_collection');

How can I use it in Magento 2? Is there any special use of it in this version?


texts:
We have setup the shipping option on our site at southernrecords.co.uk but when we progress an order through to the checkout page we are getting a red cross and highlighted area by the shipping. Also the method text (Flat Rate) isn't being displayed.

Would you have any idea why this should happen?
You can check it by going to southernrecords.co.uk - adding an item to the cart - then clicking the cart icon top right and selecting proceed to checkout - scroll to the bottom to see the problem.

we are new to Magento2 so any help would really be appreciated

Thanks
Rich


texts: any plugin available to create magento products from google feed xml file?

texts: Is there any plugin or sample code available to create catalog products from google feed xml file and show all errors if failed?


texts:
I read the page: https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html

And I am trying to see the code from the less file rather than the css so that I can debug the styling in Magento 2.

Currently, my Chrome browser has css source map enabled and also I use the default luma style. Also, I have installed grunt and compile the style: grunt exec:luma

Yet, when I inspect the style, the debugger shows the css.


texts: Paypal not working after upgrading from 2.2.5 to 2..3.5

texts:
I am writing this to let you know that we recently upgraded Magento from v2.2.5 to v2.3.5, while doing so Paypal package which also got upgraded is not working in the newer version.
We investigated this issue but couldn't' find any solution for the same, we suspect that the installed PayPal package in the 2.2.5 version, when upgraded to version 2.3.5, was not working in the newer version.
We installed a Magento 2.3.5-p2 application with which the Paypal package was installed and when checked it was working fine in the newly installed Magento application, but not working in the upgraded version and then we compared the codes with the upgraded version, and we are not able to find any code difference both packages.
We replace the upgraded PayPal code with a newly downloaded 2.3.5p2 Magento PayPal module then it working fine in our upgraded environment also.
Please provide us any solutions in this regard, to make this work.


texts: Opening Credit Card Tab by default using PayPal Express Checkout

texts:
We are using PayPal Express checkout on our client's website.

We have to open the credit-card tab on paypal's website by default instead of paypal account tab as shown below.

Now i checked the Query String passed in the URL. When clicked on cc it appends the parameter pageSate=billing and then it populates the CC field in credit card form.

I want this to happen by default. I checked into admin but there is no option for it.

Is there any way i can do this by modifying the code for PayPal in Magento ?

Can anyone guide me through this

Thanks


texts:
PHP Warning:  require(/var/www/html/magento2/bin/../app/bootstrap.php): failed to open stream: No such file or directory in /var/www/html/magento2/bin/magento on line 14

PHP Fatal error:  require(): Failed opening required '/var/www/html/magento2/bin/../app/bootstrap.php' (include_path='.:/usr/share/php') in /var/www/html/magento2/bin/magento on line 14

Error when execute sudo php bin/magento setup:upgrade


texts: Checkout broken after when payment information clicks

texts: Checkout broken after when payment information continue button clicks not working in Magento 1.7.0.2 the button is not clickable please anyone who came across this error or problem please give a solution much appreciated


texts: locked myself out of Magento 2.2.5 /admin

texts:
In the process of trying to learn Magento I reset the cookie domain in  System > Configuration > General > Web  according to this article:

https://www.sitepoint.com/fix-magento-login-issues-cookies-sessions/

It appears I entered a bad value (.www.domainname.com) and can now not get into the admin panel.  I am trying to support a client who has a Magento staging site on an AWS Bitnami Lightsail instance.  But the client seems to have locked down PHPMYADMIN and remote connections to the MySQL database.

SO, is there any way to reset the cookie domain for this staging site WITHOUT access to the database?


texts: Magento 2.3: Delete Product Attribute SET and Delete all categories through Database Query

texts:
I want to delete all custom attribute sets, I'm facing an issue when I'm deleting attribute set manually then 404 error is showing in Magento 2.3

and can i delete all categories with 1 database query and start it from id 1 ?


texts: Unable to get Magento 2 Media URL in Model\Config\Source file

texts:
I want to display images as radio button option in Magento 2 Admin panel Store Configuration.

For this i have added the following code in etc/adminhtml/system.xml file:

<field id="mymodsettings_imagepattern" translate="label" type="radios" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
    Select One of the Image
    <source_model>Mynamespace\Mymodule\Model\Config\Source\Displayimageoptions</source_model>
</field>

Also I created a file Displayimageoptions.php in Mynamespace\Mymodule\Model\Config\Source\ directory with the below code:

<?php
namespace Mynamespace\Mymodule\Model\Config\Source;

class Displayimageoptions implements \Magento\Framework\Option\ArrayInterface
{
    /**
     * @return array
     */
    public function toOptionArray()
    {
        $mediaUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);

        return [['value' => 1, 'label' => __("")]];
    }

}

I am unable to get the media URL here. When tried to print $this, it returns empty object. I also tried the below codes but did not get to work for me:

$this->getUrl($route, $params)
$this->_helper->getUrl($route, $params)

Any help would be much appreciated.


texts:
I have problem when I want to put JS into head when PHP condition is met, but I'm getting Mage_Core_Exception: Invalid block type excetion no idea why. I have read all the possible issues I have found but looks like there is ton of places I could go wrong and right now Im out of ideas.

I have config.xml where is my module declared. This is only part of it as rest of module is working, also JS and CSS I have in module_name.xml is working properly.

</frontend>
    <layout>
        <updates>
            <module_name>
                <file>module_name.xml</file>
            </module_name>
        </updates>
    </layout>
</frontend>

Then I have module_name.xml I understand that I say here "on checkout/cart page load this template/modulename/prependca.phtml into  of page.

<checkout_cart_index translate="label">
    <reference name="head">
        <block type="namespace_moduleName/cart" name="prependca" template="modulename/prependca.phtml"/>
    </reference>
</checkout_cart_index>

Last, but not least, I have this Class of mine:

class Namespace_ModuleName_Block_Cart extends Mage_Checkout_Block_Cart_Abstract {

    public function prependCa() {
        $_quote = Mage::getSingleton('checkout/session')->getQuote();
        if (get_class($_quote) == Mage_Sales_Model_Quote) {
            $head = $this->getLayout()->getBlock('head');
            $head->addJs('namespace/modulenameTotals.js');
            $head->addItem('js', 'namespace/modulenameTotals.js');
        }
    }
}

From what I have read, I did all I had to do, however I still don't get results and only respond I get is Mage_Core_Exception: Invalid block type