texts:
->having(
        'COUNT(*) ' . '<= 3 '
    )

Hardcoded value 3 need to come From:

This is the query to return most viewed products biggest views number:

  SELECT COUNT(report_event.object_id) FROM catalog_product_entity,
  report_event WHERE catalog_product_entity.entity_id =
  report_event.object_id GROUP BY catalog_product_entity.entity_id ORDER
  BY COUNT(report_event.object_id) DESC LIMIT 1

this number that query gives back needs to be multiplied by

$helper->getPopularProductPriority($storeId)

and the return of these actions should change the hardcoded number.
Whats the best way to achieve this?

EDIT:

$priorityView = 3;
$lowerPriorityView = 2;

->having(
        'COUNT(*) ' . '<= ? ',
        $priorityView . 'AND' . ' COUNT(*) ' . '>= ? ',$lowerPriorityView
    )

Xdebug query shows:

HAVING (COUNT(*) <= 3.000000 )

OR:

->having(
        'COUNT(*) ' . '>= ? ',
        $lowerPriorityView . ' AND ' . 'COUNT(*) ' . '<= ? ',$priorityView
    )

returns:

HAVING (COUNT(*) >= '2 AND COUNT(*) <= ? ' )

Why is that?


texts:
I have installed magento2 in my server, it installed successfully, But after installation facing problem in css and js loading so I tried some command as below :

Step 1. $ php bin/magento setup:static-content:deploy
Step 2. $ php bin/magento indexer:reindex
Step 3. $ chown -R www-data:www-data /var/www/html/magento2
Step 4. $ chmod -R 777 /var/www/html/magento2
Step 5. delete cache folder under var/cache

After that magento2 frontend and backend showing not found.

How to resolve it?


texts: Why new order is created after 'edit' action in admin

texts: I wonder why new order is created after editing old one? I think this is pretty hard to be implemented but I believe there are another reasons for this.


texts:
I've installed a custom module on our dev server which worked fine.  I've the used git to move it to the production site.  I can see the module listed under "Advanced" and I can see the code is there, but it is not working.  It should display a new attribute under categories, but it is now.  I have reindexed & cleared cache.

Any thoughs?


texts: Creating custom widget, how to use existing block like "RECENTLY VIEWED PRODUCTS" for a custom block, so that It should support all magento themes

texts:
registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
     \Magento\Framework\Component\ComponentRegistrar::MODULE,
     'Relabs_LabAPI',
     __DIR__
    );

  module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Relabs_LabAPI" setup_version="1.0.2" schema_version="1.0.0">
        <sequence>
            <module name="Magento_CatalogWidget"/>
        </sequence>
    </module>
</config>

  widget.xml

<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Widget:etc/widget.xsd">
    <widget id="sponsored_bestsellerwidget" class="Relabs\LabAPI\Block\Widget\Bestseller">
        Bestseller
        <description>Widget in Magento2</description>
        <parameters>
            <parameter name="title" xsi:type="text" required="false" visible="true">
                Title
            </parameter>
            <parameter name="description" xsi:type="text" required="false" visible="true">
                Description
            </parameter>
        </parameters>
    </widget>

</widgets>

  Bestseller.php

<?php

namespace Relabs\LabAPI\Block\Widget;
use \Magento\Framework\View\Element\Template;
use \Magento\Widget\Block\BlockInterface;

class Bestseller extends \Magento\CatalogWidget\Block\Product\ProductsList  {
    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('widget/Bestseller.phtml');
    }
    public function createCollection()
    {
        $collection = $this->productCollectionFactory->create();
        $collection = $this->_addProductAttributesAndPrices($collection)
            ->setPageSize(2) // only get 2 products
            ->setCurPage(1)  // first page (means limit 0,10)
            ->load();
        return $collection->getData();
    }

}

  Till here everything is working fine.
  when I am printing $collection, below is the output

Array
(
    [0] => Array
        (
            [entity_id] => 1
            [attribute_set_id] => 15
            [type_id] => simple
            [sku] => 24-MB01
            [has_options] => 0
            [required_options] => 0
            [created_at] => 2018-10-09 06:27:13
            [updated_at] => 2018-10-09 06:27:13
            [price] => 34.0000
            [tax_class_id] => 2
            [final_price] => 34.0000
            [minimal_price] => 34.0000
            [min_price] => 34.0000
            [max_price] => 34.0000
            [tier_price] =>
        )

    [1] => Array
        (
            [entity_id] => 2
            [attribute_set_id] => 15
            [type_id] => simple
            [sku] => 24-MB04
            [has_options] => 0
            [required_options] => 0
            [created_at] => 2018-10-09 06:27:13
            [updated_at] => 2018-10-09 06:27:13
            [price] => 32.0000
            [tax_class_id] => 2
            [final_price] => 32.0000
            [minimal_price] => 32.0000
            [min_price] => 32.0000
            [max_price] => 32.0000
            [tier_price] =>
        )

)

  widget template(Bestseller.phtml)

<?php
  $blockObj= $block->getLayout()->createBlock('Relabs\LabAPI\Block\Widget\Bestseller');
  $blockObj->createCollection();
?>

  What should I do here so that it can use existing theme block
    like "RECENTLY VIEWED ITEMS". I dont want to create custom
    html templates, I want to use the theme block template.
    Please suggest ???


texts: Importing product visibility changes selection on backend but changes don't place on front end

texts:
Thanks in advance for any help you can provide!

I'm importing visibility changes for a bunch of products so they aren't visible in search results (visibility = 2).  That changes the product visibility to "Catalog".   The CSV is accepted and when I look in the products, the change took place.  However, the products still show up in the search.  After I go in the product and simply click "Save" (without changing the visibility setting which was changed by the CSV), the update finally works. Any ideas on how to avoid having to go into each product just to simply hit "save"?  The CSV changes the setting but they don't take effect until I go in and hit save.

Thanks again!


texts: How to align the SKU column in invoice pdf?

texts: In generated pdf for the invoice, I have the name of the products overlapping the SKU column , I have changed some code but I don't really know how to get rid of this problem , if anyone can help me to align the SKU from product's rows, it will be appreciated, thanks in advance.


texts: Magento 2 - Ajax call on controller working in desktop but not on mobile

texts:
Here is the ajax call in which data is not passed in controller
This is found only in mobile device and working fine in desktop.
Thanks in advance.
$.ajax({
                type: "POST",
                url: '<?php echo $this->getUrl('sms/customer/register')?>',
                data:{'mobile':mobile},
                beforeSend: function()
                {

                    Smsresetdata();
                    Smstoggeldata('#getotpbtn');
                    Smstoggeldata('#waitsmsdiv');
                },
                success: function(data)
                {
                    if(data == 'success')
                    {
                        Smstoggeldata('#waitsmsdiv');
                        Smstoggeldata('#otpdiv');
                        Smstoggeldata('#resendotpbtn');
                        $('#mobilenumber').attr('readonly', true);
                    }
                    else
                    {
                        Smstoggeldata('#waitsmsdiv');
                        Smstoggeldata('#getotpbtn');
                        $('#smserror').html(data);
                    }
                },
                error: function(e) {
                    Smstoggeldata('#waitsmsdiv');
                    Smstoggeldata('#getotpbtn');
                $('#smserror').html('<?php echo __('Something went wrong, Try again later.') ?>');
                }
            });


texts: Fix Magento redirect to live site in local machine

texts:
I have followed these steps in order to get my live Magento working on my local machine:

Rsynced all files to my local machine
Cleared all cached on live site
Copied the db into my local mysql
Changed the values in core_config_data under web/unsecure/base_url and web/secure/base_url to the new url (I've created a vhost on my local machine so my website address is www.mymagento.lc)
Deleted all files in var/cache and var/session
Changed the db details in app/etc/local.xml
Deleted all mentions to my old url in .htaccess file (after I made a backup of it)

I've done all that and every time I try to access Magento on my local machine I get redirected to my the live url.

What am I missing?

PS: When I tried to re-index running this command from mysite/shell php indexer.php --reindexall I get an error saying that Mage can't connect to the db using the credentials (which is slightly different than the ones in app/etc/local.xml

My Magento version is 1.4 (hence I'm moving it to my local machine to update it) and I run PHP projects on my local machine using the techniques described above without issues.


texts: Cannot access or manage categories after uninstalling themes

texts:
After uninstalling theme (Rokanthemes, I can no longer access my categories page in the backend.
All the caches were removed, the sites were reindexed and I also did a configuration: static-content: deploy
None have had any effect so far, and I can't figure out what went wrong.
i have this error in the reindex operation
Catalog rule indexing failed. See details in exception log.
exception log>>
main.CRITICAL: Class Rokanthemes\Categorytab\Model\Category\Attribute\Backend\Thumbnailimage does not exist {"exception":"[object] (ReflectionException(code: -1): Class Rokanthemes\\Categorytab\\Model\\Category\\Attribute\\Backend\\Thumbnailimage does not exist at /public_html/vendor/magento/framework/Code/Reader/ClassReader.php:19)"} []

thank you for your help


texts: How to check customer login using javascript on admin level?

texts:
i have only permission to my admin account to my webiste as i am paying 3rd party to maintain my website. But I want to add a java script or any client side code on my admin panel of magento that will detect weather my customer is login or not ??

I am trying to put a block of code on the Catalog-> Attribute-> Manage Attribute. In the description of the specific product category page to show a video to all the customer who are not login into website.

Anyone can help me with this will be really very helpful for me if such thing is possible to do.

Thanks in advance for help


texts: Magento 2.4.2 Free Shipping for some items by sku or category

texts:
Magento 2.4.2
Cart Price Rules
Free Shipping on only select few items not working when non free ship sku is added to cart.
Rule Name: name
Active: true
Coupon: No
Customer Groups: ALL
Websites: All
Conditions: Blank All items
Actions:
Apply: Percent of product price discount
Discount Amount: 0
Max Qty: 0
Discount Qty Step: 1
Apply to Shipping Amount: Yes
Discard Subsequent rules: No
Apply the Rule only to cart items matching the following conditions:
I have
SKU is one of SKU1,SKU2,SKU3
Free Shipping: For shipment with matching items

Configuration -> Sales -> Delivery Methods
FREE SHIPPING
**Enabled :**No
If I enable this it always show free shipping.  I do not want this option.  I have seen many post saying enable this.

I use USPS shipping module that is built in with Magento 2.4.2
Free Method: Priority Mail  (which is enabled in allowed methods)
Enable Free Shipping Threshold: Disable

STEPS

I add SKU4 to cart
Put in a location US CO 80014
USPS priority mail show $12.60  (Works Great)
Add SKU1 (frees ship Sku) to cart which and adds onto the shipping cost. $0.60 from $12.60 to $13.20
Remove SKU4 the shipping price Drops back to free.

**WHAT is suppose to happen: **
When SKU4 is in cart alone charge shipping.  This works $12.60 for SKU4
When SKU1 is added to cart with SKU4 shipping should still be the same.  $12.60 but it changes to $13.20
When SKU1 is in cart $0.00 Shipping.  This works
SKU4 Not in RULE so this picture is correct charge shipping.

SKU4 and added SKU1: SKU1 is free ship so it should still be the shipping for SKU4 only not SKU1's add-on cost.

Remove SKU4 and Free Shipping works
With SKU4 removed SKU1 now is free shipping.


texts: Currency selector in RWD mobile view not working correctly

texts:
The currency dropdown when viewing the RWD theme on mobile or smaller screens (the one that shows up at the bottom of the screen) seems to select by default the wrong currency.

For example - I have £ and € available. When prices on the site are displayed in £ it pre-selects € so that I am unable to select € to change the currency to.

This doesn't happen with the currency dropdown at the top of the site.


texts: How to create a product with multiple variant quantity

texts: I want to create a product with multiple variant of different quantity. For example I want to create a product server with two 4GB RAM, three 1TB HDD, etc... All the variants quantity should be in text field. If I change quantity of the variants means, It should be updated in cart price. How can I do that in Magento 2 ?


texts:
I am having this strange issue with chrome browser after upgrade to magento 2.3.3
When I am in administration and start working with products, after a while in chrome when you scroll down or up the viewport isn't ending. Please check my video because I can't explain it better.

Any ideas why this is happening?


texts: Posting image to a product using the magento REST API 2 gives returns HTTP 500 and error in exception.log

texts:
I am trying to add an image to a product in Magento 2.1 via the REST API using the catalogProductAttributeMediaGalleryManagementV1 service. The request is a POST request to https://example.com/rest/V1/products/$000000000093/media where $000000000093 is the sku of the item I am trying to add the image to. The body of the request is

{
  "entry":{
     "types":[
        "image",
        "thumbnail",
        "small_image"
      ],
      "label":"Image",
      "media_type":"image",
      "disabled":false,
      "content":[
        {
          "type":"image\/jpeg",
          "name":"Test123.jpg",
          "base64_encoded_data":"\/9j\/4AAQSkZJRgABAQAA..."
        }
     ],
   "position":1,
   "file":"\/t\/e\/Test123.jpg"
 }
}

This returns a 500 code and checking the Magento exception.log you get the following error:

  main.CRITICAL: exception 'LogicException' with message 'Property "0" does not have corresponding setter in class "Magento\Framework\Api\Data\ImageContentInterface".'


texts: Change layout in Magento 2 before page load

texts:
I am trying to change a page layout before the loading of a page in Magento 2.
I want this layout to be loaded on the base of the configuration.
If you have any example available feel free to drop it in the answer section.


texts: Magento 2.1 - Having problems with customer login

texts:
All of a sudden the customers on my Magento webshop can't login (http://www.healthxl.eu), get confirmation mail or reset password... Also, I noticed that when I tried logging in with a wrong password it just gave me the error (see below).
I tried rolling back a backup I made last week but even this doesn't work.
The error messages:

  An unspecified error occurred. Please contact us for assistance. We're unable to send the password reset email.

Sorry for the not so clear question I asked there. However, after updating my Magento install from 2.1 to 2.1.2 the problem seems to be fixed.


texts: magento2 - windows php-cgi process not killed

texts:
Being new to magento2, I've installed it upon my windows machine ( along with limited resources, please don't ask me to have a docker setup then .. ).

There's a weird thing happening for each static content request "pub/static/version15../library.js" .. each of those processes are never killed, having then 300+ php-cgi zombie processes stacked within my machine.

1) Is there a simple way of getting rid of this odd behaviour ?

2) I also tried to limit to 1 maximal running php process at the time .. front display was really quick then, but the admin login wasn't working anymore, does anyone have some advices in order to run it smoothly under windows ?

3) Is there a way to "deploy" static content under an unique path so files would be served instantanely through apache ? ( not using version15... )


texts: How to edit SQL error generated by PDO.php?

texts:
I started with this exception:

exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1' in /var/www/vhosts/ourdomain.com/httpdocs/lib/Zend/Db/Statement/Pdo.php:236

Used Mysql.php to log SQL to pdo_mysql.log

Found this in the log:

SQL: SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (entity_id =)

Ran

SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (entity_id =)

as a query in the database.

Received:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LIMIT 0, 30' at line 1

So this is the cause of the exception.
How do I go about identifying what generates this SQL, and then edit/fix it?

Edit (further info):
So entity_id = without the other side of the equation is wrong.

Stack log #10 /var/www/vhosts/ourdomain.com/httpdocs/app/code/core/Mage/Catalog/Block/Product/List.php(80): Mage_Core_Model_Abstract->load(Object(Mage_Catalog_Model_Category))

is:

$category = Mage::getModel('catalog/category')->load($this->getCategoryId());


texts: collection with addAttributeToSelect("*") still don't get all data!

texts:
Lets say I do the following:

$prod = Mage::getModel('catalog/product');
$prod->load(243);
Mage::log($prod->getStockItem()->getIsInStock());

I get 1 (eg function returns true)

However, if I do this:

$productCollection = Mage::getModel('catalog/product')->getCollection()
                            ->setPageSize($pageSize)->setCurPage($pageIndex)
                            ->addAttributeToSelect('*')->load();

then I iterate over the products and do

Mage::log($prod->->getStockItem()->getIsInStock());

I always get false, even for item 243 which should return true.

Why is that? and how do I load the stock item data?

(what I care about is if item is really in stock)

Thanks!


texts:
Has anyone gotten this error before?

  Not supported cipher version

I had run composer install and am suddenly getting this error in Magento 2.2.6.

Any help you can offer would be great.  Thanks.


texts: Products don't appear in the products view page as they should

texts:
The problem i am dealing with is the following, i have added 5 products in my site which are displayed in a slider in the homepage, but when i click on a certain product i can see the page menu, both header and the footer but not the product itself it's like the product view page is missing. I changed the design of  certain product into 2 columns with left side bar, then i refreshed my homepage page and clicked on a product again, this time it appeared. I believe there is a problem withproduct-view.phtml.
What can i do to make the products appear as they should?


texts:
<field name="image_upload" sortOrder="40" formElement="imageUploader">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">source</item>
            </item>
        </argument>
        <settings>
            <elementTmpl>ui/form/element/uploader/image</elementTmpl>
            <dataType>string</dataType>
            <label translate="true">Topic Image</label>
            <visible>true</visible>
            <required>false</required>
        </settings>
        <formElements>
            <imageUploader>
                <settings>
                    <required>false</required>
                    <uploaderConfig>
                        <param xsi:type="url" name="url" path="path/to/upload"/>
                    </uploaderConfig>
                    <previewTmpl>My_Module/image-preview</previewTmpl>
                    <openDialogTitle>Media Gallery</openDialogTitle>
                    <allowedExtensions>jpg jpeg gif png</allowedExtensions>
                    <maxFileSize>4194304</maxFileSize>
                </settings>
            </imageUploader>
        </formElements>
    </field>

im using this code on uploading image. then in my save action, im saving the image url path (eg. project.local/image/path). my problem is in the edit form. its not loading the saved image. can someone help me on how i can load the image in the edit form, or maybe an image field that i can use just to load the saved image. note that what im saving in the DB is the url path of the image.
Thank you
DataProvider.php
public function __construct(
    $name,
    $primaryFieldName,
    $requestFieldName,
    \My\Module\Model\ResourceModel\Topics\Collection $topicsCollection,
    \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor,
    \Magento\Framework\App\RequestInterface $request,
    array $meta = [],
    array $data = []
){
    $this->collection = $topicsCollection;
    $this->dataPersistor = $dataPersistor;
    $this->request = $request;
    $this->resourceHelper = $resourceHelper;
    parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
}

public function getData()
{
    if (isset($this->loadedData)) {
        return $this->loadedData;
    }

    $topicId = $this->request->getParam('topic_id');
    if($topicId){
        $topicCollection = $this->collection->addFieldToFilter('topic_id', $topicId);
        foreach ($topicCollection as $topic){
            $this->loadedData[$topic->getId()] = $topic->getData();
        }
    }

    return $this->loadedData;
}


texts:
I tried to customize my emails with the _email-extend.less in my theme.
But no matter what I try to do at the end Magento only compiles the email-inline.css instead of the email.css.
I also tried to copy the _email.less in my theme and changed some selectors but again ... nohting changed.

So what files do I need to create my own email.css?


texts: how to display a products brochures into slides in magento 1.9

texts: I want to add product brochure into slides like this, anyone please tell me that how can we add these type of slides, thanks


texts: Hide total shipping on Cart page Magento 2?

texts: I tried to hide the value of shipping method in checkout detail (summary) like in the picture below. Which file in checkout i should change?


texts: Certified Professional Developer Exam reading material

texts:
Recently Magento announced  Certified Professional Developer exam for Magento2.

After reading in this page https://u.Magento.com/magento-2-certified-professional-developer

I have some questions about the exam.

What is the passing score for this exam?
Which study materials useful for preparation of this exam?
Except from the Free study Guide, are there any other study materials available for this exam?
Are there any passing criterias for the Commerce (Enterprise) edition just like we have in the Magento 1 Developer Plus Exam?
What is the retake policy for this exam?
How many free retakes are available?


texts: Static-content deploy runs only for en_US by default

texts:
Is it possible to set other local as default for static-content deploy command somehow?

I have "he_IL" store (This is single lang store and I set this lang at the installation, nothing was added after).
In spite of this when I run

  php bin/magento s:s:deploy -f

I should always additionally point he_IL.

  php bin/magento s:s:deploy -f he_IL

I know - this is not big deal, but anyway: can change this somehow?

Thanks in advance!


texts: Magento 2 - Add newsletter checkbox on checkout order summary.

texts: Can anyone help me to Add newsletter checkbox on checkout order summary? Please check screenshot for exact requirement.


texts: Programmatically added quote item Option [additional_options] showing in cart but not showing in order details on front and admin

texts:
I Am Creating Quote Item Option [additional_option] To Cart.

I Am Using This Code Base

    $item->addOption([
        'product' => $data['product'],
        'code'  => 'additional_options',
        'value' => serialize($this->additionalCart)
    ]);
    $item->saveItemOptions();

Product added in Cart Successfully Added With All My Options And Showing On Cart Page And MiniCart,

but After Checkout & Placing Order Additional Options Are Not Showing In Admin->Sales->Order.

Is There Something I Forgot To add?


texts: How to generate Invoice like price group items x quantity x tax

texts: How can I generate invoice like items in the same price x qty, tax% and subtotal.


texts: Magento 2: Where do Third Party Modules Go?

texts:
I just installed the first official release of Magento 2.  I was surprised to find that the app/code folder was gone

app/code

This was for both the version downloaded from the website and the version installed via composer.  Also, when I tried to manually create the app/code folder, and then do a php bin/magento module:enable Pulsestorm_MyModule to enable a sample module, I got the following error

 Unknown module(s): 'Pulsestorm_MyModule'

Where are third party modules supposed to live?  If the answer is "a source repository and installed via composer", how does a module developer need to structure their modules to live in a Magento 2 repository?


texts: Add an default option to a product from product view

texts:
I want to give the customers a choice to wrap the order as a gift.

I know that I can add it as a custom option. But every product is wrappable.

I want to show an option for gift wrapping in the product view for every product and when you check it, it will be added to the product as an option in the shopping cart. But I don't want to add the option to every product in the backend.

Is that possible?


texts: Magento 2 Product Page Gallery Image Preview showing same image

texts:
Im facing a serious issue with Magento 2.36 product view image gallery. The Preview thumbnail images are showing same if there are multiple images.
The issue seems to be a conflict with Algolia Magento 2 Module. Also using the Codazon Magento 2 theme.
I have tried to clear the image cache and regenerate it, but no luck.


texts: Reverse filtering order in layered navigation

texts:
I have a custom filter attribute named User weight less than at my fitness stuff site.

The problem is that my clients wants to see products filtered by User weight more than

How can I get this?

I'm running Magento 1.9.10 and Ves Superstore theme.


texts: Magento promotion rule disappear in magento 1.9..0.1

texts: I've created a promotion rule in magento, after midnight thats promotion have disappear, someone know this problem?


texts: magento setup:di:compile crashes: Warning: array_replace_recursive(): Argument #1 is not an array in Writer.php on line 135

texts:
I uninstalled a module with command:

magento module:disable Dotdigitalgroup_Email

and once I run:

magento setup:di:compile

I get this error message:

Warning: array_replace_recursive(): Argument #1 is not an array in /home/playsports/public_html/magento2/vendor/magento/framework/App/Deploy
  mentConfig/Writer.php on line 135

I'm on Centos, PHP7.1


texts: Magento admin panel gives 404 when trying to enter cms pages

texts:
Magento admin display "404 error: Page not found." when I'm trying to enter CMS/Pages in the navigation.
All other pages work great and even other items in CMS menu, only Pages gives 404.
What should I do?


texts: All products not redirected to base URL after forced SSL

texts:
I forced SSL in Magento by going to Config -> Web and changing both the secure and unsecured settings to HTTPS.

The site works great so far... with the exception to one thing I found this morning.

Nearly every single URL on my site that is non-SSL before  doesn't redirect to its HTTPS version. instead it just redirects to the base URL.

Any ideas? What information do I need to present?

I added the following code to the .htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301,NC]

but instead of example i put in my url.

As soon as i did that and tried to refresh my page, i got an error that my site was not redirecting properly and it broke.


texts: Install Magento 2 on different mysql port

texts:
I have my nginx running on port 8080 and mysql running on port 3307. I want to install magento 2 cloned from git using CLI. Any idea how to configure the database which will use the port number 3307.

Can I just put --db-host = "localhost:3307"? Will this work for me?


texts: Magento2 backend order can not view details

texts: Why can I only see the order details of the pending state but can't see the details of other states? What does SC Auth mean?


texts:
I had installed Magento 2.3 without sample data , but i need sample data for some reasons.

Is there any way to get the sample data alone instead of re-dwonloading magento setup with sample data?


texts: Switch language on front page not working

texts:
I have installed a language pack for my magento 2 site.

wget https://github.com/mageplaza/magento-2-swedish-language-pack/raw/master/sv_SE.csv
php bin/magento i18n:pack -m replace sv_SE.csv sv_SE
php bin/magento cache:clean
php bin/magento setup:static-content:deploy sv_SE
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

The translations are ok! But when I change the language in the upper right corner on the front page nothing happends. The footer links are still in english on front page. BUT if I go to example search everything is translated
, but if I then go back to front page, nothing is translated.

Help?
Thank you!


texts: Magento 2 - event is not getting triggered - observer not working

texts:
This is my code. The event is not getting triggerd after I place a new order.
app/code/Company/RalSurcharge/etc/frontend/events.xml (i also tried app/code/Company/RalSurcharge/etc/events.xml)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_place_before">
        <observer name="company_ralsurcharge_sales_order_place_before" instance="Company\RalSurcharge\Observer\RalSurcharge2" />
    </event>
</config>

app/code/Company/RalSurcharge/Observer/RalSurcharge2.php
<?php
namespace Company\RalSurcharge\Observer;

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

class RalSurcharge2 implements ObserverInterface
{
    public function execute(Observer $observer)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/observer.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info("Hello from sales_order_place_before observer");
    }

}


texts: How to save the data using rest API in the table

texts: I have create request data need to save the data in the custom table using rest API endpoints


texts: Unable to resolve the source file. magento 2 admin sales order grid

texts:
In admin. We are getting this error open SALES=>Orders.

Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/Magento_Ui/templates/collection' #0 /var/www/abc.com/vendor/magento/framework/App/StaticResource.php(97): Magento\Framework\View\Asset\File->getSourceFile() #1 /var/www/abc.com/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\StaticResource->launch() #2 /var/www/abc.com/pub/static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource)) #3 {main}

I have tried
Delete all folder in pub/static/ expect .htaccess.
Run command: php bin/magento setup:static-content:deploy


texts: Add a custom content block within an existing content block of Magento Core

texts:
I'm trying to add a custom order attribute, that the user can define on the checkout page just after the list of the payment methods and before the button continue.

I want to do things as clean as possible, so I created my own module.

Im struggling with  something I thought it would be simple but I don't succeed to find a solution.

At the moment I only need to be able to display the template file in the following block .

Mage_Checkout_Block_Onepage_Payment

I created my template file which is only displaying a stupid text for the test
app/design/defaut/defaut/template/mymodule/custom.phtml
I know that there is no problem with this file while I used it on the index action of my module

I think the main issue is that I must not do properly the xml layout declaration.

Maybe you can help me

    <?xml version="1.0"?>
    <layout version="0.1.0">
<!-- this part is working well -->
        <mymodule_index_index>
            <reference name="content">
                <block type="mymodule/mymodule" name="mymodule" template="mymodule/custom.phtml" />
            </reference>
        </mymodule_index_index>
<!-- this part is not working at all -->
        <checkout_onepage_index>
            <reference="checkout.onepage.payment" >
                <block type="core/template" name="mymodule"  template="mymodule/custom.phtml" />
            </reference>
        </checkout_onepage_index>
    </layout>

Of course my module is well declared as the index method of my module is working.
is it my reference tag which is not good ?

Thanks in advance, this layout organisation gives me headache,

Best,

Anselme


texts: Do not apply any other shopping cart price rule if a particular shopping cart rule is applied

texts:
I have a promotional offer of 5% when a combo of two products is bought together. I also offer an additional offer of 5% when the customer subscribes to the newsletter. But i want some customization in this.

The customization goes like:
I do not want to allow any other shopping cart price rule when the promotional offer of 5% is allowed on cart.

I have overriden the Mage_SalesRule_Model_Validator class, but it doesnt help me.

Can anyone guide me.?
Any help would be appreciated.


texts: how many databases to use in integration

texts:
I am in the process of integrating magento and wordpress and then phpbb with wordpress ,how many databases should I use for security reasons eg:

1 - one database for all of them
2 - one for magento and one for
phpbb and wordpress.
3 - one database for each


texts: change "We can't find products matching the selection" massage in magento 2.1

texts:
I'd like to change this message to 'We can't find products matching the selection' and 'You don't subscribe to our newsletter' default massages.

Can anyone suggest how this can be done in Magento 2.1?


texts: Help me to place two fields in a row in shipping methods edit form

texts:
In our application 5 different product categories are available. I have created the form to mention the local and export shipping cost for each product type. I want to reorder the few fields display in tabular form. I have attached snapshots.

This is how currently displaying - http://i.stack.imgur.com/57U2k.jpg

Expected output - http://i.stack.imgur.com/U8NIX.jpg


texts: How to disable magnifier of product image on mobile devices in magento2?

texts:
I want to make magnifier disable in mobile device, I have tried below code in view.xml file but not working in mobile devices.

<var name="breakpoints">
        <var name="mobile">
            <var name="conditions">
                <var name="max-width">767px</var>
            </var>
            <var name="magnifier">
                <var name="enabled">false</var>
            </var>
        </var>
</var>

When i tap on product image in mobile devices page get blank.


texts: How to force shipping calculation in cart page?

texts:
I want to show the shipping amount on the shopping cart page. Currently Magento calculates shipping only on the checkout page. As a result when the user lands on the shopping cart page, he is not able to see the shipping amount.

How do I force Magento to calculate shipping on the shopping cart page itself?


texts: Configuring PayPal Express Checkout Settings - Sandbox Mode

texts:
I have created an account on PayPal sandbox and configured the API/Integration Settings to use the appropriate username, password and signature with a Magento 1.12 EE instance on my local server. This worked fine and now, I tried removing (emptying) the credentials and updating them again with the same values and now, on the frontend I am receiving the following error.

  PayPal gateway has rejected request. Security header is not valid
  (#10002: Security error).

As per some of the forum posts, I have cleared cache, logged out and logged backed in to Magento and I have tried the same credentials and I am receiving the above error.

Any help regarding this would be helpful.

For your reference,

Sandbox mode is set to Yes
API uses proxy is set to No


texts: Magento : How to get simple products details on configurable product page

texts:
On configurable product page, how do I get the information or attributes assigned to current product based on the Simple product which I associated to configurable product.

So if I had a Tile with 3 Finishes on there, Natural, Gloss, Textured and all these finishes have a different description and attributes values assigned to them how would i bring it up based on a finish being selected.

I'm using Magento 1.9 so "Simple Configurable Products" plugin doesn't work.


texts: Different payment method in multi website

texts: I am working on a multi website magento store. It has two websites: One is for International Customers and one for Nepalese customers. I know how to configure paypal and have done it for the international store. However, since in Nepal, we do not have online payment system, I want to use a system in which customer and Administrator will receive a invoice of the purchase in email. The company will then contact the customer and proceed as needed.Is there any way I can have PayPal enabled for International store and the invoice emailing option for the customers in Nepal?


texts: Insert block Custom form builder into PHTML?

texts:
i want add custom form builer in my landing page homepage.phtml

{{block type="formbuilder/frontend_form" name="frontend_form"
form_id="1"
template="formbuilder/form.phtml"}}

is posible add block into phtml file?
this is an option...

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('contacts/form.phtml')->toHtml(); ?>

but i need include form_id="1" into the code?


texts: M2 - Lots of product attributes and sets

texts:
We have a new webshop with photo camera's and all the accessories. We have 25+ attribute sets and the attributes sets have specific attributes (30+).

For example, a camera has the attribute set "Camera" in that attribute set there are 30+ attributes. You can see an example of the exact same thing here: https://www.fotokonijnenberg.nl/canon-eos-2000d-18-135mm-f3-5-5-6-is-stm-1
On the right you see all the attributes like i need them.

Is there a way to manage all those sets and attributs? On the front-end we must show the specific attributs also per product.

Regards,


texts:
i'm trying to update price when i change swatches in catalog.

I find this solution :

from https://github.com/magento/magento2/issues/3150

app/design/CUSTOM/THEME/Magento_Swatches/templates/product/listing/renderer.phtml

require(["jquery", "jquery/ui", "Magento_Swatches/js/swatch-renderer"], function ($) {
        $('.swatch-opt-<?php /* @escapeNotVerified */ echo $block->getProduct()->getId() ?>').SwatchRenderer({
            selectorProduct: '.product-item-details',
            onlySwatches: true,
            enableControlLabel: false,
            numberToShow: <?php /* @escapeNotVerified */ echo $block->getNumberSwatchesPerProduct(); ?>,
            jsonConfig: <?php /* @escapeNotVerified */ echo $block->getJsonConfig(); ?>,
            jsonSwatchConfig: <?php /* @escapeNotVerified */ echo $block->getJsonSwatchConfig(); ?>,
            mediaCallback: '<?php /* @escapeNotVerified */ echo $block->getMediaCallback() ?>'
        });
    });

to

require(["jquery", "jquery/ui","priceBox", "Magento_Swatches/js/swatch-renderer"], function ($) {
         var dataPriceBoxSelector = '[data-role=priceBox]',
            dataProductIdSelector = '[data-product-id=<?php echo $block->getProduct()->getId()?>]',
            priceBoxes = $(dataPriceBoxSelector + dataProductIdSelector);

        priceBoxes = priceBoxes.filter(function(index, elem){
            return !$(elem).find('.price-from').length;
        });

        priceBoxes.priceBox();
        $('.swatch-opt-<?php /* @escapeNotVerified */ echo $block->getProduct()->getId() ?>').SwatchRenderer({
            selectorProduct: '.product-item-details',
            onlySwatches: true,
            enableControlLabel: false,
            numberToShow: <?php /* @escapeNotVerified */ echo $block->getNumberSwatchesPerProduct(); ?>,
            jsonConfig: <?php /* @escapeNotVerified */ echo $block->getJsonConfig(); ?>,
            jsonSwatchConfig: <?php /* @escapeNotVerified */ echo $block->getJsonSwatchConfig(); ?>,
            mediaCallback: '<?php /* @escapeNotVerified */ echo $block->getMediaCallback() ?>'
        });
    });

But as you can read in the post, it don't update price. So hopefully someone find how to do it :

  Your solutions works @johnny-longneck. For the price format this is
  what I did:

  Instead of initializing the priceBox object on template file like:

  priceBoxes.priceBox();

  Pass the priceBox object as a parameter for SwatchRenderer

  priceBox: priceBoxes

  Then add the option to yout swatch-render.js constructor:

  priceBox: false,

  And then just initialize the priceBox at the beginning of the
  _UpdatePrice method:

  var $widget = this; $widget.options.priceBox.priceBox();

  Hope it helps to someone !!

Ok, i try to do it but it don't work. Can someone sho me where exactly put this code ? thanks !


texts: Paypal Hosted Solution (Iframe) - Wrong Language

texts:
I have found out this bug for Paypal HHS.

If the mercant location is set to italian, in the checkout page I have an Iframe hosted by paypal.

The issue is that the iframe come out always in Italia for all Store Views.

Any idea about how to deal with this ?

is it possible to add a parameter in the Iframe Url, to force a specific language ?

Reference Files:

app/code/core/Mage/Paypal/Block/Hosted/Pro/Iframe.php
app/code/core/Mage/Paypal/Block/Iframe.php
app/design/frontend/base/default/template/paypal/hss/iframe.phtml

https://www.x.com/sites/default/files/hostedsolution_uk.pdf


texts:
I have created a custom admin module and in my Model/Nic.php, I have created below function

public function toOptionArray()
{
    $nicCollection = Mage::getModel('nic/nic')->getCollection();

    $nicarray = array();
    $i = 0;
    foreach ($nicCollection as $nicList) {
        $nicarray[] = array('-1'=>'Please Select','value'=>$nicList['nic_id'],'label'=>$nicList['nic_name'],'nic_cost'=>$nicList['nic_cost']);
    }

     return $nicarray;
}

which gives me below array values when printed $nicarray,

Array
(
    [0] => Array
        (
            [-1] => Please Select
            [value] => 1
            [label] => America
            [nic_cost] => 3.4
        )

    [1] => Array
        (
            [-1] => Please Select
            [value] => 2
            [label] => China
            [nic_cost] => 2.3
        )

    [2] => Array
        (
            [-1] => Please Select
            [value] => 3
            [label] => India
            [nic_cost] => 4.5
        )

    [3] => Array
        (
            [-1] => Please Select
            [value] => 4
            [label] => Japan
            [nic_cost] => 2.5
        )

)

Now in my admin form, I am able to fetch values in dropdown format usign toOptionArray.

$fieldset->addField('nic_id', 'select', array(
    'label'     => Mage::helper('nic')->__('Nic'),
    'class'     => 'required-entry',
    'values'    => Mage::getModel('nic/nic')->toOptionArray(),
    'name'      => 'nic_id',
));

$fieldset->addField('nic_cost', 'text', array(
    'label'     => Mage::helper('coffeecomponents')->__('Nic Cost'),
    'class'     => 'required-entry',
    'required'  => true,
    'name'      => 'nic_cost',
));

What I need to do is to fetch the value of nic_cost in Nic Cost input field based on what is selected from dropdown.

So if admin selects America from dropdown, then in Nic Cost input field the value should be populated with 3.4 (as shown in array) and if China then value should be 2.3

How can I change value dynamically when option is changed/selected from dropdown ?


texts: How To Add Multiple Simple Product In Cart Programmatically Magetno 2

texts:
I want add multiple products in cart programmatically, but when I execute my code I see same product in cart added multiple times.
    public function addAllToCart()
    {
        $selected_values        = $this->getRequest()->getParam('selected_values');
        $array_selected_values  = explode(",",$selected_values);

        foreach ($array_selected_values as $product_id) {
            $params = array(
                'form_key' => $this->_formKey->getFormKey(),
                'product' => $product_id,
                'qty'   =>1
            );

            $product = $this->_productModel->load($product_id); //\Magento\Catalog\Model\Product $productModel
            $this->_cart->addProduct($product, $params); //\Magento\Checkout\Model\Cart $cart
            $this->_cart->save();
        }

        return $this;
    }


texts: Magento 2.3.3 - How to setup theme after migrate M1 to M2?

texts:
After successful migration theme setup not working, setup Magento luma theme not working.

Theme Setup :

My website look like:

Debug.log:

  main.ERROR: Unable to load theme by specified key: 'default/theme327k'
  [] []

Note : theme327k is my magento 1 theme.


texts: Add customer service number at the left of the header

texts: I want to add customer service number on the left side of the header. How can I do it? There is no option in the back-end to add number.


texts: Get order id (not increment id) on success page?

texts:
I am running Magento 2.2 and I want to get the order id on the success page.

$block->getOrderId() // returns 000000008 for example

I do not want 000000008, but the real ID from the database, like 11616. How could I do that on the success page?

Thanks!


texts: Limiting "Free Shipping" to Lower 48 States in Magento 2

texts:
I'm trying to limit the free shipping rule to just the Lower 48 States (i.e. not including Alaska and Hawaii). I've searched around for guides on how to do this is Magento 2 and all I saw are guides for Magento 1.* by using something called "Shopping Cart Price Rules"

Is this not achievable in Magento 2? Or I am missing something?

I've opened every single tabs in Stores > Configuration and did not see anything even close to "Shopping Cart Price Rules"

Thanks for the help!


texts: Security issue ? User with restricted scope can access ALL orders on a multiwebsite setup

texts:
Using Magento Cloud EE here but this issue might be the same on CE I'm not sure.

Create user foo
Create role test
Assign foo to test
Restrict website scope for test to www.website1.com only
Login with account foo : You can only browse orders made on www.website1.com : Good!
Connect using Rest API with same credentials : You can browse ALL orders, from ALL websites.
WoW !

Am I missing something here ?
Thank you for your kind help.


texts:
Am developing module in backend. i got the collection in grid as like bellow attached image.
But can't able to view particular record data when i want to click on each record to view all the information in magento block format(I can view at contoller)

The code is: Grid.php

 public function getRowUrl($row)
    {
           return $this->getUrl("*/*/edit", array("id" => $row->getId()));
    }

want to view data in edit block .

TestController.php

<?php  Class Sample_Test_Adminhtml_TestController extends Mage_Adminhtml_Controller_Action{

protected function _initAction() {
    $this->loadLayout()
        ->_setActiveMenu('test/items')
        ->_addBreadcrumb(Mage::helper('adminhtml')->__('Manage Shop Details'), Mage::helper('adminhtml')->__('Manage Shop Details'));

    return $this;
}

public function indexAction(){
    $this->_initAction()
        ->renderLayout();
}

public function editAction(){
$id = $this->getRequest()->getParam('id');
$model  = Mage::getModel('test/test')->load($id);
if ($model->getId() || $id == 0){
   $this->loadLayout();
   $this->_setActiveMenu('test/items');
   $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Manage Shop Details'), Mage::helper('adminhtml')->__('Manage Shop Details'));
   $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Manage Shop Details'), Mage::helper('adminhtml')->__('Manage Shop Details'));
   $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
   $this->_addContent($this->getLayout()->createBlock('test/adminhtml_test_edit'))
            ->_addLeft($this->getLayout()->createBlock('test/adminhtml_test_edit_tabs'));

}else{
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('test')->__('Shop details does not exist'));
        $this->_redirect('*/*/');
    }
     }
}

How can i view this data in Block/Adminhtml/Test/Edit.php


texts:
I want get all list tax classes like below images in frontend. But, I don't know where is magento 2 save model for tax classes data.

Thanks


texts: Magento1.9: New product Image upload from magento to pinterest

texts:
Is it possible to post a Magento product image to pinterest.

When I create product it's image is automatically uploaded from Magento to Pinterest.

Actually in my website there are 1000+ product images and i want to upload they all so is there any way to do that.


texts: Magento Extension - Where to store images?

texts: I am coding an extension for Magento 1.9. Now I need an image in my template. Where (which folder) should I store it? And how to access it with an <img>-tag?


texts: Getting a products custom option value (text field)?

texts:
How can I get the value of a custom option text field called "My Option"? This is what I have so far:

foreach($product->getOptions() as $option) {
    $optionTitle = $option->getTitle();

    if(preg_match('/.*my option.*/i', $optionTitle)) {
        //How can I get the value here? I tried:
        $optionValue = $option->getValue();
        $optionValue = $option['value'];
    }
}

The $optionValue var is always empty. Is that the correct way?

Thanks!


texts: Magento 2 - Get product final price in a block

texts:
How can I get product final_price attribute (affected by a catalog price rule) in a block?
I've tried in this way without success: $this->_productFactory->create()->load($idProd);

I've found price attribute only.

How can I do?


texts:
Using default LUMA theme and extended it for custom changes .

There is text in review form on product page:  " You're reviewing: " .

How can I change it or remove it from review form?

Don't tell hiding via CSS , Kindly help me removing or changing it via code

any help will be highly appreciated

Thanks


texts: Getting issue when click on product to product details page

texts:
Version:  Magento 2.2.0

Website URL: https://aat-testing.com/sinus-care.html

Theme : Magento default theme luma

when you click on the website URL you will see a product, the problem is that when I am clicking on the product for view in details page I am facing errors.

The Error is:

There is something related to price.phtml file finalpricebox_0
I have replaced files but still error showing, can anyone suggest me in right way what is the problem?  please many thanks in advance. I am new in Magento 2.

here is price.phtml i have found in the module :

<div class="price-box range second price-final_price" data-role="priceBox" data-product-id="<?php /* @escapeNotVerified */ echo $block->getProductId() ?>">

            <?php if ($block->getDisplayLabel()): ?>
                <?php /* @escapeNotVerified */ echo $block->getDisplayLabel(); ?>
            <?php endif; ?>
            <span <?php if ($block->getPriceId()): ?> id="<?php /* @escapeNotVerified */ echo $block->getPriceId() ?>"<?php endif;?>
                data-price-amount=""
                data-price-type="finalPrice1"
                class="price-wrapper">
                <?php /* @escapeNotVerified */ echo $block->getDisplayValue();?>


texts:
I am new to Magento API. I am developing Android application using SOAP v2 API. I am able to get login successfully and get session id. By using this session id I am able to get the list of products which are in my Magento web.

Now my problem is, I am getting approximately 850 products, so web service is getting little more time to response. I want to set limit in the request so that I gets only 20 records in each request. I have used filters but I don't think it will help me to solve my problem.


texts: Want to edit Default Billing and Default shipping address individually

texts:
Right now if I edit only default billing address then automatically update default shipping address.
Can anyone have any code idea to customize this?


texts: Is it possible with CE 1.7 or m2epro to retrieve the actual PayPal fees for a given order?

texts:
I'm working on a net profit report with Magento CE 1.7 and m2epro and need to factor in the accurate cost of PayPal fees.  Ebay fees are similar, and for those I found the getFinalFee() method on M2ePro/ebay_order.

Is there an equivalent method for retrieving the PayPal fee amount, either in M2ePro or in the stock Magento PayPal integration?


texts: css file : failed to open stream: No such file or directory

texts:
in my case i have added a less file to compile a css file in my Base Module , but after I run this command "bin/magento setup:static-content:deploy -f" an error was occured like belllwo
  [Magento\Framework\Exception\FileSystemException]
  Cannot read contents from file "/var/www/html/myproject/pub/static/frontend/Magento/blank/en_US/Mymodule_Base/style.css" Warning!file_get_contents(
  /var/www/html/myproject/pub/static/frontend/Magento/blank/en_US/Mymodule_Base/style.css): failed to open stream: No such file or directory

Ps : i have already grant all privileges with chmod 777 ans also with chown

can anyone help me please to run the command correctly


texts: Site very slow, exhausted all options. Really need assistance

texts:
Ok, i have come to the end of my tether on fixing the speed of my site. I have spent hours and days researching and applying all methods to get the page load speed to improve, whilst i've noticed some improvements with 90% of my extensions currently disabled it's still not how it should be.

I have a relatively high spec server - 32GB RAM, 512GB SSD drives, intel 8core cpu, apache + varnish + cloudlinux with many tweakings done to mysql, php etc

I will outline what i've done so far:

GZIP Compression - ON
Varnish on backend - ON
Nexcess Turpentine - ON
Compress CSS + JS
Deactivated near enough all extensions apart from whats needed
Use of CDN (cloudflare)
Optimization of images

Yet i still get a page load time of around 4.5 seconds on average.

The only thing i can think of it being is the theme? I've hit a brick wall on my limited level of expertise and always try and find out how to do fix things before posting, i've become desperate for some assistance.

Domain is: www.modxpc.com (bear in mind many extensions are off also cdn, so the speed now should be the current "best")

Profiler Results (click screenshots to enlarge)

Following onto the comments regarding AOE Profile, these are the results:

https://nimbus.everhelper.me/client/notes/share/490310/mfpas7yfre5etenzhheo

I've sorted it from the highest time, i see a lot of time is being taken up by catalog_category_view. Where do i start with this?

https://nimbus.everhelper.me/client/notes/share/490321/z3dg1w51t39efsn5sigb

Nearly all of my navigation has a catalogue url rewrite, would that cause this? Profiler shows left-products.phtml as the culprit?


texts: A master web site able to display products in other website which is independent

texts:
I have a master website. And I have a set of customer website who have there own admin and store. They can apply in master website so that products in master website or store can be displayed in these customer store who have there own website.

Is it possible using magento, if so can any one help me to solve it.

eg.

site 1.com is a master.
     This site will have an admin and front end to display its own product.

other sites eg 2.com, 3.com 4.com will have there own admin and front end to display there own products.

site 2, 3, 4, etc can apply in site 1 such as products from site 1 can be displayed in site 2, 3, 4 ,etc.


texts: Found 2 elements with non-unique id #billing-new-address-form Magento 2

texts:
When on the checkout page, I receive the following console error when selecting the shipping method and going to the next-step 'payment'.

[DOM] Found 2 elements with non-unique id #billing-new-address-form:
[DOM] Found 2 elements with non-unique id #billing-save-in-address-book: `

How can I resolve this issue?


texts: Security Patch Installed But Still Getting Critical Message In Backend

texts:
I have successfully installed the latest Magento security patches. I did this via SSH. And used this official Magento documentation as a guide:

https://info.magento.com/rs/magentocommerce/images/Installing-a-Patch-for-Magento-Community-Edition.pdf

After running the sh command I got a success message:

  Checking if patch can be applied/reverted successfully... Patch was
  applied/reverted successfully.

I then did the usual Clear Cache and Run Compilation Process in my Magento backend.

However when I logout of my backend and log back in, I am still greeted with the Critical messages saying:

  Urgent: Immediately install Magento critical security patches

Does this mean the patches were not installed successfully? How can I tell is a security patch is in place correctly?

Thanks


texts:
After a migration, The website is loading fine. BUT...

If I try to do certain things that require access to the database (ie: add/remove a product image), I get this message:

SQLSTATE[42000]: Syntax error or access violation: 1142 TRIGGER command denied to user 'heav_admin'@'localhost' for table...

Magento is trying to use the old database username? (* without the "en"

The env.php file has the correct user in it "heaven_admin'  ( *with the 'en"

I can't find anywhere else it's stored in! I have tried:

php bin/magento setup:config:set --db-user heaven_admin
I can't make a new user with that prefix
deleting var/static folders and regenerating
banging my head on keyboard

Does anyone have an idea where magento is getting that old username from?

Thank you!


texts: Magento 1.9 Observer - How to disable Payment method in Observer?

texts:
I want to assign specific payment method only for selected one customer group,

successfully get customer group & Payment method code,

How to add condition, following are my workout,

Following Tutorial : https://meetanshi.com/blog/disable-payment-method-programmatically-in-magento/

workout :

<?php
    class Gta_FindPaymentGateway_Model_Observer
    {
        public function paymenter($Observer)
        {
            if(Mage::getSingleton('customer/session')->isLoggedIn())
            {
                // Get group Id
                $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();

                //Get customer Group name
                $group = Mage::getModel('customer/group')->load($groupId);

                $allPaymentMethods = Mage::getModel('payment/config')->getAllMethods();

                foreach($allPaymentMethods as $paymentMethod)
                {
                    if(($paymentMethod->getCode() == 'payubiz') && $group->getCode() !== 'Tester'))
                        {
                            $result = $Observer->getResult();
                            $result->isAvailable = false;
                        }
                }
            }
        }
    }
?>

Above script no error, but condition not working.


texts:
When I go to my admin page, the Sign In panel which is supposed to display ,isn't displaying. Instead I'm only getting this plain background color.

The default store front (localhost/magento/) shows up with the basic header and footer with the message

"CMS homepage content goes here."

How to fix this error :

"CMS homepage content goes here."


texts:
I've been searching around and struggling to find a conclusive answer to this.

I've followed the steps mentioned here:
http://nsmchami.wordpress.com/2014/03/15/magento-remove-tax-from-invoice/

Which has removed the "Tax" header in the column, but it's still displaying the price, like so:

So the question is how can I remove this price from the Invoice PDF?

Any help will be hugely appreciated.


texts: Magento 2 - Header: Logo, Nav, and Mini Cart on one line

texts:
I am using Magento 2.0 with a copy of the blank theme.

I am trying to get the logo, nav, and mini cart on one line but I can't figure it out.

How would I do this with the blank Magento theme?


texts: Internal Server Error when magento2 website host in SubDomain

texts:
I got Following type of error

  Internal Server Error The server encountered an internal error or
  misconfiguration and was unable to complete your request.

  Please contact the server administrator at
  webmaster@nn.packparadise.com to inform them of the time this error
  occurred, and the actions you performed just before this error.

  More information about this error may be available in the server error
  log.

  Additionally, a 500 Internal Server Error error was encountered while
  trying to use an ErrorDocument to handle the request.

Thank you in Advance


texts: How to customize shopkeeper registration and customer reisigtration

texts: I'm new to magento and I would like to understand how to differentiate the customer registration that you register to purchase products and shopkeeper who exposes the products for sale.


texts: How to save tranasction id and do online refund for redirect based payment module in magento 1

texts:
I have made a redirect based payment module in magento 1. I am not doing capture in model file. With all details i am redirecting user to payment gateway and after payment user is getting back to site.

I am saving orders detail on overriding OnepageController and successAction.

My question is i want to add refund method in this module so admin can do online refund from Magento admin. But only Offline Refund is showing there not online refund. I think this is happening because transaction id is not saving in sales_payment_transaction tables but for this i do this code

$orders = Mage::getModel('sales/order')->loadByIncrementID($lastOrderIds);
$payment = $orders->getPayment();
$hpp_obj->setTransactionId($transId);
$payment->setParentTransactionId($transId);
$payment->setIsTransactionClosed(0);

But it is not doing anything.
How to do this?


texts:
Let's say that I have a module that resides in community/Company/Badmodulename, this is an old version of the module and the current version of it resides in community/Company/Actualmodule.

Now, I have a server with the old version of the module, I remove all the old files and install the new version. I also update core_config_data so that all the references there that used to point to company_badmodulename/... now use the new path the module uses (e.g. company_actualmodule/...). If the module has an install script that results in a line in core_resource then obviously I'll also update this if applicable.

Now I try clearing my Magento cache, I re-save user roles and I restart Apache. Yet the new version of the module isn't loading.

Oh well, maybe my new version of the module is broken? But it's not, it works fine on dozens of other Magento installs, it's just that this particular Magento install apparently just doesn't want to put in the effort to try to actually load this module.

This is something which happens to me way too often and I'd like to know, what's the one surefire way to give Magento a good-ol' "no, you go through everything in app/etc/modules/ and you load it, right now!" kick in the pants?

And in case you're wondering, yes I'm having this problem right now. The config panel for the old version of the module is no longer there but looking in the "disable modules output" list I still see the old version of the module which has been completely removed and the new one is nowhere to be found (and the new one isn't broken, it works fine on other Magento installs, file permissions are fine, the problem is that Magento isn't even trying to load it, that's what I want to force).


texts: Magento2 with nginix + ssl + varnish admin redirect loop issue

texts:
everything working fine, but when I enable secure admin (ssl) it gives redirect loop issue. I am not able to use admin pannel also cross origin issue for front ens static content.

I am using ssl over nginx + varnish.

I tried so many things (even may stackexchange answers) but no luck. can someone help me to tackle this issue.

Nginx configuration (magento2 nginx sample config included).

upstream fastcgi_backend {
  server   unix:/run/php/php7.0-fpm.sock;
}
  server {
    server_name mydomain.com www.mydomain.com 1xx.xx.xx.xxx; #private Ip included
    listen 8080;
    set $MAGE_ROOT /var/www/html/mysiteconf;
    set $MAGE_MODE developer; # or production

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;
  #mujassam
        #fastcgi_param HTTPS on;
    include /var/www/html/mydomain/nginx.conf.sample;
  }
server {

      # listen 443 ssl;

      #added by mujassam
      listen 443 ssl http2; #m ## listen for ipv4; this line is default and
      implied listen [::]:443 ssl http2;
      server_name www.mydomain.com;

      ssl_certificate /etc/ssl/certs/www_mydomain_com.crt;
      ssl_certificate_key /etc/ssl/private/www_mydomain_com.key;
      ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
      #mujassam
       #  fastcgi_param   HTTPS               on;
       # fastcgi_param   HTTP_SCHEME         https;
       ssl_prefer_server_ciphers on;
      ###
      ssl_ciphers               'AES128+EECDH:AES128+EDH:!aNULL';
      ssl_session_cache    shared:SSL:10m;
      ssl_session_timeout 24h;
      keepalive_timeout 300s;
location / {
    proxy_pass http://127.0.0.1:80;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Ssl-Offloaded "1";
    proxy_set_header      X-Forwarded-Proto https;
    proxy_set_header      X-Forwarded-Port 443;
    #mujassam added
    proxy_set_header X-Forwarded-Ssl on;
    #proxy_hide_header X-Varnish;
    #proxy_hide_header Via;
    proxy_set_header X-Forwarded-Proto $scheme;
 }
}

Hope Some body can help.


texts: magento can the associated products of a configurable product inherit details?

texts:
I have created a configurable product so that I can add sizes to my products and each individual associated product can have a quantity unique to the certain sizes of product.

However I have 5 different sizes; extra small, small, medium, large and extra large.

This means I have to create 5 products per every single product and as the; name, short_description, long_description, price, tax, etc.. all are required fields i find myself repeating the data a ridiculous amount of times, and its just not realistic way to run the system.

Is there a way that and associated products i create will inherit the attributes of their parent? Literally all i want to be able to have unique is the size and quantity?

Magento Experts please help?


texts: Product Visibility preventing coupon code

texts:
I (someone I am working with) have a magento store ( well you already know that or I won't be posting here ).

I have set up few products and few promotions. Some of the products have catalog and search visibility while other products have no visibility. When a customer adds an item which has catalog and search scope ( vis ) the promotion works fine; but if the customer chooses product with no visibility the promotion is not recognized.

Have any of you faced similar problem in past? Any productive reply is welcomed.

Thanks in Advance,


texts: Magento 2: In header searching search products collection matching with products name only

texts: I want to search product collection matching only with products name not from another like description, sku, attributes etc in Magento 2 header searching.


texts: Filter with Price Not shown in Navigation Layer

texts: I have a simple product under same category with different prices and my store is multilingue (i use the same currency euro), i just configured the price as manual and i checked that price is filterable with results but it'is not shown  to filter


texts: I want to do a custom login form and account create form for "partners". I will have the default login for normal users and the custom one for the partners. Anyone has some pointers on how I could tackle this?


texts: Quantity Increment and Decrement Button not work in Magento 2

texts:
I'm using custom modules to show quantity increment/decrement in quantity box
using KnockoutJS.

Making custom modules for every folder is correct.but it nothing happpend, after click on increment/decrement button on product details page in magentov2.1.9.

I followed this link during this task:

https://magenticians.com/quantity-increment-decrement-magento-2/

what are missing from my side.


texts: can phone number appear in the left side of the header in homepage and in the right side of the header in the categories page?

texts:
I have created a static block in magento in which i have inserted the following code in order to get the phone number information

  {{config path="general/store_information/phone"}}

I am also echoing that static block in header.phtml but i am facing a problem. I want the phone number of my store to be displayed in the left side of the header in the homepage and in the categories page i want it to be displayed in the right sider of the header. The reason i want that is because some elements move around when the customer goes from the homepage to categories page.
Is this possible?


texts:
I was testing a Magento shop and suddenly mysql stopped working and fails to restart. Any ideas how to get it working again? I have magento running on Apache and Varnish if that's useful information.

/var/log/mysql.err shows this kind of error:

130826 14:20:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130826 14:20:04 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Incorrect file format 'plugin'
130826 14:20:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130826 14:20:04 InnoDB: The InnoDB memory heap is disabled
130826 14:20:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130826 14:20:04 InnoDB: Compressed tables use zlib 1.2.3.4
130826 14:20:04 InnoDB: Initializing buffer pool, size = 128.0M
130826 14:20:04 InnoDB: Completed initialization of buffer pool
130826 14:20:04 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130826 14:20:04  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130826 14:20:04  InnoDB: Waiting for the background threads to start
130826 14:20:05 InnoDB: 5.5.32 started; log sequence number 6690661
130826 14:20:05 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
130826 14:20:05 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
130826 14:20:05 [Note] Server socket created on IP: '127.0.0.1'.
130826 14:20:05 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format '$
130826 14:20:05 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

SOLUTION:

I found a solution to this problem of mine. The key was the fatal error at the bottom of that error listing.

Reconstruct the main tables host, user and db. First:

cd /var/lib/mysql/
tar czf /root/mysql.tgz mysql
cd mysql
rm -rf *
mysql_install_db

At this point I had to start MySQL.

Grant permission for 'debian-sys-maint' user. Password for that user will be present in /etc/mysql/debian.cnf

GRANT SHUTDOWN ON *.* TO 'debian-sys-maint'@'localhost' identified by '7868hugbYVHVTYHBMH';
GRANT SELECT ON `mysql`.`user` TO 'debian-sys-maint'@'localhost' identified by '7868hugbYVHVTYHBMH';

Then I had to add a new user to database with new password and configure those again to Magento. After that I just cleared the cache and session folders and Magento started working again.


texts: How to solve magento 2 localhost not working properly

texts:
I already run comment

sudo chmod -R 777 var/www/html/myproject/*

but still not showing
how i can fix this??


texts: When I wanted to login in my localhost xampp server with magento I got a problem. The problem is that magento when I enter my user account gives me a key but he didn't redirect me to my admin home page. I have changed my password with mysql but it still doesn't work. I neither got an error that means that the username and password are correct. But it does nothing.


texts: How to remove Sell link from footer links in Magento 2?

texts:
There are a footer link name 'Sell' is coming. I need to know their module name in magento 2. Here is the screenshot of the link on checkout pages.

This link take the user to  site-address/marketplace/. Here is the screenshot of marketplace page.

I want to remove it from footer links. Can any body has any clue that where this block is coming?


texts:
I am running on a dedicated setup with a dual core processor and 4gb ram.

My setup is as follows:

nginx - 1 worker process / 1024 child processes
php5-fpm - max_memory = 1024
varnish
2 websites each with one store which in turn each have 2 stores

I am in a testing stage at the moment and the site is running quickly even when accessing pages not in the cache.

That being said the php5-fpm process is running almost constantly at 50% (a whole processor), even when there are no visitors.  The admin panel runs quite slowly.  The memory is only running at about 500mb

I am afraid that when the site goes live we will run into issues.

Is there a way that I can find out why the process is using so much cpu?


texts: Use phtml in stead of html for emails in magento 2

texts:
Im overwriting the template vendor/theme/Magento_Email/email/header.html
I want to add php in this template. Is there a way to include a template in header.phtml?
I currently have this which doesn't give an error but it doesn't load the template.
The template file is located in vendor/theme/template/email/email.phtml
{{block type='core/template' area='frontend' template='email/email.phtml'}}


texts: Magento invoice vat calculation missing product vat

texts:
I'm using magento CE 1.9.2.4, and i'm struggling with this issue:

In all of my orders invoices the vat calculation of the product is missing.

Example:
My order view which has the good calculation:

The orders invoice:

I tried to change a lot of settings, but nothing seems to work right.


texts: Magento2 : How to call CMS page link in PWA

texts:
I have Created one CMS page and Added in Static block like below code :

About

Called static block in venia-concept/src/components/Footer/footer.js using below code

    <CmsBlock area="footer" identifiers={['footer-link']} />

but I am getting below error when click on about link

Error: ENOENT: no such file or directory, stat '/var/www/html/pwa-studio/packages/venia-concept/dist/about'


texts: Redirect user to specific CMS page upon registration?

texts:
I would like to make Magento redirect the user to a specific CMS page right after s/he submits the account registration form. Something like a "thank you" page for having registered.

How to do that?


texts: Magento1.9 - Failed to find a valid digest in the 'integrity'(PCI compliance)

texts:
I have generated the SHA-256 and added in the integrity tag like below.

<script type="text/javascript" integrity="sha256-65DEQpj8HBSb+/YImG+9LCeuQeRkm5NMpJWTH6hSuFZ+" src="example.com/media/js/90a8720cd608ccab8eaf40398728caf8.js">

I am getting the below error in the console:

  Failed to find a valid digest in the 'integrity' attribute for
  resource 'example.com/media/js/90a8720cd608ccab8eaf40398728caf8.js'
  with computed SHA-256 integrity
  "65DEQpj8HBSb+/YImG+9LCeuQeRkm5NMpJWTH6hSuFZ+" The resource has been
  blocked.

I have also tried with SHA-384 and SHA-512.

Thanks.


texts: Change position of Billing address in Magento 2

texts:
I want to change default billing address position which is coming under the payment information, I need it before shipping address(same as magento 1).

Anyone have any idea to achieve it, Please help?


texts: Flat rate Shipping is not applying on Not Logged In customers

texts:
Flat rate Shipping is not applying on Not-Logged-In customers.

But In Shipping Method Highlighted It is saying that KD 2 is shipping charge

I have added free Shipping rule according to this answer Free Shipping Rule


texts: Search not working properly on front end website, we are using Magento 1.7.02

texts:
I have a problem with our search on front page of our website.
It is not showing the correct result,
For ex:  I search blood Bank, it searched lot of thing related and unrelated, but didn't find the product I was expecting. I made sure all the words are existing. I even tried to find the same product by SKU code, but it didn't appear that way as well.
The manage stock is no, so there is not issue with the inventory.
I did find, If I disable and then re-enable that product, it starts searching those products. What is this issue and can it be fixed. Can I disable and re-enable the products in group rather then doing it one by one

Thanks
Raj


texts: I am trying to get the hours of operation (preferably using the object manager), but I cannot find a way to do this...


texts: Update custom option value of item in cart Magento 2

texts:
I have custom option for one of my product.

I am able to save it's value in cart programatically using below code:

 $params = array(
         'form_key' => $this->formKey->getFormKey(),
         'product' => $product_id,
         'qty'   =>1,
         'options'=>$options

 );
$this->cart->addProduct($_product, $params);
$this->cart->save();

Where $options is array like below:

$options=array("option_id"=>"option_value");

Now i want to update this custom option value of cart item.

How can i do this?


texts: Magento 2 - Plugin for invoice creation after its saved

texts:
I am trying to find the correct method to create the afterPlugin for. I need to collect and send the invoice data after it is created and saved, I tried with both afterRegister and afterPay but both works before the invoice is saved, please advise which method should be used to capture a newly created invoice after it is saved. So it would have incrementID, createdAt, etc...

I would prefer a plugin rather than an observer

Note: I am trying to do this function when the user hit submit button and its only for newly created invoices, not edited ones (if that is possible)

Magento 2.2.0


texts: Magento 1 Uncaught exception 'Exception' with message mcrypt_generic_deinit()

texts:
Recently I've configured some old Magento 1 project in my local with the PHP version 5.6.
When i try to edit the customer details from admin I am getting the Exception mcrypt_generic_deinit().
after i got to know the function has been deprecated (https://www.php.net/manual/en/function.mcrypt-generic-deinit.php)
So here i am looking for the solution to fix the problem, for your better understand I've attached a screen shot of the problem.
Thanks in advance for your better support.


texts: how to enable fedex Free Shipping for all products in magento 2

texts: Magento 2.3.2 We use only FedEx for shipping. FedEx shipping is set up and working fine, rates are being calculated correctly. but we want to give free shipping to all customers. I all ready enable Free Method(ground)However, it is not being applied to FedEx.


texts: Date are preserved even after clear filter in Magento 2 UI grid

texts:
On the order grid, I have applied the 'Purchase Date' filter which is working fine.
But after press the  'Clear all' link and apply the filter again.

The date is preserved in date related filter (See below).

I am sure this will be occurring with all the date filter in all Magento UI grid.

Well, How can I, remove the date value after clear the filter?

Thanks


texts: Adding proxy for class hidden behind interface

texts:
If I want to add proxy for class Psr\Log\LoggerInterface (for example it is used only in catch block, which is not reached with every request) in my di.xml I should replace it with proxy like this:

<type name="some\class\path">
    <arguments>
        <argument name="logger" xsi:type="object">Psr\Log\LoggerInterface\Proxy</argument>
    </arguments>
</type>

or I have to put class implementing/hidden by some APIs behind this interface - something like:

<type name="some\class\path">
    <arguments>
        <argument name="logger" xsi:type="object">some class implementing\hidden behind Psr\Log\LoggerInterface</argument>
    </arguments>
</type>


texts: Magento 2 : How to remove $this->messageManager->addError() message from php file

texts:
I have already added the error message using

$this->messageManager->addError('Error');

after some condition we need to remove that particular error message from php file not JS.

Thanks


texts: Unable to apply PATCH_SUPEE-7405 to CE 1.8.0.0

texts:
I get a couple of errors, the first one the patch fails on the first hunk for  app/code/core/Mage/Core/Model/Email/Template/Filter.php

The second error is it can't find the file app/code/core/Zend/Xml/Security.php On closer examination, I don't even have an app/code/core/Zend/Xml directory in my installation!

I don't see any prerequisite patches listed for SUPEE-7405, is there?


texts: setting up layered navigation template from catalog.xml

texts:
I am trying to set up the root template of <catalog_category_layered> from catalog.xml

I know how to use admin to change the root template for categories, but i want to change it from 'catalog.xml'.
I added

<reference name="root">
            <action method="setTemplate"><template>page/product_view_custom.phtml</template></action>
</reference>

in <catalog_category_layered> just after the node starts. But it is not taking that template.

EDIT:
IS the final say which layout is to be loaded for a category page is decided by magento admin? I guess YES.

If YES is there any way i can hard code my required layout to magento. Even if it means editing the core file i don't mind as this is for a internal beta release of an existing website. Why I am trying to do this is if i change anything in Admin it screws the live site

NOTE : The answer below was accepted as my question was slightly different initially. and for that it works fine.


texts: Re-direct from products' URLS with categories towards products' URLS without categories: how to do it?

texts:
this is my problem with my Magento-CMS based e-commerce: when the e-commerce was created, all products'URLS contained the categories. This means that for each product there could be several different URLS, beacuse of the categorization, but displaying the same content. I put an example here: the following 4 URLS all display the same content:

http://www.arredocasabiancheria.it/bagno/asciugamani/sfuso/asciugamani-hotel.html (URL with category)
http://www.arredocasabiancheria.it/asciugamani-hotel.html (URL without category)

So, I set Magento configuration to show in the URL only product's name WITHOUT  categories, to fix the problem.
However, the problem still is not fixed: this because meanwhile those URLS have been indexed by Google, so I still find online all of them, which is not good for SEO.
What I need to do, is redirecting each URL-with-category to its corrispondent URL-without-category: anyway, products in my e-commerce are so many, so I need to do it authomatically... How can I do it?


texts: how to know the customer is creating or updating in magento

texts:
I have a validations for customers. So, these validations or depending on Customer creating and updating.

Please let me know there is any chances to know weather there is customer is creating(registering) or updating(existing customer)?

Thanks in Advance.


texts: How to avoid js tag merging (from addJs) in magento?

texts:
I discovered that Magento - when calling the addJs php function and when using the layout.xml file - merges all the javascript  tag in one single tag, producing something like

<script src="domain.com/js/scriptA.js,/js/scriptB.js,/js/scriptC.js"> etc...

How can I disable this (awful) feature?


texts: Magento Mysql database import fails in the end of the process

texts:
I trying to import Magento store Mysql dump file via Navicat for Mysql to the new VPS

Cannot add or update a child row: a foreign key constraint fails
CONSTRAINT FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID FOREIGN KEY (`event_id`) REFERENCES `index_event` (`event_id`)
ON DELETE CASCADE ON UPDATE CASCADE

I've added SET foreign_key_checks = 0; in the beginning of .sql file, and SET foreign_key_checks = 1; in the end - nothing changes.
Also I've tried this: [Restoring a backup of a Magento database][1] - the result is the same

  Error at query 9370: Cannot add or update a child row: a foreign key
  constraint fails (rain.#sql-7ac4_55, CONSTRAINT
  FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID FOREIGN KEY
  (event_id) REFERENCES index_event (event_id) ON DELETE CASCADE ON
  UPDATE CASCADE)

Error at query 9478: Variable 'sql_mode' can't be set to the value of 'NULL'
Error at query 9479: Variable 'foreign_key_checks' can't be set to the value of 'NULL'
Error at query 9480: Variable 'unique_checks' can't be set to the value of 'NULL'
Error at query 9481: Variable 'character_set_client' can't be set to the value of 'NULL'
Error at query 9483: Variable 'collation_connection' can't be set to the value of 'NULL'
Error at query 9484: Variable 'sql_notes' can't be set to the value of 'NULL'

Can somebody help me please?


texts: Add disabled product to quote & special pricing

texts:
I'm busy creating an order programmatically, and want the process to add the product list to the order regardless of the product status.

It works fine, but when the product has a status of disabled (i.e status value is 2) then the price that is saved is 0.00. (I see this in the sales_flat_quote_item table).

I've tried calling Mage::helper('catalog/product')->setSkipSaleableCheck(true); but that doesn't help either.

Here's the full code

foreach ($product_ids as $id){
            $product = Mage::getModel('catalog/product');
            $product->load($id);
            $product_info = array('qty'=>$product_qtys[$counter]);
            $quote->addProduct($product, new Varien_Object($product_info));
            $counter++;
        }

I've also tried using custom pricing, and that doesn't seem to affect the price on the quote at all. Any ideas?


texts: CSS and JS files for external theme not working in magento

texts:
I installed magento 2 and the luma theme works fine but on installing an external theme(multi stores by netbase), the page only loaded the header and complained about not being about not being able to load a style-m.min.css resource.

I have tried all means, cleared cache,removed static folder, merged css and js files, I still got the same result.

What should I do?


texts: Make same customer use different sessions on different browsers

texts:
Unfortunately, due to circumstances beyond my control, I need to make
the following configuration work:

Alice logs in as a Customer with username foo.

Then Bob logs in as the same Customer (foo) on a different browser.

Alice and Bob each have separate shopping carts. When Alice adds
something to the cart in her browser, Bob's cart is not affected.

In Magento's default configuration, Alice and Bob share one cart
stored on the server, and thus the cart is synchronized between them.
Is there any way I can force Magento's sessions to work the way I need
them to?


texts: Magento 2.2.3 How to check if attribute exist in current product?

texts:
I want to check if attribute exist in current product by attribute code.

For Ex: attribute code if color and this attribute is assign to current product. but if i pass something else like abcde and this attribute doesn't exist in current product.

So how can i filter is current value is not attribute?


texts: Can't login to Magento admin after migration

texts:
I recently set up a new Linux server for development

Then I went to my production Linux server that has my current magento website.  I modified the configuration to use a new url like https://developmentarea.mysite.com then i cleared out the magento cache.  Then I zipped up all the magento files and mysqldump the database.

i moved everything over to the new linux server.  Installed the magento site.  I am able to see the product pages on this new development area.

When I go to the admin area, and I'm asked to login, I am unable to.  I put in my username and password, press submit, and i'm redirected back to the login page.  I notice that once i'm redirected back to the login screen, there is no error message saying I entered the wrong username or password.  I see in the browser url that this bit has been added https://dev.mysite.com/index.php/admin/index/index/key/4727dbc6df408ace4070a39aa72f9289/.  This leads me to suspect that I perhaps I actually did login, but was kicked back out.

Does anyone know why I can't login to the admin area even though the database should be a copy of the production but with all the urls changes?


texts: Notice: Array to string conversion In Magento

texts:
if (false !== ($data = Mage::app()->getCache()->load($_lessCacheId))) {
                $_oldLessConfig = unserialize($data);
                if (count(array_diff_assoc($_oldLessConfig,$_newLessConfig)) == 0 && count(array_diff_assoc($_newLessConfig,$_oldLessConfig)) == 0) {
                    $_hasChange = 0;
                }
                else{
                    $_hasChange = 1;
                    Mage::app()->getCache()->remove($_lessCacheId);
                    Mage::app()->getCache()->save(serialize($_newLessConfig), $_lessCacheId, array('EM0131_LESS_CSS_CACHE'), 86400);
                }
            }`

`


texts:
I'm testing Magento on the localhost and I need to make some changes to the product page template.

I have been able to create a custom theme and modify it but I do not understand how to override the custom product page.


texts: Product Star Ratings Summary not displaying in every store view

texts:
On a product page of our site when customers leave reviews with star ratings, the start rating summary (average) is displayed at the top of the product page.

But I've noticed that when we change the store view the star rating summary  disappears from the top of the page and only the rating links remain.

I've looked at the code in: app/design/frontend/base/default/template/review/helper/summary.phtml

<?php if ($this->getRatingSummary()):?>

        <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%">

<?php endif;?>

And $this->getRatingSummary() returns '0' rather than '100' when I change the store view from the store view in which the customer left their review in.

Is there anyway I can display the star ratings summary no matter what the store view is?

On the admin panel I've set the review to be visible in all store views i.e. Catalog > Reviews and Ratings > Customer Reviews > All Reviews


texts: Remove Shipping Costs for specific products

texts: We have a selection of products for which do not require shipping costs. How do I apply this in Magento, so that when these products are added to basket, there is no shipping cost upon checkout?


texts: Magento 2 Dynamic Arrays in new tab of customer edit section

texts:
How to show a "Dynamic Array" in new tab of customer edit section in admin Magento 2 as in screen shot below.

On clicking on the new tab sya "custom Tab", I need to show a Dynamic array like


texts: Orders belongs to custom created order status is not showing in my account recent orders?

texts:
I created a custom order status like below.

config.xml

<sales>
    <order>
        <statuses>
          <backorders translate="label">
            Back Orders
          </backorders>
        </statuses>
        <states>
          <backorders translate="label">
            Back Orders
            <statuses>
              <backorders default="1"/>
            </statuses>
          </backorders>
        </states>
   </order>
</sales>

mysql script

<?php
$installer = $this;
$installer->startSetup();
// Required tables
$statusTable = $installer->getTable('sales/order_status');
$statusStateTable = $installer->getTable('sales/order_status_state');

// Insert statuses
$installer->getConnection()->insertArray(
    $statusTable,
    array('status', 'label'),
    array(
        array(
            'status' => 'backorders',
            'label' => 'Back Order'
        )
    )
);

// Insert states and mapping of statuses to states
$installer->getConnection()->insertArray(
    $statusStateTable,
    array('status', 'state', 'is_default'),
        array(
            array(
                'status' => 'backorders',
                'state' => 'backorders',
                'is_default' => 1
            )
        )
    );
$installer->endSetup();

During the back order the order status is saved to backorders and it will show in the admin panel order list.
My question is the same order is not showing in the customers my account recent orders section.

Why this orders under status of backorders not showing in recent orders page?

In  the admin panel if we create an invoice the order status is changed to Processing, but if i create an invoice for the orders wich belongs to backorders are not changed to Processing.But if i completed the shipping for backorders order it will change the order status to Completed

What is the issue causing this?

UPDATE : This is how i update the order status in the observer

$order->setData('state', 'backorders');
$order->setStatus('backorders');
$history = $order->addStatusHistoryComment('', false);
$history->setStatus('backorders')->setData('state', 'backorders')->setIsCustomerNotified(false);
$order->save();

system->Order Statuses Screen


texts: Maximum quantity per order magento not per product

texts:
I want to set maximum quantity per order not per product. I tried to set the
System->Configuration->Catalog->Inventory->Maximum Qty Allowed in Shopping Cart to 3, as per requirement only 3 item per order, The problem is when I tried to add 9 items 3 per product it is allowed. What I want is just to set 3 on whole cart regardless of item.
Does anyone know a way to achieve this? Thanks


texts: Attribute Selection At the time of Creating Simple Product

texts:
I want to put attribute selection at the time of creating Simple Product like "Configurable Product". When admin select attributes only those attribute can be display at the time of product creation from admin panel. So how can I achieve this functionality. Any Idea and Help will be Appreciate.

I am Using Magento Version : 1.9.3.4.


texts: How to remane "Cancel" button in sales order view?

texts:
I have to rename "Cancel" button to "Cancel Whole Order" in sales->order->view in admin panel. Currently "Cancel" button is being created in

class Mage_Adminhtml_Block_Sales_Order_View extends Mage_Adminhtml_Block_Widget_Form_Container {......}

and I am adding some new buttons to grid as following

class AG_ABC_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View {

public function __construct() {

    parent::__construct();
    $this->_addButton('button_id', array(
        'label' => Mage::helper('ag_abc')->__('ABC - Generate All'),
        'onclick' => "pdfAllClick('" . $this->getOrder()->getIncrementId() . "','" . Mage::helper('ag_abc/abc')->getItemDataUrl() . "','" . Mage::helper('ag_abc/abc')->getUrl() . "')",
        'class' => 'go'
            ), 0, 100, 'header', 'header');
    $this->_addButton('delete_order_id', array(
        'label' => Mage::helper('sales')->__('Delete selected line item(s)'),
        'onclick' => "deleteOrderItem('" . $this->getOrder()->getIncrementId() . "','" . Mage::helper("adminhtml")->getUrl("/custom/deleteOrderItem/") . "')",
        'class' => 'go'
    ));
}}

What should I do. I don't want to override the functionality.I just need to change the label of button. How can I override label.


texts: Template hints will not turn off, even after clearing cache?

texts:
Magento ver. 1.9.2.4

I know this is a common problem and I've followed the advise I found, but nothing is working.

Here is what I have tried:

Disabled blocks
Made sure System / Config / Advanced / Developer / Main Site / Template Path Hints is turned off
Cleared cache (no change)
Turned blocks on
Cleared cache (no change)

Advise very welcome please


texts: Deprecated Functionality: crypt() Magento 2.2.6

texts:
I am getting following error after installing a new module in application. How can i fix this error.

Exception #0 (Exception): Deprecated Functionality: crypt(): Supplied salt is not valid for DES. Possible bug in provided salt format


texts: We are looking to place product across various marketplaces, but for internal reasons cannot keep these items active on our main site. Will the inventory for these items update in Magento even if they are disabled? Unfortunately we have not sold any of these types of SKU's in our marketplaces, and are looking at software that will pull our inventory direct from Magento. Version is 1.12.0.0