texts: magento attributes filter only in last (level 3) category

texts:
I have category hierarchy up to level 3. ex,

Root Category
Category 1
    Category 1.1
        Category 1.1.1
        Category 1.1.2
        Category 1.1.3
    Category 1.2
        Category 1.2.1
        Category 1.2.2
        Category 1.2.3
    Category 1.3
Category 2
.       .       .
.       .       .
.       .       .

Question
While browsing categories in layered navigation, the product's attribute's filters are displaying in all layers but i want to attribute filter in only last category (eg. 3rd level category). How to do that

Note: I have searched it a lot but on one question of magento meta, one answer was altering css to hide filters in particular page. but i want to do it on higher level ( without css and if possible then php hacks).


texts:
This is my code:

app/code/Vendor/Module/view/frontend/templates/storecategories.phtml

        <?php
        $categoryId = 65;
        $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $category = $_objectManager->create('Magento\Catalog\Model\Category')
            ->load($categoryId);
        $childrenCategories = $category->getChildrenCategories();
        echo $category->getName();
        ?>

    <?php foreach($childrenCategories as $childrenCategory) {
            echo "
" . "getUrl() . ">" .  $childrenCategory->getName() . "" . "
";}
        ?>

For now it echo out categories and children categories.

What I want to achieve is to type block code

{{block class="Vendor\Module\Block\BlockName" category_id="49" template="Vendor_Module::storecategories.phtml"}}

into admin panel/Content/Pages/Home page/Content text area and call for categories and subcategories without using echo.

I suppose that I need to create Block file, but have no clue what code in it should look like.

Maybe I need controller as well and some changes in storecategories.phtml too?


texts: How can i exclude products from reorder function?

texts:
The last orders are listed in magento/customer/account with an option to reorder.

How can I exclude a certain product from this particular order when reordering it?

I want this because it shouldn't be possible to reorder promo items.


texts: css and js should have relative path in page source - magento2

texts:
I have one request that is I need to change all the css & js path from absolute to relative in page source.

Please refer the screenshot for your easy reference. here I want to change all the css ans js to relative path.

For example I need to change

<link  rel="stylesheet" type="text/css"  media="all" href="http://172.17.0.2/pub/static/frontend/Gworks/Home/en_US/mage/calendar.css" />

To

<link  rel="stylesheet" type="text/css"  media="all" href="/pub/static/frontend/Gworks/Home/en_US/mage/calendar.css" />

how to achieve this?

note : Suppose if this not best practice or not possible, please mention the valid reason in your answers.


texts: Recurring profiles: nominal items lose total in checkout

texts:
I have created a recurring profile for a product in the admin, added it to the cart, and go to the checkout (onepage).

The billing information page shows the nominal item correctly:

However once I select the billing address and go to the shipping information, the nominal item now has a price of $0.00:

There are no payment methods available once I add in the shipping information, which I would assume is because the grand total is $0.00.

Any thoughts? I've looked in the controller to see if there is any nominal-product specific code, but didn't see anything that would reset the price to $0.00.


texts: Magento 2 Generate custom simple products SKU in Configurable products

texts:
I am looking to generate Custom SKU's for Simple products in configurable products in Magento 2.2.2.

I know we can edit after we create configurations in admin. But I want to slightly change the way SKU is automatically generated.

Right now, it generates 'MAIN_PRODUCT_SKU-attribute_value_name'. But I want to change it as 'attribute_value_name-MAIN_PRODUCT_SKU'.

I dont know the process behind SKU generation and what files are involved.

Any help would be appreciated.

Thanks


texts: Weight doubled for configurable products

texts:
I have created a configurable product with a simple product as child (in Magento 1.9.3.8). The simple product has been given a weight of 100 kg.

When buying the simple product by directly browsing to it, not by selecting it from the configurable, the weight is calculated correctly for the order (100 kg).

When buying the same product by browsing to the configurable and choosing it via a drop-down, the weight for the order is doubled (200 kg). If I buy two of the simple product this way the weight ends up at 400 kg.

I can see Magento has set these incorrect weights for the order in sales_flat_order so it's not a presentation issue.

As we display the weight in our admin's order overview prior to selecting appropriate shipping this causes problems.

Have I set this up incorrectly? Why Magento is calculating weight differently based on if I add the product as simple or configurable? Is there a non-hacky way to have magento calculate order weight solely based on the simple products total weight and not double it for configurable?


texts: Magento 2 How to get quote in collect rates custom shipping

texts:
I need to get a current quote from my custom shipping model:

public function collectRates(RateRequest $request){
  $quote = $this->getQuote(); // how????
}

how can I achieve this in checkout frontend and create an order in the backend?

Thanks.


texts: How I can display an image in magento pdf in invoice ?

texts:
This is my code:

$image = Zend_Pdf_Image::imageWithPath("http://stefan.local/media/catalog/product/1/1.jpg");
$page->drawImage($image, 10, 30, 20, 50);

But I am getting this error message:

a:5:{i:0;s:45:"Cannot create image resource. File not found.";i:1;s:1336:"#0 C:\xampp\htdocs\stefan\lib\Zend\Pdf\Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('http://stefan.l...')
Can someone help me with this ?


texts: How to show sub categories in category page in magento?

texts: How to show sub categories in category page in magento 2.0?


texts: Assets for Magento 2 site not rendering when running on docker

texts:
I"m working on spinning up my first magento 2 site and I decided to use Docker to allow for a quick and easy development environment.

I got the site to spin up but when it is up I find that none of the assets or styles are being loaded and i'm getting an error of "net::ERR_CONNECTION_REFUSED" Image of the error can be found here:

I have added the project to a public repo if anyone wants to pull it down and play with it. https://github.com/ajmyers01/magento_docker

I'm unsure why it can't seem to find the assets, any help would be fabulous


texts: Are simple product images for each color and size required for correct cart view of product selected? Is there an easier way to associate correct color ordered to be visible in cart than uploading an image for each color and size or a product?


texts: Magento2.1.7 (Mailchimp_Error): Resource Not Found : The requested resource could not be found

texts: I am trying to install the mailchimp extension via composer. When enable the mailchimp extension getting the MailChimpLogger.INFO: Resource Not Found : The requested resource could not be found error.


texts:
the website was working fine until i changed an email setting from the admin panel, all of a sudden the website only shows this error

1 exception(s):
Exception #0 (UnexpectedValueException): Setup version for module 'MagePal_GmailSmtpApp' is not specified

Exception #0 (UnexpectedValueException): Setup version for module 'MagePal_GmailSmtpApp' is not specified
#0 /h/s/ph/vendor/magento/framework/Module/DbVersionInfo.php(56): Magento\Framework\Module\DbVersionInfo->isModuleVersionEqual('MagePal_GmailSm...', '1.4.1')
#1 /h/s/ph/vendor/magento/framework/Module/DbVersionInfo.php(79): Magento\Framework\Module\DbVersionInfo->isSchemaUpToDate('MagePal_GmailSm...')
#2 /h/s/ph/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(55): Magento\Framework\Module\DbVersionInfo->getDbVersionErrors()
#3 /h/s/ph/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#4 /h/s/ph/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#5 /h/s/ph/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#6 /h/s/ph/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#7 /h/s/ph/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#8 {main}


texts:
What is the proper way to e.g: get Sitemap generation grid to load on custom route? Currently on custom route the grid layout won't be rendered, all I see is "Popular Site Map" title which comes from my:

Product\Sitemap\Controller\Adminhtml\PopularSitemap;
/**
 * Index action
 *
 * @return void
 */
public function execute()
{
    $this->_initAction();
    $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Popular Site Map'));
    $this->_view->renderLayout();
}


texts: How to configure table rates to exclude free shipping for some states

texts:
I have a Magento store that sells products to all the USA states. But because of some limitations, I can provide free shipping to only some states, while people from other states have to pay for delivery.
So how can I configure table rates to allow free shipping to only particular states and limit the for other states.


texts:
We have 2 observers to change product price in the cart :
checkout_cart_product_add_after to change price the first time the product is added to cart, and checkout_cart_update_items_after to change price for each item in the cart (when user click the "Modify cart" button on cart page). Both are running OK.

My question :
On the cart page, when user clicks the link "Edit" to edit the product in product page (so he can change quantity, ...) and clicks the "Update cart" button, this update button does not read any observer to refresh price. Only the quantity is refreshed.

How to force this "Update cart" (on product page) action to process the code in observer? Is there another observer for this? The code in checkout_cart_product_add_after is executed just the first time the product is added to the cart?

Thanks.


texts: Append Custom Shipping method to list of methods

texts:
In Magento 2.3 I want to append a shipping method to my collection of methods but it's not working. This is what I'm doing:

I'm selecting the cheapest rate from the collection of rates with

$cheapestRate = $this->getResult()->getCheapestRate().
Then, I reset the original collection with $this->getResult()->reset()
I append the cheapest rate to the now clean collection of methods with

$method->setCarrier($cheapestRate['carrier']);
$method->setCarrierTitle($cheapestRate['carrier_title']);
$method->setMethod($cheapestRate['method']);
$method->setMethodTitle($cheapestRate['method_title']);
$method->setCost($cheapestRate['cost']);
$method->setPrice($cheapestRate['price']);
$result->append($method);
$this->getResult()->append($result);
I'm displaying the cheapest rate so far. Now, I want to add a custom method with a cost of $0.00. This is what I do:

private function addCustomShippingToMethods($method, $result) {
   $method->setCarrier('custom_shipping');
   $method->setCarrierTitle('custom_shipping');
   $method->setMethod('custom_shipping');
   $method->setMethodTitle('custom_shipping');
   $method->setPrice(0);
   $method->setCost(0);
   $result->append($method);
   return $this;
}
So, to insert the custom method in step 4, I call addCustomShippingToMethods right after the last line in step 3 like this

$this->addCustomShippingToMethods($method, $result);

The problem is that I only see the custom method in the checkout page but not the cheapest one. If I remove the call to add the custom method then I only see the cheapest one.

In a few words, all the shipping options I want to see in the checkout page are the cheapest rate and the custom shipping at $0.00.

What am I doing wrong?

Thanks for any advice.


texts: How to change the day of scheduled backup?

texts:
Is there a way to modify the way when a schedule backup is going to run?
let's say every week, can we set it to run during Saturdays instead of Mondays?


texts:
The problem I am having is that my site is slow after you import my products with magmi

http://fpm5.5-check.cluster015.ovh.net/phpinfo.php

After searching the memory of my php of origin here is what I find the memory_limit is has 512 but why the homepage of my site is also slow?


texts:
I am trying to consume magento2 soap api in .NET C#, and can find that to consume sales api's we need to be authorize, i have the authorization token , but can anybody help me how we can add this in .net as service reference,

http://magento2url/soap/default?wsdl&services=salesOrderRepositoryV1

I am getting "consumer not authorize" as error.


texts: How can I test GraphQL of magento 2.3.0 in Wamp Server?

texts:
I have installed magento2.3.0 in localhost wamp server, It is working fine.
When I'm trying to test GraphQL for PWA studio, I'm getting this error "TypeError: Failed to fetch".


texts: Magento2: Append URL with size and color value in Configurable product

texts:
I have configurable product.
I want append URL once I click on configurable option with query string on the product detail page. Like,
.html?size=XL&color=red
And also once it append in the URL and If we try to Reload page then  selected parameter will be selected after page load.

Here what I did. I am not sure is this proper flow for this requirement Or not.

_OnClick: function ($this, $widget, eventName) {
        var $parent = $this.parents('.' + $widget.options.classes.attributeClass),
            $wrapper = $this.parents('.' + $widget.options.classes.attributeOptionsWrapper),
            $label = $parent.find('.' + $widget.options.classes.attributeSelectedOptionLabelClass),
            attributeId = $parent.attr('attribute-id'),
            $input = $parent.find('.' + $widget.options.classes.attributeInput);

        var color = $label.html();
        var size = $this.html();

        window.location.hash = '?size='+size+'&color='+color;


texts: Not able to print the data with getData() Function

texts:
I am trying to join two tables with join operation

$layoutscoll = Mage::getModel('pdp/pdplayouts')->getCollection();
$query = $layoutscoll->getSelect()
    ->join(array('layoutsides'=>'mst_pdp_multisides'), 'main_table.id= layoutsides.id', array());
echo $query;
print_r($query->getData());

When I print this $query using echo it shows an "SQL query" it's works on PhpMyadmin SQL queries. But I want print this in blocks or templates by using getData() it shows error. I think that getData() function not works here


texts:
I can't install patch PATCH_SUPEE-7405_CE_1.8.0.0_v1-2016-01-20-04-48-23 into project. Error with this file :

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

checking file app/code/core/Mage/Admin/Model/Observer.php
checking file app/code/core/Mage/Admin/Model/Redirectpolicy.php
checking file app/code/core/Mage/Admin/Model/Resource/User.php
checking file app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml
Hunk #1 FAILED at 309.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml
Hunk #1 FAILED at 379.
1 out of 1 hunk FAILED
checking file app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml
checking file app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml

My applied patches:  SUPEE-5344, SUPEE-1533, SUPEE-5998,  SUPEE-6237, SUPEE-6285, SUPEE-6482, SUPEE-6788,
Any ideas or suggestions how can i fix it?


texts:
I have recently discovered a issue with my Magento 2.3.0 image cache generation. I don't actually know when the problem started happening. Only thing of note that I have been doing is importing a large number of SKU's and images into the site. This led to a issue where around 5k extra images got imported, which upon cleaning up these duplicates I decided to flush the image cache and discovered the issue.

Issue Recreation Steps:

After flushing/deleting cached images from /pub/media/catalog/product/cache/*, and navigating to a product page. The base image fails to display. Loading a page with the console we get this error:

cache/9d089../w/o/woca9216.jpg 500 (Internal Server Error)

Now the weird thing is this only happens for the product image(base). Thumbnails after clearing DO get created again.

Things I've tried:

The basics: Setup:upgrade,static-content-deploy. Cache flushing, Reindexing. File permissions(My first thought, I've triple checked and it looks fine. Plus thumbnails are still getting created in the location.)

Symptom fix but no cure: catalog:images:resize, Now this does run, and makes images in the cache like it should. BUT I'm on a shared host....Therefore Limitations. Host timesout the script after 5min. I have 10k images and this would take way to long anyway. The fix is temporary for the ones I've tested with it getting to in time.

Beating my Head against the wall:
So. Learning the default Magento image flow taken from another contributor.

  Default Magento flow is whenever it load image(media), it will always
  pass through the request to pub/get.php and check whether the image
  exists or not. If it not exist, it will generate a new cached image.
  If it exists, it will return that path. So by default image should
  generate on page load.

So I check that pub/media/.htaccess has:

   ## rewrite everything else to index.php
        RewriteRule .* ../get.php [L]
</IfModule>

Also to check my pub/get.php I added this to the first line.

echo "test";exit;

Loading up a product page that should pull get.php, Nothing displayed. This is were I lose some people with the same issue. My permissions are fine, I have .htaccess in pub/media/and it includes the right info.
Any one have any clue why get.php would not be loading?
What am I missing?
Everything else on the site has been working great.

*Note: I did create a new item and add a image. Then clear its image from the cache. It will also not reload the image.
*Second Note: I do know the cache was working correctly in the past. Just not sure how long.


texts: product setPrice() not updating value for "default values" in store view

texts:
I have three store view in my magento site. I want to update product price programmatically for all store view.

For this I am using below code :

$product = Mage::getModel('catalog/product')->setStoreId(1)->load($id);
$product->setPrice(ceil($product_price))->getResource()->saveAttribute($product, 'price');

And similar to other store, This is working and updated price respectively to all store view.

But default values showing price 0.00 in magento admin grid.
Why below code is not working?

$product = Mage::getModel('catalog/product')->load($id);
$product->setPrice(ceil($product_price))->getResource()->saveAttribute($product, 'price');

How to do that?


texts: Magento 2 - Order Success Page to show Product Order Table

texts:
Is it possible to get the basket table with Product name, quantity and price to show on the Order success page?

Also to show the shipping and billing address underneath this.

Please Advise.


texts: Magento2 How to include fonts using rel preloader & crossorigin from header

texts:
Magento2 How can I add  for fonts Luma-Icons.woff2
Luma-Icons.woff2 is added under web/css/fonts


texts: how I can translate "Home" word in breadcrumbs section for entire store, even it I turn on Translation tool for magento this word can't be translated. I use Magento 1.9.2.4


texts: I added a new custom tab in customer dashboard. If my custom form is successfully executed i need to redirect to customer main page customer/account. How can I do this?


texts:
I'm using Magento 2, and I'm getting the below error if I try to use the contact form. Does anyone have any idea what it might be?

  We can't process your request right now. Sorry, that's all we know.


texts: How to Force HTTP instead of HTTPS in Canonical tag - Magento 2

texts:
I have SSL enabled in my site, here is what I was expecting: SSL only on checkout process, customer restrict area and backend, not on the entire store such as product and category pages.

In my settings I have both options:

Use Secure URLs on Storefront: YES
Use Secure URLs in Admin: YES

The Storefront option if changed to NO, the checkout and customer restrict area doesn't work with SSL.

Is there any way to set the store to work as expected?

Thank you.


texts: Magento 2: Prevent "Add to Cart" Error Message Autohide

texts:
On product page, if you try to put more than available product count into the shopping cart, there appears a red error message

"The requested qty is not available"

thats good.

But in my magento 2.3.2 this message gets hidden after 5 seconds = too quickly, so user maybe does not see it.

I want to disable this feature or enlarge the time to about 15 seconds. Can someone please help me to do this?

I've looked into so many .js and other files, try to watch via Developer Console which script is firing but no success.

This add to cart message is DIFFERENT than the ones in the checkout. For the checkout ones I've found the solution to look into

/vendor/magento/module-ui/view/frontend/web/js/view/messages.js

where you can enlarge the time for the "checkout error messages", but its not helping for add to cart problems.

Anyone any idea?


texts: Dashboard is loading after login in Magento2

texts:
My login page didn't show after successfully install Magento2.
Then solve the issue from below link

  After installing magento 2.3 admin login page cant open properly

After successfully login My Admin dashboard isn't load fully. Only loading icon is shown.
I upload an image for better understand.


texts: Google still crawls url while i disallow from robots

texts:
I will go straight to the point.

Recently I did several fixes in my robots.txt file, and I've added several disallows like these:

Disallow: /review/
Disallow: /catalog/product/view/

the problem is that google webmaster tools complain about duplicate meta descriptions in pages that normally shouldn't crawl:

/catalog/product/view/id/1049/s/Σετ-Έπιπλο-Μπάνιου-1/twitter.com
/review/product/list/id/5/

any ideas of how can I make webmaster HTML improvements to be updated with the new robots.txt file?

further actions that I did without any result:

-updated the sitemap

-did twice fetch as Google with success

best,
a


texts: I need to set the 'OR' condtion for last where clause but it is setting as AND how can change in magento 2.3

texts:
SQL need to change AND condtion to OR in below code
public function getOrders()
    {
        $po_number = "%"."A"."%";
        if (!($customerId = $this->_customerSession->getCustomerId())) {
            return false;
        }
        if (!$this->orders) {
            $this->orders = $this->getOrderCollectionFactory()->create($customerId)->addFieldToSelect(
                '*'
            )->addFieldToFilter(
                'status',
                ['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
            );
            $this->orders->getSelect()
            ->joinLeft(
                ["sop" => "amt_sales_order_payment"],
                'main_table.entity_id = sop.parent_id',
                ['po_number']
            )
            ->where('sop.po_number LIKE ?',$po_number);

            $this->orders->setOrder(
            'ext_order_id',
            'desc'
            );
            echo  $this->orders->getSelect()->__toString();
        }
        return $this->orders;
    }

I the po_number OR condtion need to apply how can i apply this.
Current Query
SELECT `main_table`.*, `sop`.`po_number` FROM `sales_order` AS `main_table` LEFT JOIN `sales_order_payment` AS `sop` ON main_table.entity_id = sop.parent_id WHERE (`main_table`.`customer_id` = '200') AND (`status` IN('canceled', 'closed', 'complete', 'fraud', 'holded', 'partially_shipped', 'payment_review', 'pending', 'processing', 'shipped')) AND (sop.po_number LIKE '%A%')

Expecting Query
SELECT `main_table`.*, `sop`.`po_number` FROM `sales_order` AS `main_table` LEFT JOIN `sales_order_payment` AS `sop` ON main_table.entity_id = sop.parent_id WHERE (`main_table`.`customer_id` = '200') AND (`status` IN('canceled', 'closed', 'complete', 'fraud', 'holded', 'partially_shipped', 'payment_review', 'pending', 'processing', 'shipped')) OR (sop.po_number LIKE '%A%')


texts: Populating the multiselect field with available values pre-selected in Admin form edit mode is not working

texts:
I am using Magento version 1.9.1.0 CE and I have developed a module involving an admin form having a multiselect field.

I have been able to populate the multiselect field with values when in New entry mode but if I have saved the data and then when I go to edit the same data then in edit mode the saved values are not displayed pre-selected.

Means selected='selected' is not working in admin multiselect edit form.

Below is my form code:

protected function _prepareForm()
{
    $form = new Varien_Data_Form(array(
        'id' => 'edit_form',
        'action' => $this->getUrl('*/*/save'),
        'method' => 'post',
    ));

    $form->setUseContainer(true);
    $this->setForm($form);

    $helper = Mage::helper('namespace_module');

    $fieldset = $form->addFieldset('display', array(
        'legend' => $helper->__('Change Default Values'),
        'class' => 'fieldset-wide'
    ));

    $fieldset->addField('fieldIds', 'multiselect', array(
        'name' => 'field_ids[]',
        'label' => $helper->__('Field Labels'),
        'title' => $helper->__('Field Labels'),
        'class' => 'required-entry',
        'required' => true,
        'index' => 'fieldIds',
        'value' => 20,19,17,
        'values' => Mage::helper('namespace_module')->getProductsList()
    ));

    /*if (Mage::registry('namespace_module')) {
        $form->setValues(Mage::registry('namespace_module')->getData());
    }*/

    $regData = Mage::registry('namespace_module')->getData();
    $formVals = Mage::registry('namespace_module')->getData();

    if(!empty($regData)) $data = $regData;

    echo "<pre/>";print_r($data);

    if(!empty($data['field_ids'])) {
        $formVals['field_ids'] = explode(',',$data['field_ids']);
        $formVals['field_ids'] = array($formVals['field_ids']);
        echo "<pre/>";print_r($formVals);
        $form->setValues($formVals);
    }
    ## $this->setForm($form);

    return parent::_prepareForm();
}

I have also checked by debugging the /lib/Varien/Data/Form/Element/Multiselect.php file, the value element of array shows nothing, even if I pass comma-separated values or single dimension array.

Help me out here somebody.


texts: Magento 2.3.4: Want to change the location of bundle product options near add to cart

texts:
I want these two portions of the listing in the same box under the (Choose Your Items) Button.
I have tried to do with the XML but it changes the configurable list and simple product.


texts: Magento 2 - Injecting a model into a class? How to?

texts:
I have a class where I'd like to inject a model into it, to use the code already created in the model. How would I go about doing this in my class?

Thank you.


texts: Magento : Extract ALL Invoices of Orders at Once

texts:
I need to extract all invoice of orders from beginning, there are thousands of invoices.
Manually clicking PRINT and saving invoices in PDF is lot of work and time consuming.

Any way, to speed up and extract all invoice at once in folder and then download them all?


texts: Magento 2 Data Migration SQL error 'Column not found'

texts:
I'm trying to use the Magento 2 migration tool to move a 1.6 site over to 2.1.4. When i get to the [stage: data migration][step: PostProcessing Step]: started step, i get this error:

  [Zend_Db_Statement_Exception]                                                                                SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ccp.entity_id' in 'field list', query was: SELECT ccp.entity_id FROM catalog_category_product AS ccp WHERE (ccp.category_id = 1)

Looking over the M1 DB, there is no entity_id in the catalog_category_product table, so something is getting screwy (the technical term) when the migration wrap up is happening.

I have tried adding this to my map.xml file:

<ignore><field>catalog_category_product.entity_id</field></ignore>

But this error is happening much later in the process so i don't think it's a mapping issue.

This might not me related, but when i refresh the front end, i get this error:

  a:4:{i:0;s:60:"Unable to load theme by specified key: 'default/{name of the old 1.6 install's theme}'";i:1;s:9773:"#0 /home/demo/public_html/oberk/vendor/magento/module-theme/Model/View/Design.php(148): Magento\Framework\View\Design\Theme\FlyweightFactory->create('default/{name of the old 1.6 install's theme}', 'frontend')

I haven't been able to track down where i need to look for a solution to the issue, since i'm not much of a sql guy.


texts: MAGENTO 2 | Theme layout changed after running UPGRADE command

texts:
I am currently working on a Custom Magento2 Theme.

What I have done:

Copied all of the vendor/magento/module-theme files to my own module (Named Customod)
Copied all of the vendor/magento/theme-frontend-blank files to my own theme named TMP
Replaced all of the namespaces in all files with my own namespaces
and... IT WORKED, so I edited all the template files and started to customize my theme.

THEN...

I followed a tutorial. One step was to run the Magento Upgrade Command from terminal, so I did...
After that, I refreshed the frontend and was shocked to see that my theme was completely changed and everything was not the way I made it!
But the strange thing is that all of the files in my module (.XML, .PHTML, .PHP) are not changed!

So my question is:
What does that UPGRADE command do? And how can I go back to the way it was? (Because all my data and structure is still in the .XML files etc.)


texts: Magento 2.3 checkout show company name after radio select

texts:
We want to add a radio select option in our Magento 2.3 store, that hides the company name and fax field.

We would like to add a radio option to select: personal or company purchase.

If the option company purchase is select, it should display the field company name and fax.

We have this option in our Magento 1.9.4 store, but that's quite easy to add in the .phtml file.

Because Magento 2.3 uses the .html file for the shipping address, we can not add this option. We also would like to add this option for the billing address.

How can we achieve this? Is there any template file to overwrite?


texts:
We are trying to import products into Magento 2.2.5, but whenever we run the import, we get the following error:

  Imported resource (image) could not be downloaded from external
  resource due to timeout or access permissions in row(s): 1

The odd thing about this is that there are no images defined in the CSV that we're trying to import. Here's a sample of the CSV:

sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,deferred_stock_update,use_config_deferred_stock_update,related_skus,crosssell_skus,upsell_skus,hide_from_product_page,custom_options,base_image
BB-00365,,Default,simple,,base,Wild Daffodil Bulbs (Narcissus obvallaris) - Bulk Buy,"This is a product description>",,,1,Taxable Goods,"Catalog, Search",24.17,,,,snowdrop-(flore-pleno)-bulbs-(galanthus-nivalis-f.-pleniflorus),"Snowdrop (Flore Pleno) Bulbs (Galanthus nivalis f. pleniflorus) Bulbs For Sale â"" Professional Quality Autumn Garden Flower Bulbs","Snowdrop, Flore, Pleno, Bulbs, Galanthus, nivalis, pleniflorus, bulb, bulbs, flower, autumn, flowering, quality, wholesale, garden, plant, professional, buy, for, sale, mail, order, spring",,14/05/2019 16:31,14/05/2019 16:31,,,Block after Info Column,,,,,,,,,,,Use config,,"has_options=1,quantity_and_stock_status=In Stock,required_options=0",100000,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,,,,0,"name=Packsize,type=drop_down,required=1,sku=BB-00368-1,title=100 Bulbs,price=24.17,default=0,default_qty=1.0000,price_type=fixed|sku=BB-00368-2,title=1000 Bulbs,price=157.50,default=0,default_qty=1.0000,price_type=fixed|sku=BB-00368-3,title=250 Bulbs,price=30.00,default=0,default_qty=1.0000,price_type=fixed|sku=BB-00368-4,title=50 Bulbs,price=-7.50,default=0,default_qty=1.0000,price_type=fixed",

As you can see, the base_image column is empty, and I don't understand why Magento is generating this error. We have already tried to import images using this format, and received the error, but I thought that removing the images would at least allow us to import products, but this doesn't seem to be the case.

Has anyone encountered this problem and know a possible fix so that we can import our products into 2.2.5?

I have already tried the solutions on StackExchange and the official Magento forum (including the hotfix listed), but none of them have worked.


texts: Don't show attribute in product collection if not set

texts:
Hi basically I need to echo out all the products attributes in an order. I get all the attributes as follows however if the attribute is not set it says its getValue() is "No". The issue is some attributes are actually Yes or No soI can't see which are actually set and which aren't! Code below:

List attributes and values:

  $productId = 355;
  $product = Mage::getModel('catalog/product')->load($productId);
  $attributes = $product->getAttributes();

  foreach ($attributes as $attribute) {
  if ($attribute->getIsVisibleOnFront()) {
  $label = $attribute->getFrontend()->getLabel($product);
  $value = $attribute->getFrontend()->getValue($product);
    echo $label . ': ' . $value .'<br />';
  }
  }

This then spits out the following where only Colour is actually set backend. Any that aren't set don't need to be shown here!

Colour: Silver
Restrictor: No
Brand: No
Length: No
Split: No
Stack Height: No
...


texts: loadByCode Newsletter template in Magento 2?

texts:
Is there a Magento 2 function like loadByCode for admin created Newsletter templates?

If not, how are you supposed to retrieve newsletter created in admin?


texts: New Zend Framework 1 Security Vulnerability. I use Sendgrid, am I safe?

texts:
I've been made aware of the Zend Framework 1 Security Vulnerability.

I understand that an attack could happen and so I wanted to be secure.

We don't send mails directly from our magento server, we use Sendgrid integration.

Are we safe if we are not sending the mails directly?

Many thanks in advance.


texts: Magento 2.2.4 : Way to get search result url (including the parameter)?

texts:
Every time I type something something in the search bar, I get redirected to the following url:

https://XXXXXX.com/catalogsearch/result/?q=typed_text_on_search_bar

Is there a way to get the complete url through a php statement?

I tried this already:

  https://stackoverflow.com/questions/33955256/get-the-current-page-url-in-magento-2-0

but I only got this as result: https://XXXXXX.com/catalogsearch/result/ without the parameter ?q=typed_text_on_search_bar

Thanks for your inputs


texts: My PayPal payment method does not display on Checkout with Multiple Addresses

texts: My PayPal payment method is shown on the checkout page, but it's not displayed at Checkout with Multiple Addresses.


texts: Error when reindexing "Category Products" - Integrity constraint violation: 1452

texts:
I cannot reindex "Category Products" from admin - get an error "Cannot initialize the indexer process". Then I printed exception message:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row:
 a foreign key constraint fails (`catalog_category_product_index`, CONSTRAINT `FK_OZSS_CAT_CTGR_PRD_IDX_PRD_ID_OZSS_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`),
 query was: INSERT INTO `catalog_category_product_index` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`) SELECT `catalog_category_product_index_idx`.`category_id`, `catalog_category_product_index_idx`.`product_id`, `catalog_category_product_index_idx`.`position`, `catalog_category_product_index_idx`.`is_parent`, `catalog_category_product_index_idx`.`store_id`, `catalog_category_product_index_idx`.`visibility` FROM `catalog_category_product_index_idx` ON DUPLICATE KEY UPDATE `category_id` = VALUES(`category_id`), `product_id` = VALUES(`product_id`), `position` = VALUES(`position`), `is_parent` = VALUES(`is_parent`), `store_id` = VALUES(`store_id`), `visibility` = VALUES(`visibility`)

What I already tried: find the "deleted" products in database as suggested in other questions(but that sql queries return 0 rows for me), truncating the product_flat_data tables (they are empty)


texts: Magento 2.3.4: How to find out the configuration key value for `Enable this Solution` for a Payment Method?

texts:
Our Magento store recently got Klarna extension integrated in itself as another payment method. I need to find out the configuration key value for the field 'Enable this Solution'. Where do I find this bit of information so that I can pass this in the code below? payment_us_klarna_section_klarna_klarna_kp_required_active doesn't return the value.
echo "Store Config Value: " . $block->_scopeConfig->getValue('payment_us_klarna_section_klarna_klarna_kp_required_active', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

Here is the screenshot for the field that I need the configuration key value of.


texts: Magento 2 : How to Add New Colum on Checkout Cart Page?

texts:
I want to add  new custom column after product name column on cart page. See below screen-sort.

Any one have idea?

Now i also want to rename item column name  to my-item.

see my attachment.

Thanks in advanced :)


texts: How to add a class to an attribute group?

texts:
hi this is the js  code where magento generates new groups in admin:

 addGroup : function() {
                        var group_name = prompt("<?php echo Mage::helper('catalog')->__('Please enter a new group name') ?>","");
                        group_name = group_name.strip();
                        if( group_name == '' ) {
                            this.addGroup();
                        } else if( group_name != false && group_name != null && group_name != '' ) {

                            if (!editSet.validateGroupName(group_name, 0)) {
                                return;
                            }

                            var newNode = new Ext.tree.TreeNode({
                                    text : group_name.escapeHTML(),
                                    cls : 'folder',
                                    allowDrop : true,
                                    allowDrag : true
                                });
                            TreePanels.root.appendChild(newNode);
                            newNode.addListener('beforemove', editSet.groupBeforeMove);
                            newNode.addListener('beforeinsert', editSet.groupBeforeInsert);
                            newNode.addListener('beforeappend', editSet.groupBeforeInsert);
                            newNode.addListener('click', editSet.register);
                        }
                    },

I want to add to the last group a class:
I tried using this : jQuery(".x-tree-node").last().addClass("test"); I put this code after this line  newNode.addListener('click', editSet.register);. It does not do anything. After that I tried smth like this: I change this line:

text : group_name.escapeHTML(),   into this :   `text : "<span class='testare'>"+group_name.escapeHTML()+</span>,`

It works, but it totally messed up the drag & drop. So how can i add a class to the last group added  ?

I tried also like this :

 var newNode = new Ext.tree.TreeNode({
                                    text : group_name.escapeHTML(),
                                    cls : 'folder',
                                    allowDrop : true,
                                    allowDrag : true,
                                    className : "testare"

                                });


texts: Magento Composer Installer - Require works, Suggest does not

texts:
So I'm currently playing about with Composer and Magento, and having a bit of trouble getting the magento-composer-installer to play nice.

Firstly, my composer.json files!

Module:

{
    "name":"namespace/module",
    "description":"Desc",
    "type": "magento-module",
    "suggest":{
        "magento-hackathon/magento-composer-installer": "*"
    },
    "extra":{
        "map":[
            [
                "app/etc/modules/Namespace_Module.xml",
                "app/etc/modules/Namespace_Module.xml"
            ],
            [
                "app/code/community/Namespace/Module/",
                "app/code/community/Namespace/Module/"
            ]
        ]
    }
}

Project:

{
    "require": {
        "magento/core":"1.9.1.0",
        "magento-hackathon/magento-composer-installer": "*",
        "namespace/module":"dev-master"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "http://packages.firegento.com"
        },
        {
            "type": "vcs",
            "url": "/home/luker/namespace/module"
        }
    ],
    "extra": {
        "magento-root-dir":"./",
        "magento-deploystrategy":"copy",
        "magento-force": true,
        "magento-deploy-sort-priority": {
            "namespace/module": "200"
        }
    }
}

This setup does not work.

However, if I change the module to "require" magento-composer-installer instead of "suggest" it, then it works and gets copied into the code base correctly.

After reading the docs, I know this is not the correct thing to do.

What have I missed?

(To be honest, not entirely sure what I'm achieving with my magento-force and priority extras. I've just been hacking about)

Thanks


texts: How to put labels in the input fields in the customer address edit?

texts:
In Magento 2.x, on the customer account screen, I need to add labels to the address inputs. What is the best way to do this?

I was able to perform the same modification on the address inputs of the checkout screen, but I did not find anything for the address inputs on the customer account screen.


texts: calculate VAT on cost when saving products and apply at price

texts:
i am new to Magento.i am trying to achieve a simple way to apply custom margin at cost and then get its sale price.. i want to put only cost then some function to calculate 20% VAT (TAX) and custom attribute... and set margin 15%

example;

i have Three fields..when adding or editing product

 Cost = 100
 Price = 0
 margin_percentage: 15 (means 15%)

after user add 100 and margin percentage 15, system first calculate 20% vat then on resulting amount add 15% margin so i this case

cost + vat + margin = 138 after saving

 Cost = 100
 Price = 138
 margin_percentage: 15

i have write a module and trying to achieve this using Event Observer - catalog_product_save_before and catalog_product_save_after here is a function ...if this code works i may apply formula’s ..

  class SmashingMagazine_LogProductUpdate_Model_Observer
  {

  public function logUpdate(Varien_Event_Observer $observer)
  {
    $product = $observer->getEvent()->getProduct();
    $cost = $product->getCost();

    $_product = Mage::getModel('catalog/product')->load($product->getId());
    $_product->setPrice($cost); // or an other price field
    $_product->save();

    Mage::log(
        "cost {$cost} Price {$price} updated",
        null,
        'product-updates.log'
    );
  }
  }

when i create or edit product at catalog... above code not working and product price page like some infinite loop.. at end timeout and values not saved. please suggest me some hints and i am very confused how I accomplish this task. i have no experience of Magento research a lot for the last 5 days. i am following this tutorial to make module http://coding.smashingmagazine.com/2012/03/01/basics-creating-magento-module/


texts: Magento2 language switcher redirect to 404 or random product page

texts: I have a problem with Magento 2. Language switcher only on mobile in production redirect on the random page or in 404


texts: I need to migrate from my Shopify to Magento?

texts: I have been used Shopify for my store in 1 year and now i need to migrate all data from Shopify to Magento (including customers password). What should i do? Pls advice me. Thx


texts: Upgrade Magento Enterprise Edition with version 1.14.2.1 to the latest 1.14.3.8

texts:
I wish to upgrade my Magento Enterprise Edition with version 1.14.2.1 to the latest 1.14.3.8 - and I can not seem to find any documentation on how to perform the upgrade from 1.14.2.1.

Can someone please share with me any of their experiences they've had with doing this particular upgrade?

Can someone point me to the correct upgrade article?


texts: Should 2 of the standard cron always be running?

texts:
My question comes down to, should multiple magento cron:run -vvv processes always be running and hitting MySql constantly.

I am setting up Magento 2.2.1 thru Google Cloud and I have the 3 standard cron jobs that were pre-setup thru Google's 1 click install of Magento.

*/1 * * * * /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento cron:run -vvv 2>&1

*/1 * * * * /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/update/cron.php 2>&1

*/1 * * * * /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/bin/magento setup:cron:run -vvv 2>&1

Looking at top -c there is always 2 php.bin processes running, which are hitting MySql constantly and causing it to use around 50% - 70% CPU all the time. Here is a snapshot of what it normally looks like.

 PID USER      PR  NI    VIRT    RES    SHR  S   %CPU   %MEM
19327 mysql     20   0 3872884 332876  19172 S  60.8  3.4 332:42.45 /opt/bitnami/mysql/bin/mysqld.bin --defaults-file=/opt/bitnami/mysql/my.cnf --basedir=/opt/bitnami+
26458 bitnami   20   0  679516 476444  64492 S  24.6  4.9   0:24.85 /opt/bitnami/php/bin/php.bin /opt/bitnami/apps/magento/htdocs/bin/magento cron:run -vvv
26415 bitnami   20   0  677532 475672  64588 R  23.6  4.9   1:36.11 /opt/bitnami/php/bin/php.bin /opt/bitnami/apps/magento/htdocs/bin/magento cron:run -vvv

I've also changed the crons to run every 5 minutes, instead of the default every minute but the behavior stays the same.

My latest change was alternating every 7 minutes and 8 minutes with the 2 cron:run jobs starting 3 and 4 minutes apart, and with that only 1 cron job is running at a time with 30% - 40% CPU from MySQL.

My site also has no traffic right now because I haven't launched it yet. Is this behavior normal from Magento since there is nothing going on with the site?
I let it sit for 12 hours without doing anything at all and when i look at top the cron is still running and hammering MySQL.

UPDATE:
It's now clear the problem is just first cron:run process that is causing problems. I changed the 2nd and 3rd items back to every minute and left the first at 8 minutes and there is only a single running cron:run process at a time.
From the comment below it could be an issue with Bitnami Magento installations, but this is my first experience with Magento so I don't know if this is expected behavior (I really hope it's not).


texts: How to detect the browser tab close event in jquery

texts:
How do i detect the browser event when customer closing the browser tab by clicking X in jquey?

I just want to show popup to the customer while they closing the browser tab.

I have used below code. But no luck

$(document).ready(function(){

    $(window).on('beforeunload',function(){
        alert('hai');
    });

});

Even alert is also not showing.
Please guide me to solve it.


texts:
I am creating payment method but I don't want use capture event but in capture event we get payment variable like in below code

public function capture(InfoInterface $payment, $amount)
{
    // Normal checkout payments in Authorize & Capture mode
    $this->achapi->createCharge($payment, $amount, false);
    return $this;
}

Here you can see payment variable. I want this variable in public function assignData(\Magento\Framework\DataObject $data) can I get this here


texts: Magento Community Connect: Not valid config.ini file

texts:
We're running Magento Community.

When I navigate to System > Magento Connect > Magento Connect Manager, I got a blank screen with a single message:

  Not valid config.ini file.

If I open /downloader/config.ini with Notepad or Notepad++, I see lots of black NULLs.

How can I fix this problem ?


texts: Can I add form fields to an existing form that submits via php submit?

texts:
            <?php echo $this->__('Annual Usage') ?>

            <input type='text' value="<?php echo $this->getValue('annual') ?>"
            name='customer[usage]' id='customer:usage' class="input-text"/>

I want to add two more form fields and append them to the submit with Javascript. How do I tie into the form submission?


texts:
How to load new product collection in magento 2 like we did in magento 1.x something like

->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))


texts: Magento 2: Filter Custom Column in Admin Grid

texts:
I have a custom column in an admin grid, this column is populated with a custom renderer and is not actually saved to the database. Is it possible to still filter by this column?

in my Grid.php file:

$this->addColumn(
  'test_column', [
    'header' => __('Test Column'),
    'index' => 'test_column',
    'renderer' => 'Company\Module\Block\StockMovement\Renderer\Test',
    'filter_condition_callback' => array($this, '_myTestFilter')
  ]
);

...

protected function _myTestFilter($collection, $column)
  {
    if (!$value = $column->getFilter()->getValue()) {
      return $this;
    }
    $collection->getSelect()->where("test_column like ?", "%$value%");
    return $this;
  }

And then here is my "Test.php" Renderer file:

<?php

namespace Company\Module\Block\StockMovement\Renderer;

use Magento\Framework\DataObject;

class Test extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
  public function render(DataObject $row)
  {
    $comments = $row->getsm_comments();
    if ($comments) {
      return 'abc';
    } else {
      return 'xyz';
    }
  }
}

So now in my custom column on my grid with either abc or xyz text values. These are not actually saved in the DB but just rendered text. How can I filter using this column's text?


texts: How to install "authorizenet/magento-module-authorizenet" on Magento 2.4?

texts:
There is no Authorize.net payments in Magento 2.4 by default. Magento recommends to "use the official extension from marketplace instead".
'Official extension' is compatible with Magento Open Source 2.2 & 2.3 versions only.
I tried to install 'official extension' to Magento 2.3.5-p2. This extension is metapackage, it just contains links to other modules:
{
    "name": "authorizenet/magento-module-authorizenet",
    "description": "Authorize.Net Payment module suite for Magento",
    "version": "1.0.1",
    "type": "metapackage",
    "require": {
        "php": "7.0.2|7.0.4|~7.0.6|~7.1.0|~7.2.0|~7.3.0",
        "authorizenet/magento-module-centinel": "1.0.1",
        "authorizenet/magento-module-creditcard": "1.0.1",
        "authorizenet/magento-module-echeck": "1.0.1",
        "authorizenet/magento-module-paypalexpress": "1.0.1",
        "authorizenet/magento-module-visacheckout": "1.0.1",
        "authorizenet/magento-module-webhooks": "1.0.2"
    },
    "license": [
        "proprietary"
    ]
}

There are no authorizenet/magento-module-* on https://packagist.org/ (in public access). I tried to generate access keys and to use Magento repo (https://repo.magento.com) but I have an error:
$ composer require authorizenet/magento-module-authorizenet
Using version ^1.0 for authorizenet/magento-module-authorizenet
./composer.json has been updated
Loading composer repositories with package information                                                                                Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for authorizenet/magento-module-authorizenet ^1.0 -> satisfiable by authorizenet/magento-module-authorizenet[1.0.1].
    - authorizenet/magento-module-authorizenet 1.0.1 requires authorizenet/magento-module-centinel 1.0.1 -> no matching package found.

What is the right way to install Authorize.Net payment methods to Magento 2.4?
*** EDIT ***
I've 'bought' this module at marketplace. It's free:


texts: Magento 2 not able to save order data in custom table using observer.php with sales_order_place_after

texts:
I am trying to save order details in a custom table with sales_order_place_after observer, but its not working.

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

        $order = $observer->getEvent()->getOrder();
        $order_id = $order->getIncrementId();
        $customer_email = $order->getCustomerEmail();

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

        foreach($order->getAllItems() as $item){
            $ProdustIds= $item->getProductId();
            $proName = $item->getName();
            //$details = array($order_id,$customer_email,$ProdustIds,$proName);
            //$logger->info($details);

             $model = $this->_objectManager->create('Conversion\Replenish\Model\Replenish');
            $model->setOrderId($order_id);
            $model->setProductId($ProdustIds);
            $model->setEmail($customer_email);
            $model->setPeriod($ProdustIds);
            $model->setNextDate('');
            $model->seCreatedDate('');
            $model->save();
        }
    }
}


texts:
I want to add below in the head of Magento 2 via default.xml, unable to get the exact syntax for same

 <link rel="preload" href="https://example.com/static/version1580127835/frontend/theme/theme_more/en_US/css/fonts/Museo-500.otf" as="font" type="font/woff2" crossorigin>

currently css are added to website like below


texts: Magento 2 : From where is the order data gets set for credit memo, before issuing credit memo?

texts:
I am looking for a file from where is order is set for credit memo balance factory.
Any thoughts from where its been set ?
Thankyou


texts: Magento 2: Showing error on production mode

texts: I'm facing an issue like errors are show on PRODUCTION mode, how can this be possible. Anyone have any idea how can this be resolved?


texts: Magento-2 : Product not working with huge number of records selected from grid

texts:
I am working on custom module, I have added custom module data grid to product Add/Edit page in admin area. custom data save on product save same as like related/up-sell/cross-sell products.

When I am saving product, if selected custom module grid records with normal records it's working fine. But if I selected with 1000+ records, It was not working.

Same scenario I have checked for related products, it was working same as above.

I want solution for how to save huge numbers of data while saving products.

Any one have faced this issue, please share your ideas.

Response : 414 Request-URI Too Long : The requested URL's length exceeds the capacity limit for this server.


texts: How to change customer account page layout 2columns-left to 3columns in Magento 2

texts:
I have added below code in VendorName/ModuleName/view/frontend/layout/customer_account.xml.

Also tried changing in VendorName/ModuleName/view/frontend/layout/default.xml

But none of these are working.

What could be the issue?

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


texts: How to remove cancel button from order view page in admin for particular admin user in Magento 2.3.2

texts: I need to remove Order cancel button from order view page in admin side, as well from mass action in magento 2.3.2 for particular user.


texts: 404 Not Found 1 when view product detail page after customer logging

texts:
I am trying to view product detail page after customer logging but it giving 404 Not Found 1 . But if I logged out the customer and then try to view product detail page , everything works fine.

I have tried everything of clearing cache , changing system->configuration->Genral->web setting.

I have Noticed that instead of getting "view" Action. It is getting "noRoute" Action


texts: Magento Installation set up is not completing

texts:
Currently we are using magento enterprise 1.14.1.0. we downloaded all the files from server. When I am trying to configure it with my local machine, I could not complete the process.

I can directly configure with DB by updating the DB details. Even though, I would like to install from beginning. So that I can assume, My machine is having adequate features like curl, soap extension in terms of Prerequisites.

I could able to reach out till last step. But in the last step, I filled all the form values and I hit enter button. It is taking me to first step of installation. I cleared all the cache. The local.xml file had created but it was blank.

What was the problem? Am I missing something while installing? Should I do anything else here?


texts: Magento2: Can we add range slider on product attribute:DropDown

texts:
Hi can we add range slider on layer navigation on product attribute Drop-drown selection. In current magenro2 provide same range slider but on product attribute "price".
I have requirement range slider on color attribute.

I want same range slider on my custom attribute. Dropdown:


texts: Magento 2.1.2: How display products compared with the popup - AJAX

texts:
I have this code -  custom module Ajax:

_CompareAction : function(){
        $('body').on('click','.action.compare',function(e){
            e.preventDefault();
            var href = $(e.currentTarget).attr('href');
            $.ajaxSetup({showLoader: true});
            $.post(href,function(data){
                var compareBox = $('#productCompare');
                compareBox.html('');
                compareBox.html(data.content);
                compareBox.modal();
                compareBox.modal('openModal');
            }).fail(function(){
                alert({
                    content: $t('Can not finish request.Try again.')
                });
            });
            return false;
        });
    },

Unfortunately ajax calls me - the status code 302. What may be the problem?

I am trying to get this effect as on this page (Add to campare product and show popup compare product): http://ld-magento.template-help.com/magento_58948_v1/women.html


texts: How to add validation for firstname and lastname except only characters with mininum 50 in Checkout page Magento2.1.7?

texts:
I want to add validation for firstname and lastname except only characters with mininum 50 in Checkout page for shipping and billing in Magento2.1.7?

Refer my Screenshot.


texts: how to get always the billing address same as the shipping address M2

texts: I want o have always the same billing address asthe shipping address chosen but when i add new address and choose the second i get  a different address and the chechbox is unchecked so how to force this to be always checked any idea please and thanks in advance


texts:
We sell buttons (for the plug). Each of the buttons will cost 2,- Euro. A defined set of 3 buttons will cost 5,- EUR. All individual buttons are created as simple products. So far so good.

I have already tried a lot. The problems are:

Grouped: The customer can define the number but the number is set).
Bundle: compilation, the user can choose (but he should not) and the price is not unique.


texts: how do set default value of config in magento2

texts:
i have  file  etc/adminhtml/system.xml

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

            Productquestion Configuration
            <tab>general</tab>
            <resource>Mageaddons_Productquestion::config_module</resource>
            <group id="productquestion_admin" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                General
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable Product Question
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="guest_question" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1">
                    Allow Guest Ask Question
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="guest_answer" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    Allow Guest Answer Question
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="productquestion_frontend" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                Frontend Setting
                <field id="product_question_per_page" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    Product Question per Page to display
                </field>
                <field id="sort_by" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    Default questions sort by
                    <source_model>Mageaddons\Productquestion\Model\Config\Source\Sortby</source_model>
                </field>
                <field id="sort_dierction" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                    Default questions sort direction
                    <source_model>Mageaddons\Productquestion\Model\Config\Source\Sortdirection</source_model>
                </field>
            </group>

    </system>
</config>

and etc/config.xml

`<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <productquestion>
            <productquestion_admin>
                <enabled>1</enabled>
                <guest_question>1</guest_question>
                <guest_answer>1</guest_answer>
            </productquestion_admin>
        </productquestion>
    </default>
</config>`

it not set default value.

what wrong for file config.xml? thanks


texts: I need some input on how to implement MSI?

texts:
Our Magento version is 2.3.6, which I believe this version supports MSI. I am new to Magento, so I need some inputs/suggestions. :)
Problem: Our store has multiple warehouses and we would like to be able to ship the items to the customer by finding the closest warehouse to the destination that the items will be shipped to.
What I am thinking we could solve this is by:

When users go to my store/website, the website will ask for their destination zip code (where the products will be shipped to).
With that zip code, determine the closest warehouse (which I'm not really sure how to do yet). How can I store this warehouse variable at?
Show in stock or out of stock of the products to users based on the determined warehouse. (Again, I don't know how to do this yet too).
Note: each product will have multiple stocks qty based on the warehouse.

What do you think? Any suggestions will be appreciated.


texts: After send an email page is not redirecting in magento2

texts:
After email sent page is not redirecting. Email function is using in magento2 helper.

$transport = $this->_transportBuilder->setTemplateIdentifier($templateConfigId)
                    ->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId])
                    ->setTemplateVars($emailTemplateVariables)
                    ->setFrom([
                        'name' => $fname,
                        'email' => $femail,
                    ])
                    ->addTo($email)
                    ->getTransport();
            //echo get_class($transport);
            $transport->sendMessage();

Email is coming but page is not redirecting. can anyone please help me.

Thanks


texts: Magento 2 - Redirect to home page when error on login post

texts:
I create a login popup template, only extending the phtml file and moving the xml block in my popup panel. It works fine, but when the user make some error (e.g. wrong the password) I want to redirect on the home page and open the panel with the error message.

I don't know how to do this, because by default magento redirect the user on customer login page.


texts:
`use \Magento\Framework\App\ObjectManager;

...

class AccountSettintsGroup extends \Magento\Config\Block\System\Config\Form\Fieldset

...

    try {
        $om = ObjectManager::getInstance();
        /* @var \Magento\Store\Model\StoreManagerInterface $manager */
        $this->storeManager = $om->get('Magento\Store\Model\StoreManagerInterface');
    } catch (Exception $e) {
        var_dump($e);
    }

`

Magento gives out blank page and does not create StoreManager object.


texts: Getting Error on Checkout Page. Magento 2

texts:
my store works good but sometime when I click on the Checkout button then it moves me to
http://xyz/checkout/noroutes and them I came back to my homepage but when I click on other checkout button which is in the minicart then checkout page collapse and shows like

what is the issue n how can I sort this??


texts:
We are able to login in magento admin but we can not access any menu please tell me what is reason . We have created a new user also from database but no help .

Please check screen shot here-

http://www.awesomescreenshot.com/02e5lhql3c


texts: Magento 2 layered navigation custom collection

texts:
I want to implement layered navigation on my custom controller action where I have listed all the products of a particular brand. I have called the layered navigation block on this page but the layered navigation filters are not populated by the product collection attributes.
Please tell me how can I achieve this in magento 2?


texts: How to remain modal popup open by clicking outside the modal-content in Magento 2.6

texts:
When I tried to click outside of the modal area modal getting closed how to prevent that and modal should not be closed when the user clicks outside of modal.

define([
        "jquery",
        "Magento_Ui/js/modal/modal"
    ], function($, modal){
        var modalls = [];
        var AlertModal = {

            initModal: function(config, element) {
                modalls.push($(config.target));
                $target = $(config.target);
                $target.modal();
                $element = $(element);
                $("#cancelConfirmationMessageBtn").unbind('click').click(function() {
                // jQuery("#cancelConfirmationMessageBtn").click(function(){
                    var url = window.location.href,
                    parts = url.split("/"),
                    lastPartOfUrl = parts[parts.length-2];
                    if(lastPartOfUrl == 'checkout') {
                        var options = {
                            type: 'popup',
                            responsive: true,
                            innerScroll: false,
                            clickableOverlay: true,
                            title: "",
                            buttons: [{
                                text: $.mage.__('OK'),
                                class: 'button',
                                click: function () {
                                    popupdata.modal('closeModal');
                                    var tt = modalls.pop();
                                    modalls.push(tt);
                                    tt.modal('openModal');
                                }
                            }]
                        };
                        var popupdata = $('<div />').append($('#warning-message'));
                        modal(options, popupdata);
                        popupdata.modal('openModal');
                        $('.warning-message').css('display','block');
                        //$(".modal-header").hide();
                       // $(".modal-content").css({"padding":"20px","margin-top": "20px"});
                       // $(".modal-footer").css("border-top", "none");
                        $(".modal-inner-wrap").css("width", "60%");
                    }
                    var tt = modalls.pop();
                    modalls.push(tt);
                    tt.modal('closeModal');
                });
                jQuery("#okOtherMessageBtn").click(function(){
                    var tt = modalls.pop();
                    tt.modal('closeModal');
                });
                $element.ready(function() {
                    $target.modal('openModal');
                    $(".modal-header").hide();
                    $(".modal-footer").hide();
                    $(".modal-inner-wrap").css("width", "60%");
                });
            }
        };

        return {
            'alert': AlertModal.initModal
        };
    }
);


texts: Magento2 display Add to cart success message under Add to cart button on product details page

texts: Magento2 How can I display product Added to cart success message under Add to cart button on product details page?


texts: Error Processing Request: Front controller reached 100 router match iterations

texts:
What is up?  Everything was up and now when we try to access the website using any point of entry. Front page, product page etc. I get this error?

a:5:{i:0;s:52:"
Front controller reached 100 router match iterations
";i:1;s:401:"
#0 /home/issusa/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(183): Mage::throwException('Front controlle...')
#1 /home/issusa/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#2 /home/issusa/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#3 /home/issusa/public_html/index.php(80): Mage::run('', 'store')
#4 {main}
";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

I am a newbie, so could anyone help?  I read that we should just reinstall a backup file, which I have.  But how do i do this?


texts:
I have enabled SSL for only specific pages. From my wishlist page if I add any product to my cart I am getting error on console as:

  Blocked loading mixed active content

There are lot of answers explains about including JS and CSS. Can some one assist me on this?

In my case wishlist page is having enabled SSL where as cart page is not. So, I am getting this error.

In the beginning I had add to wishlist URL without https that time also it thrown CORS error. So I added below,

Mage::getUrl('', array("_secure"=>true));

to create secure URL but now I am getting below error.

  Blocked loading mixed active content


texts:
How can I set up USPS Shipping to have options given only if a certain amount of items are being checked out?

I'm using USPS for shipping and I want it to use a small flat rate box if there are lets say 5 items in the cart. Then, if there are more than 5 it would only give the option of medium flat rate box. Then finally, more than 10 a large flat rate box. How could I set the USPS shipping on magento to do this?

I'm on base Magento 2.3


texts: Paypal gateway is not working in magento 1.9

texts:
Paypal payment method is not working on my production environment.
I am getting below error:

PayPal gateway has rejected request. Invalid token (#10410: Invalid token)

Environment details:

      magento 1.9
      Php version 5.6
      Server Nginx

Kindly provide the solution for resolving the error on my production server.


texts: How to add new css file for a module in Magento2?

texts:
I'm trying add custom css file for my module namely Magento_Hello in magento2. In the module I've created new page and trying to add new custom css to that page.

Here is what I have done in app/code/Magento/Hello/hello_index_index.xml. ('hello' is the frontName of my module)

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

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Hello World</title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="Magento\Hello\Block\Hello" name="hello" template="success.phtml"/>
        </referenceContainer>
    </body>
    <referenceBlock name="head">
        <block class="Magento\Theme\Block\Html\Head\Css" name="magento-hello-css">
            <arguments>
                <argument name="file" xsi:type="string">Magento_Hello::css/custom.css</argument>
            </arguments>
        </block>
    </referenceBlock>
</page>

I'have added the css here app\code\Magento\Hello\View\frontend\web\css\custom.css

But I'm getting the error in system.log which says the 'magento-hello-css' element cannot be added as child to 'head', because the latter doesn't exist [] []

What I'm doing wrong? Can anyone help here?


texts: Magento2 Customer Registration during checkout

texts: If customer is guest then i like to add customer registration process with input fields password & confirm password either customer is already registered then working as it is without shows password & confirm password fields. Can somebody have any idea on it? Thanks.


texts:
For a while Magento 2 had a way to validate (and autocomplete) any xml by using an XSD file.
For examplemodule.xml looked like this:

<?xml version="1.0">
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    ....
</config>

but now module.xml looks like this:

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

so  the xsi:noNamespaceSchemaLocation attribute contains urn:magento:framework:.

I know that this has nothing to do with the server side validation of the xmls. This one still works.
But what can I do to get back my validation in my IDE (PHPStorm in my case, but that's not important, it can be anything else) in order to recognize the path to the xsd?
Should I still use the old relative path while building my modules? Or is there a better way of doing it?


texts: Programmatically clean product image cache singularly

texts:
On Magento 1.x I can clean all products image cache using:

Mage::getModel('catalog/product_image')->clearCache();

and I can clean a single product data cache using:

Mage::app()->cleanCache('CATALOG_PRODUCT_' . $the_product_id);

But does it exists a command to clean the image cache of a single product?


texts: Display order ID on checkout success page

texts:
Please could someone help me with what I imagine is a fairly straightforward request?

I am trying to display the current order ID on the checkout confirmation page using the following code.

<?php $order = Mage::getModel('sales/order')->load($orderId); ?>

<?php echo $order; ?>

It's not working though and in the front-end source code after completing an order I simply see `


texts: How to display configurable product discount in percent on product list in Magento 2

texts:
In the product detail page, it's showing a discount percentage. when I open the list page it can't be showing the percentage for the configurable product.

Please give me the solution for that.

I have used the below code for that, but it's not working for the configurable product.

<div class="discount-p">
    <?php

    if($_product->getTypeId() == "simple") {
        $simplePrice = $_product->getPrice();
        } else {
            $_children = $_product->getTypeInstance()->getUsedProducts($_product);
            foreach ($_children as $child){
            $simplePrice = $child->getPrice();
            break;
        }
    }

    $_finalPrice =$_product->getFinalPrice();
    $_price = $simplePrice;
    if($_finalPrice < $_price) {
    $_savingPercent = 100 - round(($_finalPrice / $_price)*100);
    echo '('. $_savingPercent . '%off)';

    }
    ?>
</div>


texts: Magento 2.0 Create Order by quote .How to submit quote to convert in order

texts:
I have set all information in quote but how can i submit ?

$quote->getBillingAddress()->addData($addressData);
$quote->getShippingAddress()->addData($addressData);
//Set Shipping Method
$quote->setShippingMethod('carriers_flatrate');
$quote->setPaymentMethod('cashondelivery');
//Set Payment method
$quote->getPayment()->importData( array('method' => 'cashondelivery'));

// Inventory will not update
$quote->setInventoryProcessed(true);
$quote->save();
$quote->getShippingAddress()->setCollectShippingRates(true);
$quote->getShippingAddress()->collectShippingRates();
$quote->collectTotals();
$quote->save();
$quote->setCustomerEmail('admin@example.com');
$quoteManagement = $this->_objectManager->create('\Magento\Quote\Api\CartManagementInterface');

$order = $quoteManagement->submit($quote, ['increment_id' => '100000001']);


texts:
How can in override the Block file.I need to override the below file.

  vendor/magento/module-theme/Block/Html/Pager.php

protected $_availableLimit = [10 => 10, 20 => 20, 50 => 50];
protected $_availableLimit = [5 => 5, 10 => 10, 20 => 20, 50 => 50];

Also, I need to show 2 reviews per 1 page then what is the limit which will I have to set for above?

Please help me !!!


texts: : [WARNING]Mismatch of Datatypes Source Document. yotpo_rich_snippets. Fields: review_count

texts:
During the data migration from Magento 1.9.2.3 to magento 2.3.4 with data migration tool, this warning is displayed.

Not sure if it is to be ignored or looked into. Please help me get to the root cause of this warning.

 [WARNING]Mismatch of Datatypes Source Document. yotpo_rich_snippets. Fields: review_count


texts: I am running php bin/magento dev:tests:run static to check my code quality but it takes a really long time. Is there a way I can run them for one module and/or one theme?


texts: How to manage custom table product qty for different seller for same product?

texts: I am making seller price comparison marketplace module.If  seller1 create P1 product P1 product will display in catalog product grid and if seller2 want to sell P1 product so seller2 details will stored in custom table like product_id,seller_id,qty will enter in my custom table so My question is If P1 product is out of stock cart page for seller1 so magento showing error message about out of stock quantity in cart page and in onepage checkout page redirect checkout page and hide proceed to checkout button in cart page this point seller2 's P1 product can not proceed to checkout and how to manage custom table product qty manage in magento ? I just need hint or flow


texts: Include Additional/Joined Data in Grid Column

texts:
I've got a Module that allows someone to add products to a warehouse. In the products listing under the warehouse, I've got the product_id, stock etc.

What I would like is for the product_id to be represented by the SKU and the name instead as the product_id doesn't give anyone much.

/**
 * Override of the Prepare Collection method on the Mage_Adminhtml_Block_Widget_Grid
 * Defines the collection for the data within the grid
 *
 * @return Mage_Adminhtml_Block_Widget_Grid
 * @author Dan Hanly
 **/
public function _prepareCollection()
{
    if (!$this->_model) {
        $this->setModel(Mage::getModel('inventorymanagement/warehouse_product'));
    }

    // Override the Collection for the Class
    $collection = $this->_model->getCollection();
    $this->setCollection($collection);

    // Return the Completed Grid
    return parent::_prepareCollection();
}

/**
 * Override of the Prepare Columns method on the Mage_Adminhtml_Block_Widget_Grid
 * Defines the columns for the grid
 *
 * @return Mage_Adminhtml_Block_Widget_Grid
 * @author Dan Hanly
 **/
public function _prepareColumns()
{
    $this->addColumn('product_id', array(
        'header' => $this->__('Product'),
        'index' => 'product_id'
    ));

    $this->addColumn('stock', array(
        'header' => $this->__('Current Stock'),
        'index' => 'stock'
    ));

    $this->addColumn('low_level', array(
        'header' => $this->__('Low Level Notification'),
        'index' => 'low_level'
    ));

    $this->addColumn('critical_level', array(
        'header' => $this->__('Critical Level Notification'),
        'index' => 'critical_level'
    ));

    return parent::_prepareColumns();
}

Above is what I have so far, and I have a feeling that it's either going to be done in the prepareCollection method or the prepareColumns one.

Can anybody help?


texts: Extra 25% of site wide even to discount prices

texts: How do I(on Magento 1.9) add a global price rule which is adding an additional 25% discount to all products, even the ones which already have a discount


texts: Custom attribute for customer is not inserting data

texts:
I have written the install script to insert the attribute on admin form. But when i click save it does not save the value.
Below is the screen short. Prefer feel is the attribute.


texts: How to get the base url in config.xml file

texts:
How to get the base url into magento2 module app/etc/config.xml file.
<storefront>
    <report_uri>https://www.example.com/</report_uri>
</storefront>

instead of https://www.example.com/ I need to get the base url
Please anyone help me.
thanks


texts: How to setup UPS shipping for Canadian origins

texts:
How do we setup shipping for Canadian orgins?  I get this error:

2015-10-06T20:32:46+00:00 DEBUG (7): Array
(
    [request] => Array
        (
            [accept_UPS_license_agreement] => yes
            [10_action] => 4
            [13_product] => GNDRES
            [14_origCountry] => CA
            [15_origPostal] => L1W3T9
            [origCity] => Pickering
            [19_destPostal] => L1H 5A4
            [22_destCountry] => CA
            [23_weight] => 0.1
            [47_rate_chart] => Customer Counter
            [48_container] => 00
            [49_residential] => 01
            [weight_std] => lbs
        )

    [result] => UPSOnLine5%Origin postal code must have five digits.%0000

    [__pid] => 21830
)

Everything is setup for Canadian currencies, it works fine if I change to origin to a US address. [but that's not the origin]

Does this actually work or do we need another plugin?


texts: Change attribute set of existing products

texts:
How can I change attribute set of existing products in magento version 1.9.
I searched the solution in google got this Flagbit change attribute (for upto 1.6). But I want it for version 1.9 or more.


texts:
How to get product ID Price, if I have some many product,

I want like this get the product ID Price

<?php echo $block->getProductPrice($_product(ID)) ?>

for example: i have two products ID is 1, 2. and i want get this two products price to showing in my custom page. just want to get the product price.

How can I do it?

Thank you!


texts: Orders are being canceled automatically in Magento 2?

texts:
For whatever reason some of my orders (not all of them) are being canceled automatically. I guess there is some job running that does that, but I do not know where to start looking.

Any ideas where to start or what the problem might be?

M2 version is 2.1.9, but it happened in 2.1.6 as well.

Thanks!


texts: How to add a additional field in Summary Section magento 2.3

texts:
My Actual Screen look like

I Expexted Result look like

How to Display Total Savings like above mentioned screenshot.

I need to print Sum of total added product savings amount  in summary section


texts: Set base currency programmatically in Magento2

texts: I want to set base currency programmatically in magento2. kindly suggest me a solution.


texts:
Im trying to retrieve the Current Product ID inside the Tax-model-Calculation.php (code in -> https://github.com/adam-paterson/magento-ce-1.9.0.1/blob/master/app/code/core/Mage/Tax/Model/Calculation.php )

public function calcTaxAmount($price, $taxRate, $priceIncludeTax = false, $round = true)
    {
        $taxRate = $taxRate / 100;
        if ($priceIncludeTax) {
            $amount = $price * (1 - 1 / (1 + $taxRate));
        } else {
            $amount = $price * $taxRate;
        }
        if ($round) {
            return $this->round($amount);
        }
        return $amount;
    }

I tried the following code:

public function calcTaxAmount($price, $taxRate, $priceIncludeTax=false, $round=true)
{
    $taxRate = $taxRate/100;
    $product = Mage::registry('current_product')->getId();
    var_dump($product);

but the following information is displayed in frontpage when I debug using var_dump($product):

  Fatal error: Uncaught Error: Call to a member function getId() on null

Additionally I tried $product = $this->getProduct()->getId();

with same result.


texts:
I am having an issue with the Advanced Pricing import.
I am importing a new pricing file and I selected Replace as the action, but it is not replacing the file.  There are 9,219 line items in the file that I am importing and when I finish the import and export the file there are 9,434 line items in the file. If I export again it will give the different number of record every time. i.e. Import one time and every time export will give the different number of product with advance price in csv.


texts: magento 2.3.5 getting serialize error on checkout page

texts:
After upgrading Magento version from 2.2.7 to 2.3.5 everything was working fine. But suddenly checkout page is showing an error:
1 exception(s):
Exception #0 (InvalidArgumentException): Unable to serialize value.
Exception #0 (InvalidArgumentException): Unable to serialize value.
<pre>#1 Magento\Checkout\Block\Onepage->getSerializedCheckoutConfig() called at [vendor/magento/module-checkout/view/frontend/templates/onepage.phtml:26]
#2 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#3 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#4 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#5 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:26]
#7 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:271]
#8 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:301]
#9 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1100]
#10 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1104]
#11 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:674]
#12 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#13 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:542]
#14 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#15 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]

How can I fix the issue?


texts:
how to get order deatils by invoice id?
I need to search order details by invoice id. Where to change this one?


texts: How to Change the Height and Width Filter in Magento?

texts:
I need to change the Height and width of the filter by slider range .
How can i change it?.

In broad,
My height and width are shows like :

Height :
1.5 (4)
99.8 (300)
....
...

Width :
56 (555)
90 (4545)
....
...

I want this in a slider, How to Change it in Slider range or give me a hint to solve this.

Thanks in advance.


texts: Update custom attribute when product data updated through import

texts:
We import product data using a feed we get from a wholesaler - one full import a week that merges product data and a daily import that only updates price and stock data. I have created a custom attribute called price_incvat and I want this to be populated with the price plus 20% once the product data is updated by the import.

I tried to do this by creating an observer that would update the attribute on the catalog_product_save_before event (see here) without realising that this event would not be triggered by the import. I have tried to use the same code with various other events as listed here but without success. I feel I have been barking up the wrong tree?

Can anyone suggest a better tree to bark up?


texts: Display an image in the admin grid in magento 2

texts:
I want to display an image in the admin grid of one of my modules.
I'm using the new grid system, the one with ui components.
I took a look at how the thumbnail is added in the grid for products, but it's kind of over my head.
My entity is not EAV, is a simple flat table entity.
I tried adding this in my ui component xml file

<column name="image">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/image</item>
            <item name="sortable" xsi:type="boolean">false</item>
            <item name="altField" xsi:type="string">name</item>
            <item name="has_preview" xsi:type="string">1</item>
            <item name="label" xsi:type="string" translate="true">Image</item>
        </item>
    </argument>
</column>

but it seams to have no effect on my grid. there is no image  (my db field is called image) column, no error, no nothing.
Can someone walk me through adding an image to the grid using ui components?


texts: How to create a Marketplace ready Magento 2 extension

texts:
I have created a Magento 2 extension which I wanted to upload on Magento Marketplace.

When I tried to upload my extension it got rejected multiple times with one or the other reason. Due to this and multiple submission, my extension got rejected with below message from Magento.

  For policy or quality reasons, after evaluating your submission, we have decided not continue our review of MY EXTENSION

Now Magento is not allowing to update and re-submit my extension.

I have checked and found Magento is using its EQP process for checking extensions uploaded to the Marketplace.

Which things I have to take care to make a Magento 2 extension Marketplace ready?


texts: Magento2 Change Sku of product with custom option

texts:
I have simple product with SKU :  AAA

and has custom options Sku
Option 1

A1A1A1
A2A2A2

Option 2

B1B1B1
B2B2B2

On Product page SKU is showing AAA is fine.
Now if customer Add to cart and chosse first option in both sectios for this product it's SKu Bocomes AAA-A1A1A1-B1B1B1 in cart and Order

I want to change it's saperator from - to +
so result SKU becomes AAA+A1A1A1+B1B1B1
How can  ido it?


texts: Add custom product attribute to Order Grid

texts:
I have an custom product attribute shipper imported with all the products, which show that the product shipper. I want to show this attribute on the Order Grid with values to know that which order belong to which shipper.

How could I do this?


texts: Magento 2.2.6 : Add custom phtml file after product price in category page

texts:
I want to add custom code in my catalog category view page. I don't want to override product/list.phml file .

But, Just display my custom code in catagory view page after product price.

How to add it?


texts:
I am facing a issue in making Magento 2 store, once a page is loaded it works fine but after refreshing the same page it gets stuck and doesn't work properly. here I attach the reference images:

Here is the link to site : http://www.i-ranu.com/
_/_ any help to solve this issue is highly appreciated _/_

Loading for once this is preview

Refreshing the page this is preview

Every time cache is cleared page loads without any issue (Kindly help).


texts: How to disable swaping of images in Magento 1.9.1.0 - swatches

texts: I've created size swatches for products in Magento 1.9.1.0. Is it possible to disable images swapping for selection of size options. I don't have images for my simple products  so after click on size swatch Magento display blank images. I just want to have images from my configurable products to which my simple products are associated.


texts: Magento 2 : How to add value to shipping address from

texts:
I am facing issue to add Dynamic value (Via Ajax) in shipping address I was trying to do so with JQuery but validations are failing But my text box has dynamic data assigned to it.

please find some screenshot for your reference.
Value is present in the text box but still required validation error


texts: Add product to wishlist without reloading page

texts:
How can I add a product to my wishlist without the page reloading? I tried the answer on this but it still reloads the page.

Using

  return false;

and

  event.preventDefault();

stops the link from adding the product to the wishlist altogether on my homepage while it doesn't affect the link in the single product pages (still reloads but adds the product to wishlist).

How do I pull this off? I want a pop-up for logged in customers to confirm that the product is added to wishlist but I don't know how to use AJAX on Magento's wishlist.

Here's my development site: LINK


texts: When I click on Parent Category, there are no products displayed

texts:
I have three level category structure.

I do not see any products until I click on the last category.

Can I have sub category products displayed on the parent category page too?

Please help!


texts: How to use Distance Matrix Service in Magento 2?

texts:
We have built a rental based website using Magento 2.3. When we create a rental product via admin, we can put the pickup address for that product. Now, we want to show a approximate distance from the end user to the pickup address in product page.

We came to know there is service in google called Distance matrix service. How to use this service in Magento to show the above said thing?

Your help is greatly appreciated.


texts: How to add WYSIWYG functionality to Magento Config items

texts:
For a certain custom module I need a config item to have a WYSIWYG editor.
At this moment I am using "textarea" in my system xml to get a normal textarea.

My guess is I have to add an extra "frontend_type" based on textarea to add this functionallity, but I am wondering if there are other/better options


texts: How to add product into shopping cart by single click using custom module in magento 2?

texts:
My template file code is

$listBlock = $this->_listBlock;
     $addToCartUrl =  $listBlock->getAddToCartUrl($_product);
     ?>
     <form data-role="tocart-form" action="<?php echo $addToCartUrl; ?>" method="post">

    <?php echo $block->getBlockHtml('formkey')?>
    <button type="submit" title="Add to Cart" class="action tocart primary">

       Add to Cart
     </button>
 </form>

My Block code is

<?php
namespace Vendor\Modulename\Block;
class AddProduct extends \Magento\Framework\View\Element\Template
{

  protected $_productCollectionFactory;
   public $_listBlock;

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,

   \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,

    \Magento\Catalog\Block\Product\ListProduct $listBlock,
    array $data = []
)
{

    $this->_productCollectionFactory = $productCollectionFactory;

    $this->_listBlock = $listBlock;

    parent::__construct($context, $data);
}
}


texts: Access module web/images from module's block and display?

texts:
I have tried this which gives me the images url for my theme, which does not have the images that are located in my module/view/frontend/web/images folder.

return $this->getViewFileUrl($image_path);

Where do static images go inside a module, and how can they be used in a block?