texts:
We have recently migrated Magento1 to Magento2.we found that url_rewrite table has almost 16000000+ rows.
M1 site was build before 6 years and the url rewrite table has increased over the years.
This website has around 6000+ categories and 8000+ products.
Is there a good article or process that we can optimize this table to increase the performance.
We want to make sure we do not lose any SEO URLs.
Thank you


texts: category/ url key not accept language other than english?

texts:
i want to input some chinese url key for seo optimization in my region, but when i input some chinese character, the category and product was saved nothing.

Any solution?


texts: using addExpressionFieldToSelect for EAV model

texts:
I am trying to get records of nearby places within some distance from given latitude and longitude from an EAV model in which latitude and longitude are attributes.

I am using below code but getting 500 error when addExpressionFieldToSelect is used to select distance using expression.

$collection = Mage::getModel('test/test')->getCollection()->addAttributeToSelect(array('latitude','longitude'));

    $collection->addExpressionFieldToSelect('distance', '( 6371 * acos( cos( radians(23.0130648) ) * cos( radians( {{latitude}}) ) * cos( radians( {{longitude}}) - radians(72.4909026) ) + sin( radians(23.0130648) ) * sin( radians( {{latitude}}) ) ) )', array('latitude'=>'latitude', 'longitude'=>'longitude'));

    $collection->getSelect()->having('distance > 10');

    foreach($collection as $c)
    {
        echo $c->getLatitude();echo "<br/>";
        echo $c->getLongitude();
    }


texts: Multi website frontend page is broken after upgrading to 2.3.3

texts:
I have a Magento 2 multi-website with each website has their own store view, after I upgrade it from 2.5 to 2.3.3, the main website is looking fine, but the others are broken and when I inspect, got an error like this:

(index):1 Refused to apply style from 'pub/static/_cache/merged/0cb08dac7714064caf47f5c9bb91fcb6.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

* I already deleted the pub/static/frontend and make sure the pub/static/.htaccess is there, and run:*

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

but still got the same error


texts:
I have a menu which has some images and I also use SSL certificate for the site. I saw that the images from menu are loaded through http on a https page and I'm getting that notice that the page isn't secure. Is there any way I can get it work without verifying the link and put manually there https?
This is what I have right now:

<img src="'.Mage::helper('catalog/image')->init($product, 'small_image')->resize(165, 140).'" alt="'.$product->getName().'" border="0" />


texts: How to include Materialize framework into Magento 2

texts:
I need to use Materialize framework in Magento 2.

As per the documentation, to add external css/js resources I edited default_head_blocks.xml as

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <!-- Add local resources -->
    <css src="css/my-styles.css"/>

    <!-- The following two ways to add local JavaScript files are equal -->
    <script src="Magento_Catalog::js/sample1.js"/>
    <link src="js/sample.js"/>

    <!-- Add external resources -->
    <css src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css" src_type="url" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/js/materialize.min.js" src_type="url" />
</head>

Now I'm getting the error as "Module name "jquery" has not been loaded yet". Screenshot below

Is there any better way to include the files? Need some help...


texts: Magento 1.9.3 upgrade other problems encountered

texts:
After 1.9.3.0 version upgrade, the only problems faced so far are

Configurable Swatches stopped working (on all themes)
Product tabs content are all shown in product page (specific themes)

Has anyone else encountered these problems? Possible solutions?

Thanks in advanced.


texts:
This is my unit test in my custom module:

namespace Star\Trek\Test\Unit\Model;

class BeyondTest extends \PHPUnit\Framework\TestCase
{

}

How can I get my Magento 2 base URL in there?


texts: While waiting for an update, I'm still using an old magento 1.6 version and we've seen spam on our register form. How can I add captcha to the form?


texts: Unable to change status of an order after CB Payment. Only "Pending" as an option

texts:
I hope somebody can help on that. Once a payment is made via CB using the ATOS payment module, the order is created automatically as well as the related invoice.

Mar 4, 2015 3:35:50 AM|Processing
Customer Not Notified
Client came back from the payment platform.

Mar 4, 2015 3:34:50 AM|Processing
Customer Notified
Order created.

Mar 4, 2015 3:33:36 AM|Processing
Customer Notified

However the status cannot be changed to something else than "pending", and it is the only option in the select box. For any other payment method, it is possible to change the status to anything else.

I checked already quite a few posts here but none of the solutions provided are fitting. Thank you for the help in advance.


texts: How to upload video with our extension on magento connect?

texts:
You guys are surely familiar with magento connect market place for magento products. You might have seen that there are many products on magento connect have base video rather than base image on their product view page.

I want to know about the process and limitation (if any) of how to uplaod video with our extension on magento connect.

Thanks in Advance.


texts: Onepage checkout customer creation method

texts:
I need to change default behavior of onepage checkout customer creation method, but i am unable to locate it.

All i found was method submitOrder Mage/Core/Sales/Model/Service/Quote.php where i see:

        if ($quote->getCustomerId()) {
            $transaction->addObject($quote->getCustomer());
        }

Please help me to find where are magento receives user inputed form data from one page checkout, thanks !


texts: Get product outside magento directory without knowing ID

texts:
I've got a CSV full of SKU's that I need to load outside the Magento directory to make some changes.

So far I have this:

require_once('bla/bla/../../app/Mage.php');
umask(0);
Mage::app();

$product1 = Mage::getModel('catalog/product')->load(15186);
$productid = Mage::getModel('catalog/product')->getIdBySku('thatsku');
$product2->load($productid);
var_dump($product1);
var_dump($product2);

In this case, $product1 returns the product as expected, but $product2 returns bool(false).
Same thing happens when I try this:

$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
var_dump ($_product);

$product also returns as bool(false) here.

Any idea on what's going on?

EDIT: Sorry I'm dumb. There was no SKU in the database even thought I could've sweared I added it for testing sake. This code works.


texts:
My website Title Tags are not considered as H1 by most of the seo tool analyser. How to fix this issue.

here is the analysis URL Site Checkup

Here is the URL of my website: MyFitFuel


texts:
I've noticed my indexed pages are dropping from Google like a rock. I'm reviewing everything that was changed in the last month. I noticed in my Google Webmaster Tools that there were some inaccessible pages, to compensate I blocked them with my robots.txt file, see bellow:

User-agent: Baiduspider
Disallow: /
User-agent: *
Disallow: /index.php/
Disallow: /*? Disallow: /*.js$
Disallow: /*.css$
Disallow: /checkout/
Disallow: /tag/
Disallow: /catalogsearch/
Disallow: /review/
Disallow: /app/
Disallow: /downloader/
Disallow: /js/
Disallow: /lib/
Disallow: /media/
Disallow: /*.php$
Disallow: /pkginfo/
Disallow: /report/
Disallow: /skin/
Disallow: /var/
Disallow: /customer/
Disallow: /productdata/
Disallow: /productscripts/
Disallow: /includes/
Disallow: /wishlist/
Disallow: /shop/
Disallow: /supplier/
Disallow: /eng/catalog/gallery/
Disallow: /fr/catalog/gallery
Disallow: /eng/catalog/product/gallery/
Disallow: /fr/catalog/product/gallery
Disallow: /eng/cms/index/noCookies
Disallow: /fr/cms/index/noCookies
Disallow: /eng/catalog/view/_ignore_category/
Disallow: /fr/catalog/view/_ignore_category/
Disallow: /eng/customer/
Disallow: /fr/customer/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/

Disallow: /*?dir*
Disallow: /*?dir=desc
Disallow: /*?dir=asc
Disallow: /*?limit=all
Disallow: /*?mode*`

Is my robots.txt file too restrictive?


texts: magento 2 setIsDefaultBilling not working

texts:
I want to save customer address via external script and I want to make different default shipping address and default billing address. In this I can set default shipping address and not able to set default billing address for the second address.
Code:
public function SaveDefaultBillingAddress($customerId,$data){
     /*Magento\Customer\Api\Data\AddressInterfaceFactory*/

    $billingaddress = $this->dataAddressFactory->create();
    $billingaddress->setFirstname($data['firstname']);
    $billingaddress->setLastname($data['lastname']);
    $billingaddress->setTelephone($data['telephone']);
    $billingaddress->setStreet($data['street']);
    $billingaddress->setCity($data['city']);
    $billingaddress->setCountryId($data['country_id']);
    $billingaddress->setRegionId($data['region_id']);
    $billingaddress->setIsDefaultBilling(1);
    $billingaddress->setCustomerId($customerId);

    try
    {
        /*Magento\Customer\Api\AddressRepositoryInterface*/

        $this->addressRepository->save($billingaddress);
    }
    catch (\Exception $e) {
        return __('Error in shipping/billing address.');
    }
}


texts: How to configure subscription product purchase using paypal in Magento 2

texts:
I need to configure subscription product in Magento 2 while placing an order with Paypal payment option

In Magento 1 I have done this rewriting method the getStandardCheckoutFormFields file Mage_Paypal_Model_Standard

where I can merge the additional params of recurring profile by follwoing way

public function getStandardCheckoutFormFields()
{
    $result = parent::getStandardCheckoutFormFields();

    $result["redirect_cmd"] = "_xclick-subscriptions";

    $result = array_merge($result, array(

      "a3" => round(500,2),
      "p3" =>"6" ,
      "t3" => "M",
      "src" => "1",
      "sra" => "1",
      "item_name" => "Subscription Product",
      "item_number" => "12345",

    ));

    return $result;

}

How can I do this in Magento 2

I have found instead of form submitting these all things are done by API call from vendor\magento\module-paypal\Model\Api\Nvp.php.

But I don't know how this get here
from

  vendor\magento\module-paypal\Controller\Express\Start.php

to

  vendor\magento\module-paypal\Model\Api\Nvp.php

file this will be great help if anyone can parse the path.

Thank you


texts: Magento 2: mini cart icon not appearing in my custom theme

texts:
I'm creating a custom theme which is extended from Luma theme. For some reason, the Cart icon is not being displayed. I removed search box and Default welcome msg! through deafult.xml. But I'm sure I've not touched anything related to minicart. Can anyone please help where to look to fix it?
Deafault.xml:

<body>
    <referenceContainer name="header.panel">

        <referenceBlock name="register-link" remove="true" />
        <referenceBlock name="authorization-link" remove="true" />
        <referenceBlock name="top.search" remove="true" />
        <referenceBlock name="wish-list-link" remove="true" />
    </referenceContainer>

    <referenceBlock name="show_part" remove="true"/>
    <referenceBlock name="header" remove="true"/>
    <referenceBlock name="skip_to_content.target" remove="true"/>
    <referenceBlock name="skip_to_content" remove="true"/>
    <move element="logo" destination="header.panel" before="my_account_link" />
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_file" xsi:type="string">images/logo-white-outline.png</argument>
            <argument name="logo_img_width" xsi:type="number">150</argument>
            <argument name="logo_img_height" xsi:type="number">170</argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="form.subscribe" remove="true"/>
    <referenceBlock name="footer_links" remove="true"/>
</body>


texts: SOLVED Magento 2.3.6 not connect to backend

texts:
while checking the orders in the backend, changing page, the Chrome browser gave me an error:
Unable to reach the site
The web page at ... may be temporarily unavailable or has been permanently moved to a new web address.
ERR_INVALID_RESPONSE

I can no longer access the administrative side, but the site is visible. It happens with all browsers.
How can I resolve and log back into the backend?
UPDATE: Chrome console show error: Failed to load resource: the server responded with a status of 500 ()

UPDATE2: I solve, there was a conflict with an extension. I have disable it and now works


texts: Because of search_tmp page is loading very slow magento2

texts:
I am loading product collection in custom page. It is taking almost 26 seconds to load the page. I have 4.5 million records and the number of products per page is  only 30. Also there is no layered navigation.
Can anyone tell me what is wrong here ?


texts: Magento 1.9 - Catalog -> Manage Products not Exporting All Products To CSV

texts:
I am having an issue where exporting products under Catalog -> Manage Products in the admin panel is not exporting the entire product collection to a CSV. It is only exporting a small number of products (between 50 and 400).

What can I do to make it so that all products are exported?

Edit: I am aware of the ability to export it from System -> Import/Export, however that is not an option. The user who needs access to this CSV does not have FTP/SSH access to our server.

Thanks!


texts: Magento2 Product details page not displaying images after installing s3

texts:
Magento2 Product images not getting displayed on Product details page
I used following extension for S3 Bucket

https://github.com/thaiphan/magento2-s3/wiki/Installation

On details page error image is getting Forbidden

Failed to load resource: the server responded with a status of 403
(Forbidden)
https://s3.ap-southeast-2.amazonaws.com/monogramtestbed/catalog/product/cache/648bd0b6614023c7d4802a253ddbf578/c/r/cream_2_.jpg


texts: How to get store config inside a theme template

texts:
I am trying to add the store's phone number setup in Stores > Configuration > General > General > Store Information to the header in my theme. In a module I think this could be done using getValue() in \Magento\Framework\App\Config\ScopeConfigInterface but I cannot see a way how to use this inside a theme. So far I have added this to default.xml

 <referenceContainer name="header-wrapper">
      <block class="Magento\Framework\View\Element\Template" name="store.phone.number" template="Magento_Theme::phone.phtml" />
 </referenceContainer>

but I do not know how to get the phone number inside phone.phtml


texts:
I am running magento 2 and would like to convert my text attribute to a dropdown menu. I am comfortable to mysql and php but i do not really understand that database structure.

Is it possible to convert text attributes to drop down lists if so can you give me some pointers

I have seen this
but this is for Magento 1.9


texts: SUPEE-8788 and SUPEE 1533 (How to approach?)

texts:
As many are aware if you have SUPEE 1533 installed you cannot install SUPEE 8788.

I figured that Reversing/uninstalling Supee 1533, we can install SUPEE 8788. But, then we cannot install SUPEE 1533 back. How to approach ? Should we forget about installing SUPEE 1533 after we install SUPEE 8788? Or should we manually modify the

Original DashboardController.php (1.7.0.2- Not pached, Fresh from magento)

  if ($params = unserialize(base64_decode(urldecode($gaData)))) {

1533 Patched  DashboardController.php contains the following change

 if ($newHash == $gaHash) {
            $params = json_decode(base64_decode(urldecode($gaData)), true);
            if ($params) {

8788 patch makes the following change in DashboardController.php

 if (hash_equals($newHash, $gaHash)) {
            if ($params = unserialize(base64_decode(urldecode($gaData)))) {

As you can see 8788 has a modified change compared to 1533 so as other suggest its not ideal to manually replace 8788 change with 1533 after installing 8788.

Any suggestions?


texts: Custom link in Account dashboard Magento 2 with order history

texts:
I am trying to add custom link in account dashboard of customer account navigation.
Used below code to add link on left side in my layout/default.xml

   <body>
    <referenceBlock name="customer_account_navigation">
            <block class="Magento\Customer\Block\Account\SortLinkInterface" name="history-link">
                <arguments>
                    <argument name="path" xsi:type="string">orderview/history/index</argument>
                    <argument name="label" xsi:type="string">Order History</argument>
                     <argument name="sortOrder" xsi:type="number">50</argument>
                </arguments>
            </block>
    </referenceBlock>
</body>

And added below code in my layout/oderview_history_index.xml

   <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<head>
    <title>Order History</title>
</head>
<update handle="customer_account"/>
<body>
    <referenceBlock name="page.main.title">
        <action method="setPageTitle">
            <argument translate="true" name="title" xsi:type="string">Order History</argument>
        </action>
    </referenceBlock>

    <referenceContainer name="content">
        <block class="Vendor\Module\Block\Order\History" name="module.history"  cacheable="false" template="history.phtml"/>
    </referenceContainer>
</body>

I am able to add the link successfully and my template file is loading there,

In my template file i am looking for code to show all the orders, invoice and shipments in table view along with the pagination and filters.

Like the My Orders history page of default magento2, but here can we show all orders, invoice and shipments in table view one after the other?

Is something that can be achieved? Please anyone suggest me on this. Thanks


texts:
[EDIT]

Added screenshot showing can't run any of the CLI commands being suggested:

[/EDIT]

Implemented add new table official learning module (http://devdocs.magento.com/videos/fundamentals/add-a-new-table-to-database/) with no issues.

Implemented add new product attribute official learning module (http://devdocs.magento.com/videos/fundamentals/add-new-product-attribute/), and the # magento setup:upgrade step yields:

  magento_user@ubuntu:/var/www/html/magento.dev/app/code/Learning/ClothingMaterial/Setup#
  magento setup:upgrade
      Notice: Undefined index: websites in /var/www/html/magento.dev/vendor/magento/module-config/App/Config/Type/System.php
  on line 248

Now I'm getting the install screen when I visit the store.

  Welcome to Magento Admin, your online store headquarters.  Click
  'Agree and Set Up Magento' or read Getting Started to learn more.

Tried uninstalling the module # magento module:disable Learning_ClothingMaterial --clear-static-content and re-running # magento setup:upgrade amd # magento setup:di:compile but upgrade yields same error as above and compile yields:

  [Exception]   Warning: array_replace_recursive(): Argument #1 is not
  an array in /var/www/html/magento.dev/vendor/magento/fram
  ework/App/DeploymentConfig/Writer.php on line 135

It's impressive that following along with an official tutorial causes this level of destruction. Really hope there's an easy fix, as have had to re-install a half-dozen times now due to very similar issues.

Env: a vanilla composer CE 2.2 sandbox, on a bare metal Ubuntu 16 LAMP with PHP 7.1.


texts: optimization view: magento scales down images to the proper size, what if we have large images,can it hurt the website?

texts:
Suppose that our thumbnail image is 1000x1000 pixel although it should be 133x100 pixel, magento automatically will re-size it and show the re-sized image on the page, I know that it can slow down the website when we have large images, but I want to get an official answer of:
Yes, it slows down the website even when magento has re-sized images.
I need to know the reasons why it is best to have the images smaller. the reason which I can think is that the KB of an image even when the re-sizded one has been shown is more than when it is smaller, moreover resizing make magento to process the resize which means adding load on the website.(I don't know if it will be processed once or each and every time?)
Does the resizing happens once when we are uploading the image or does it take place everytime we need to see the image on the page?
as an example I have uploaded one large image which has been resized in a static block, when I go to the image url although I am seeing the resized one, I can see that the source URL still has the bigger image which means it can lower the performance of the website.
I need to bring more reasons to convince our team to go through thousands of products and update the images,I appreciate any help on this.


texts: Magento 2: How to get order data in observer on success page

texts:
I'm here domain.com/checkout/onepage/success/

Calling my observer on checkout_onepage_controller_success_action

$order = $observer->getEvent()->getOrder();
echo $order->getCustomerId()
echo $order->getState()

I'm not able to get all information above. How to get?

It gives

  Fatal error: Call to a member function getState() on null


texts: Display specific static block based on two or more applied filters - magento

texts:
I have the following code, but it does not work.

        <?php $appliedFilters = Mage::getSingleton('Mage_Catalog_Block_Layer_State')->getActiveFilters();
        if (is_array($appliedFilters)) {
            foreach ($appliedFilters as $item) {
            if ($item->getFilter()->getRequestVar()) {

            switch ($item->getFilter()->getRequestVar()) {

            case ('attribute_1') :
                $_displayStaticblock = $this->getLayout()->createBlock('cms/block')->setBlockId('static_block_1')->toHTML();
                break;
            case ('attribute_1') && ('attribute_2') :
                $_displayStaticblock = $this->getLayout()->createBlock('cms/block')->setBlockId('static_block_2')->toHTML();
                break;
            case ('attribute_1') && ('attribute_2') && ('attribute_3') :
                $_displayStaticblock = $this->getLayout()->createBlock('cms/block')->setBlockId('static_block_3')->toHTML();
                break;
            }
            }
            }
        echo $_displayStaticblock;
        }
        ?>

I need to display specific static block based on applied filters, but I do not know how to do it. Please help!


texts: Drop down attribute: "Please use letters only"

texts:
I created a new product attribute ("Presentation") as a drop down menu, the two available values are "Aerosol" and "Pail". When I try to select one of these two attributes, I get the error message "Please use letters only (a-z or A-Z) in this field.
"Aerosol" and "Pail" comply with these rules, I also tried lower case, and there's no accidental space anywhere.
To me, this looks like a bug, but I might as well just be missing something. Would somebody know how to fix that?
Here's how I set up the attributes.
And here's the error message I get.
Thanks a lot for any help.


texts: Getting error Maximum call stack size exceeded at place-order button click

texts:
When I am trying to place an order I am getting an error like RangeError: Maximum call stack size exceeded at one-page checkout place order button click

Pre Conditions

1) One-page chceckout extension (https://marketplace.magento.com/espl-onepagecheckout.html)

2) Webkul Stripe extension (https://store.webkul.com/magento2-marketplace-stripe-vendor-payment.html)

Also getting the same error after disable ESPL one-page checkout extension

    Uncaught RangeError: Maximum call stack size exceeded
    at Function.Sizzle [as find] (184add52e34e0cecaf06d4f72a2a5050.min.js:247)
    at jQuery.fn.init.find (184add52e34e0cecaf06d4f72a2a5050.min.js:381)
    at jQuery.fn.init (184add52e34e0cecaf06d4f72a2a5050.min.js:387)
    at new jQuery.fn.init (eval at require.load (184add52e34e0cecaf06d4f72a2a5050.min.js:175), <anonymous>:29:16)
    at jQuery (184add52e34e0cecaf06d4f72a2a5050.min.js:206)
    at UiClass.getData (eval at require.load (184add52e34e0cecaf06d4f72a2a5050.min.js:175), <anonymous>:13:1)
    at UiClass.address [as selectPaymentMethod] (eval at require.load (184add52e34e0cecaf06d4f72a2a5050.min.js:175), <anonymous>:9:218)
    at HTMLInputElement.eval (eval at require.load (184add52e34e0cecaf06d4f72a2a5050.min.js:175), <anonymous>:360:164)
    at HTMLInputElement.dispatch (184add52e34e0cecaf06d4f72a2a5050.min.js:499)
    at HTMLInputElement.elemData.handle (184add52e34e0cecaf06d4f72a2a5050.min.js:472)

I have also checked var/log folder but not cleared why this error comes

Please give me any solution if anyone faced/knew this issue.

Thanks in advanced.


texts: ConfigurableProduct: How to get the configurable products out of stock?

texts:
I want to show all the attributes from my configurable product on my select. I followed this tutorial: Magento 2.2 How to show out of stock in configurable product, with some changes and fixes.

So, I can't override the configurable.phtml file, because the Magento Interceptors can't load the decorateArray method.

What I want exactly is for the products to be displayed in this format, like image:

But I don't know where the method to override this is located and how to get all product attributes.


texts: Redirect 301 removing parameters in URL by .htaccess

texts:
In the file .htaccess in magento, I want to redirect a url with parameters. An example is this:

https://example.com/presente/decoracao/teu-sorriso?PageSpeed=noscript

I need to redirect this to the same page, as in the example below:

https://example.com/presente/decoracao/teu-sorriso

In my .htaccess file, I try the following code without success:

RewriteRule ^presente/decoracao/teu-sorriso(.*)$    /presente/decoracao/teu-sorriso? [L,R=301]

When I use the %{REQUEST_URI} syntax it always redirects me to /index.php because of the particularities of Magento. Another way I tried was the following, but without success too:

RewriteCond %{QUERY_STRING} ^PageSpeed=noscript$ [NC]
RewriteRule ^/?presente/decoracao/teu-sorriso/?$ /presente/decoracao/teu-sorriso? [L,R=301]

I've been trying to do this in several ways, but all of them to no avail. Thanks in advance!


texts: Featured and related products REST API Magento 2

texts: Is there is a built in REST APIs for both Featured and Related products in Magento because I looked in the reference and couldn't find?


texts: Getting the product collection from an advanced search

texts:
I'm trying to get the product collection containing only the products that appear in a search, from inside app\design\frontend[theme]\catalog\layer\view.phtml

I've tried:

$search = Mage::getSingleton('catalogsearch/advanced');
$searchCollection = $search->getProductCollection()->addAttributeToFilter('visibility', 4);

and

$searchCollection = Mage::getModel('catalog/category')->getProductCollection();
$searchCollection = Mage::getSingleton('catalogsearch/advanced')->prepareProductCollection( $searchCollection );
$searchCollection = $searchCollection->getProductCollection();

Both of these return every single product on the site, not just the ones in the search results.

Can anyone help?


texts: How to add static CMS content in pdf invoice

texts: I have been trying to customize existing invoice pdf, and I need to add cms static block, is there any way to include static cms block(let's say 'warehouse address') inside PDF invoice??


texts:
Is it possible to create 200 sub option of color option in magento 1.9x.

For example : color (type select box)

Sub options are: RED, YELLOW, FLORENCE WALNUT, BOARDWALK OAK , GREEN...up to 200..

I am using magento 1.9x and have create 200 sub options through admin panel.
But in front-end, it only show 109 sub-options.

When i checked the product from back-end (catalog->manage product -> & go to custom option of product & it is showing only 109 options though i did create 200 options.)


texts: Why my migration M1 to M2 result in error 404 on all pages?

texts:
Any page including /admin which worked before data migration now displays:

  "There was no 404 CMS page configured or found"

Trying running

php bin/magento cache:clean
php -f bin/magento cache:flush
php -d memory_limit=-1 bin/magento indexer:reindex
php -d memory_limit=-1 bin/magento setup:upgrade
php -d memory_limit=-1 bin/magento setup:di:compile

after successfully migrating settings/data but still no luck.

I see products in MySQL if I connect to DB directly but no page is accessible and nothing is updating in var/log/*.logs

Went from 1.9.1.0 to 2.1.6

Thanks.


texts: Magento 2 Adminhtml spreading forms across multiple tabs

texts:
I'm attempting to create a backend module, where in my edit page I use admin-2column-left layout.

I want to have a form on each tab, but I don't know how I can do this.
Ideally, I would like to know how to assign different form uiComponents to different tabs, or how I can define one uiComponent for my form, but be able to assign which field set goes on which tab.

My specific situation, which provokes this question, is that I want to have a standard form on one tab (multiple text inputs), and on another tab, I want to have a dynamicRows UI component. We have called these tabs Main and Line Items.

  Currently, I am implementing this as follows:
  Main is defined in the _prepareForm method within its block, which is a class extension Form\Generic. This form appears and works fine until I add the dynamic rows.

My layout file has code to add the Main tab and assign content block. As well it has a container named line_items, which contains a uiComponent for the form containing dynamic rows.

The Line Items tab is created in the _beforeToHtml method of the Widget\Tab, and its content is assigned by using a call to getChildHtml on a line_items container.

The tab works and is populated with the correct structure, allowing me to add and remove rows.

  The issue is that when I submit the page, only the inputs in the Line Items tab are submitted.

So I know I have not set this up correctly, and need some way to instruct it to track and submit all the form elements. Most of this implementation is derived from my attempts to reverse engineer the setup of the Category Product Attributes form, which is similar to what I want to do.

Anyone have idea about it?


texts:
I installed Magento 2 with sample data.
I used the Luma theme and changed everything, adding pages and other information.
I would like to remove the Try Demo Customer Access block but find nothing from the settings.
Please help me.


texts: Product Catalog images cannot be indexed

texts:
In Magento 2, I site: my site in google images, and I found that all the large images didn't be indexed by google, I checked the code in product catalog page, all these images in gallery was shown like

  https://www.mysite.com/pub/media/catalog/product/cache/thumbnail/88x110/beff4985b56e3afdbeabfc89641a4582/2/0/3291/2472/sans-manches-tulle-printemps-robe-de-soiree-demoiselle-d-honneur-turquoise-gland-empire-decollete.jpg

looks that makes google doesn't indexed it, how to make google index all of my products images?


texts: Fetch Record through the parent_id instead of entity_id in Magento2

texts:
Here I want a Billing and Shopping addresses according to order_id. I receive a order data in my order object but it will give me just one record according to entity id.I want both address of order(billing and shipping).How to get the record through parent id instead of entity id.

 protected $order;

public function __construct(
\Magento\Sales\Model\Order\Address $order
) {
$this->order = $order;
}

public function orderlist($orderid) {
$order = $this->order->load($orderid);
$billingAddress = $this->order->getData();

echo "<pre>";
print_r($billingAddress);
die;

}


texts: Moved hosts. Instead of reinstalling (which takes ages) copied all the files as well as the database. Now a lot of sites won't work

texts:
Good morning.
I'm still pretty new to Magento since I started using it not too long ago.
My company had to change webhosts because our previous host didn't have Cronjobs.
Now after moving all the files, a lot of sites won't open.
This is the site.
The backend also changed from url/admin to url/index.php/admin for some reason.

Can anyone please help me with this? Thanks in advance.

edit04:
When I first installed Magento onto the server, I had to clear all .htaccess files because they had something in them that was not compatible with our host. But since then it has been working fine. Whatever fine is in this case. At least the backend doesn't give me any trouble.

edit01:
That's how my .htaccess looks right now:

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/

############################################

edit02:
If I add the .htaccess file into main directory, the site stops working.
(Unless it changes back to url/admin)
In the config/web the "use server rewrites" option is on

edit03:
So it does not just change back to url/admin.
This is what happens everytime I add the .htaccess file into "magento/"

Internal Server Error

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

Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.

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

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


texts: Is there any way to remove pagination ID from URL?

texts:
I'm wondering Like, Is there any way to remove Pagination Page ID from URL?

Like, I moved to the second page or any other page during listing page.

SO URL will be changed as default behavior of Magento as

https://www.example.com/cat-url.html?p=2

How to remove p=2?

Every Suggestions appreciated.

UPDATE

I'm using custom module to load products on category page via Ajax.

https://amasty.com/infinite-scroll-for-magento-2.html

Thanks in Advance.


texts: Magento 2 - How to add or insert PDF file in a CMS page?

texts:
Do you have an idea on how to add or insert a PDF file in a CMS page or CMS block in Magento 2?

Correct me if I'm wrong for the question title for this thread.


texts: Refresh related products of a configurable product - Magento 2.3.4

texts:
I am searching for a solution to change related products if the customer choose another attribute / simple product of this configurable product.

For example I have a configurable product with the attribute color red and black. Both simple products (red and black) got different related products.

If I enter the configurable product and change the color, I will only see the related product that is connected with the main configurable product. The related products will not refresh depending on my choice.

Do you have a solution for this?

thank you very much.


texts: Display Magento's Register form in a phtml file

texts:
I want to display Registration form [ /default/template/persistent/customer/form/register.phtml ] in my custom template. I have used

<?php echo $this->getLayout()->createBlock('customer/form_register')->setBlockId('customer_form_register')->toHtml(); ?>

this code, but I am not getting the output.


texts: Magento 1.9.4.5 - Dataflow Advanced Profiles - Add Category Names to Products Export CSV File

texts:
I have been beating my head against a wall for a few days now trying to figure out a workaround to Export all of my Products. I have around 6500 products currently and trying to use the standard Export function for products in Magento keeps failing and giving me a 500 Internal Server Error. I have all of my memory limits etc... maxed out and it does not seem to be throwing any error that I can find. I have read many people having issues over 5000 products.
Alternatively I have been successful in breaking it down into smaller chunks using DataFlow - Profiles, however the CSV file produced seems to contain everything I need, except it only provides category ID's instead of Category Names (and subcategories tree structure). I thought maybe I could copy the XML info from the DataFlow - Profiles and create a DataFlow - Advanced Profile and add in the necessary command to also export the category names and structure.
Copied below is the XML info from the working DataFlow - Profile, but I am not sure how to proceed from here. Any help would be appreciated. Alternatively I am open to any other ideas on how to get all of my product data exported. I have read just about everything I could find online and except for spending a chunk of money for an extension that may or may not work or having a service do it, I have not been successful.
 <action type="catalog/convert_adapter_product" method="load">
    <var name="store"><![CDATA[0]]></var>
    <var name="filter/attribute_set"><![CDATA[4]]></var>
    <var name="filter/price/from"><![CDATA[0]]></var>
    <var name="filter/price/to"><![CDATA[3]]></var>
</action>

<action type="catalog/convert_parser_product" method="unparse">
    <var name="store"><![CDATA[0]]></var>
    <var name="url_field"><![CDATA[0]]></var>
</action>

<action type="dataflow/convert_mapper_column" method="map">
</action>

<action type="dataflow/convert_parser_csv" method="unparse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
</action>

<action type="dataflow/convert_adapter_io" method="save">
    <var name="type">file</var>
    <var name="path">var/export/</var>
    <var name="filename"><![CDATA[export_all_products_COMICS03Magento.csv]]></var>
</action>


texts: 5.7.8 Username and Password not accepted. Magento 2.3.1

texts:
I'm using magento 2.3.1, every time I edited or add users or roles I get this error.

5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/?p=BadCredentials l17sm2797996wrq.37 - gsmtp

Email is working fine, I configured it with Google SMTP. Not sure what is the cause of that error. The user is added or edited correctly, I just see the error but no real impact, everything works.


texts: After clearing magento 1.9.2 using sql i got error of getId()

texts:
Fatal error: Call to a member function getId() on a non-object in /var/www/vhosts/pstest.de/amaya1.psweb.in/lib/Varien/Data/Tree/Dbp.php on line 331

I used some sql to truncate the product and category tables after clearing the database when i clicked on catalog > manage category it gives me above error.


texts: How to create empty object of Payment class in Magento 2

texts:
I have to create Payment object in

vendor/magento/module-paypal/Plugin/OrderCanInvoice.php

Is it $foo = new Payment() ?

It gives me an error

Uncaught ArgumentCountError: Too few arguments to function Magento\Sales\Model\Order\Payment::__construct()

How to create an object of Payment class

  vendor/magento/module-sales/Model/Order/Payment.php


texts:
I'm trying to add a new field via KO in the payment method where paymentdata is collected. Right now all I see is the agreement_id as part of it's parameter. Now I added another parameter which is the subscription_id. But upon clicking the proceed button it say

  Property "SubscriptionIds" does not have accessor method "getSubscriptionIds" in class "Magento\Quote\Api\Data\PaymentExtensionInterface".

Now I can't find this class in vendor/magento/module-quote/Api/Data. I need to overwrite this class right now it's being defined in the generated folder the content is this

<?php
namespace Magento\Quote\Api\Data;

/**
 * Extension class for @see \Magento\Quote\Api\Data\PaymentInterface
 */
class PaymentExtension extends \Magento\Framework\Api\AbstractSimpleObject implements PaymentExtensionInterface
{
    /**
     * @return string[]|null
     */
    public function getAgreementIds()
    {
        return $this->_get('agreement_ids');
    }

    /**
     * @param string[] $agreementIds
     * @return $this
     */
    public function setAgreementIds($agreementIds)
    {
        $this->setData('agreement_ids', $agreementIds);
        return $this;
    }
}

But I can't find this in the vendor folder even though I looked in the vendor/magento/module-quote/Api/Data

Any idea on how to override this? As I need to retrieve the new parameter when submitting the order in the payment method page


texts: How to get Html post request value in Controller?

texts:
I've been trying to send the SKU of the product from the product page to another page so I can integrate it with an API.
Here's my code phtml code:

Here's my Controller code:

For some reason I can't seem to get my SKU across so I can receive it on the other side? can someone please enlighten me as to what I'm doing wrong?
P.S. ignore comments and naming, I remove the former and change the latter later.


texts: No products are showing after re-index - Magento upgrade - 2.1 to 2.2 then 2.3

texts:
I followed these steps in order to upgrade Magento (current version: 2.1.9):

Upgraded to 2.2.8
Upgraded to 2.3.3

The one issue that I am stuck is that after upgrading to 2.2 or 2.3 and on reindexing there is too less entry in store wise tables.

Also there is too less entry in search table as well.

catalog_category_product_index_store1
catalogsearch_fulltext_scope1

I have total 2,20,000 products.

Any idea ?

Update:
When adding a new product (simple) from admin I am able to get it in above tables and also in fronted.

Any help ??


texts:
I have a problem with forcing http for my api call

external program (cant edit it) connects with api using http.
curently i have enabled https and api doesnt connect with external server anymore.

in magento i set base url and secure url as https:// - cant connect

when i set base url: http and secure url https - connection is fine, but problem with ssl as on the website i get unsecured content.

could you help me with that?

i guess good htacces rule should work but noting works for me.

this is how my rewrite looks like:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

any sugestions how to force http for api only?


texts:
This is my https URL, it points to a controller in my custom module:

https://127.0.0.1/MyProject/index.php/test/index/logurl/

Now, in my module I tried to config that URL as secure, like this:

<frontend>
    <secure_url>
        <test>/index/logurl/</test>
    </secure_url>
</frontend>

The frontName of my module is "test". Its just not working, when I call the URL, it always ends at:

http://127.0.0.1/MyProject/index.php/test/index/logurl/

What am I doing wrong?

Thanks!


texts: Unable to get selected value for multiselect field added to product video form - Magento 2.1.1

texts:
I am developing an extension similar to product video

Product > Catalog > Images And Videos

I need a multi-select field but unable to get the selected values after form save.
It shows only last selected value as selected. It seems there is an issue to store the selected multi-select field values. To replicate the issue you can add any multi-select field to product video form and try to save the details.

If anyone has done like this or have any idea, please share.


texts: Join a calculated column from a table to a collection

texts:
I am creating custom admin grid in Magento 1.

I want to show all wishlist with some data like id, date_created etc. and also total value of each wishlist.

I am working with some modified Magento 1 tables wishlist (default columns) and wishlist_item (added column price). See simplified example here:

wishlist
+-------------+-------------+
| wishlist_id | customer_id |
+-------------+-------------+
|        8609 |       39099 |
|        9540 |       39043 |
+-------------+-------------+

and

wishlist_item
+-------------+-------+
| wishlist_id | price |
+-------------+-------+
|        8609 |   150 |
|        8609 |   199 |
|        8609 |    50 |
|        9540 |    54 |
|        9540 |     5 |
|        9540 |    47 |
|        9540 |    80 |
+-------------+-------+

Problem i have is getting total, as each wishlist_id can have multiple items/rows in table wishlist_item.

I can add total with custom renderer like this:

public function render(Varien_Object $row)
{
    if($row->getData()) {
        $read = Mage::getModel('core/resource')->getConnection('core_read');
        $sql = 'SELECT SUM(PRICE) FROM wishlist_item WHERE wishlist_id = ' . $row->getData('wishlist_id');
        return $read->fetchOne($sql);
    }
}

With this you can see i am getting total with SUM in table wishlist_item by wishlist_id. This works like it should, but i would like to get this by joining to collection instead.

So far i have tried something like this.

$collection = Mage::getResourceModel('wishlist/wishlist_collection')
    ->join(array("wi" => 'wishlist_item'), "wi.wishlist_id = main_table.wishlist_id", array("*","sum(wi.price) as total" ))
        ->where('wi.wishlist_id = main_table.wishlist_id');

This is not working, as wishlist_id table have multiple columns with same id.

Error and query here:

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'wishlist_id' in order clause is ambiguous, query was: SELECT `main_table`.*, `wi`.*, sum(wi.price) AS `total` FROM `wishlist` AS `main_table`
 INNER JOIN `wishlist_item` AS `wi` ON wi.wishlist_id = main_table.wishlist_id WHERE (wi.wishlist_id = main_table.wishlist_id) ORDER BY wishlist_id DESC LIMIT 20

Any help would be much appreciated :)


texts: Some questions about meta keyword and search engine

texts:
I've got some questions about keyword and search engine as below.

1. does meta keyword support international language?

When I type English meta keywords it searched on our website but when
I type Korean meta keywords It doesn't work. Does meta keyword
support international language in different language store?

(Ex: English store-Korean meta keywords, Korean store-Chinese meta
keywords)

2. International Language product name isn't searched properly.
When I search English name product (Ex:"Beaumont Summit Kit") most
letter of product name can be searched on search engine (Ex: "bea"
"sum" "kit" "beaumont" "summit", ...).

But when I search Korean name
product (Ex:"톰포드 블랙 수트") It only can search by keyword "톰포드". Search
engine can't find product by keyword "블랙" and "수트" even in Korean
store view, it weird. Is there another way to search more
specifically in Korean language?

I wish I could find answer.


texts: Language store view Url without slash return page with error message "no CMS page"

texts:
I have a multistore with different languages, i have set the langue code to be in the URL, so
https://www.domain.com/en_ca gives page with this message
There was no Home CMS page configured or found.

https://www.domain.com/en_ca/ gives the correct CMS home page.
https://www.domain.com/fr_ca and https://www.domain.com/fr_ca/ works
The problem appears for https://www.domain.com/fr_ca and sometimes for https://www.domain.com/en_ca


texts: Is is possible to tie an existing image to a product (through the API)

texts:
I am attempting to add an image to a magento product, through the API.. The images are already on the magento server so the idea of encoding them in base64 and then creating new images just seems smelly.

Does anyone know if there's a way to link an image to a product if the image already exists?

Please note. I'm looking for existing API methods. Sadly I can't write new PHP code to extend the API because I don't have access to the magento box. This is for a third party app that is slated to integrate with an existing magento site.


texts: Magento 2.1.8 - Display Attribute on Product Page

texts:
I am new to Magento 2 and still in the learning process. Being a small business owner, Googling can only get me so far sometimes. I need to add a Hero Image at the top of the product page. If this was Magento 1, I would create an attribute as a text area and then add it to the view.phtml file. The text area is where the caption info would be and everything else would be done via CSS.

File /theme/theme/template/catalog/product/view.phtml

Call the attribute

<?php
    $_product = $this->getProduct();
    $attribute = $_product->getResource()->getAttribute('name');
    if ( is_object($attribute) ) {
        $identifier = $_product->getData("name");
    }
?>

Place this in the view.phtml where I want it to go on the product page itself.

<?php echo $_product->getData('name'); ?>

This obviously does not work in Magento 2.1.8. How would I go about them same thing for Magento 2?

Thank you for any help or pointing me in the right direction.


texts:
I have a one website with 2 languages arabic and english but english which is ranked in google within a 2 days but arabic language dint rank since from 3 weeks why? Whats the reason? It is a e-commerce website developed by magento.

Any help will be appreciated.


texts:
i'm planning to apply varnish for my magento 1.81, but there are some questions

1) is varnish must run on port 80, and apache should set to another port?
2) what extension should be installed for the magento? Turpentine? is this good or are there any alternative are better?

3) any "updated" tutorial let me follow to install varnish? i searched the google, there are too many non-updated and scattered results.
4) how to handle ssl in varnish?


texts: Add 'Select All' option to Export screen in Magento 2 admin

texts:
In Magento admin, under System > Export the user can select individual attributes to be excluded from the export. I'd like to add a 'Select all' link that would select all options.

This question was 90% answered by Nadim here: How to add Select All option in Export Settings of Magento 2 , but it's lacking some detail for me to get the job done.

A) I assume this is created as a module - what should the module.xml look like?

B) Which file should the below XML go to?

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Backend\Block\Widget\Grid\Extended">
    <plugin name="VendorName_ModuleName::After" type="VendorName\ModuleName\Plugin\Block\Widget\Grid\Extended" />
</type>

(I would have asked this as a comment to the original answer, but unfortunately my reputation is not high enough to add comments.)


texts: How to create grid using ui component for custom eav model

texts: I have created a new entity type and custom EAV model. Now i am trying to create grid for it using ui component. How we can use the eav data collection instead of flat table for grid?


texts: Magento 2 plugin change price of products that have a custom attribute with

texts:
I'm trying to change the prices of products with a plugin. And it works, basically. The problem is this: i only need to change the price of products that have a specific attribute, not the price of all products. With a plugin, it's easy to add a fixed value to the price of a product, but i can't figure out how to check if the product has that custom attribute. this is the code I'm using:

namespace Frostmage\WBTPDC\Plugin;

class Product
{

    public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result)
    {

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $wbtvalue = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue('wbtpdc/modifier/variable');

        return $result * $wbtvalue;
    }
}

Now... It works for the value I added, but I need to add a check, sort of like this:

if ($subject->getData('has_wbt'))
{
    return $result + ($wbtvalue * $subject->getData(weight));
}

Thing is that $subject is not the right variable to use (I wrote that just to exemplify what I need to do). If I try to use objectManager to create a $current_product variable, it always returns an exception for calling getData on null. If I use $subject, it always returns 0. So this is the problem: How can I change the price only of products that have 'has_wbt' attribute so that it shows on the frontend?
I mean, is there a way to have this plugin only act on products that have a specific attribute?


texts:
How do I improve this code? I use it in ListProduct.php to get the base price in another currency for products in list.phtml.

How can I do this without objectManager? Why should I not use objectManager? Will it make it slow to process the product listing?

This is from ListProduct.php, I call the function getProductPrice from list.phtml

    public function getProductBasePrice($product)
{
    $store = $product->getStore();
    $price = $product->getPrice();
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $priceCurrencyObject = $objectManager->get('Magento\Framework\Pricing\PriceCurrencyInterface');
    $price = $priceCurrencyObject->convert($price, $store, null);
    return $price;
}


texts:
even my complete module was working with default installation.

config.xml

 <?xml version="1.0"?>
    <config>
        <modules>
            <Barcatsia_Smsntf>
                <version>0.1.0</version>    <!-- Version of module -->
            </Barcatsia_Smsntf>
        </modules>
        <global>
            <blocks>
                <smsntf>
                    <class>Barcatsia_Smsntf_Block</class>  <!-- Path of the
     Block Folder, where all php files are located related to view -->
                </smsntf>
            </blocks>
            <helpers>
                <smsntf>
                    <class>Barcatsia_Smsntf_Helper</class>
    <!-- Path of Helper Files -->
                </smsntf>
            </helpers>
    <!-- Observer event register -->
        <events>
               <!--  <checkout_onepage_controller_success_action> -->
        <controller_action_layout_load_before>
                    <observers>
                        <Barcatsia_Smsntf_Model_Observer>
                            <type>singleton</type>
                            <class>Barcatsia_Smsntf_Model_Observer</class>
                            <method>customFunction</method>
                        </Barcatsia_Smsntf_Model_Observer>
                    </observers>
        </controller_action_layout_load_before>
               <!--  </checkout_onepage_controller_success_action> -->
            </events>
    <!-- Observer event register -->
        </global>
        <frontend>
            <routers>
                <smsntf>
                    <use>standard</use>
                    <args>
                        <module>Barcatsia_Smsntf</module>
                        <frontName>smsntf</frontName>  <!-- This is the URL
     of the module. i.e www.yourmagento.com/index.php/test will be the url of your module. -->
                    </args>
                </smsntf>
            </routers>
            <layout>  <!-- New Section Added -->
                <updates>
                    <smsntf>
                        <file>smsntf.xml</file> <!-- This is name of the layout file for this module -->
                    </smsntf>
                </updates>
            </layout>
        </frontend>
        <adminhtml>
            <acl>
                <resources>
                    <admin>
                        <children>
                            <system>
                                <children>
                                    <config>
                                        <children>
                                            <testsection translate="title" module="smsntf">
                                                <title>SMS Notification</title>
                                            </testsection>
                                        </children>
                                    </config>
                                </children>
                            </system>
                        </children>
                    </admin>
                </resources>
            </acl>
        </adminhtml>
    </config>

Model/observer.php

  <?php
    class Barcatsia_Smsntf_Model_Observer
    {
        public function customFunction(Varien_Event_Observer $observer)
        {
          echo "asssssssssadddddddddddddddddddddddddddddddddddddd";
        }
    }


texts:
i installed magento 2 on xampp server bt i can't reindex the magento2.
i tried this:

sudo php var/www/html/magento

Otuput: Could not open input file: var/www/html/magento.

Please anybody explain me how to reindex?

Thanks.


texts: I want to add a bug herd javascript extension in head tag of my magento 2.1 store but unable to find the <head> tag. i searched for the local xml but it was not there. How to locate this ?


texts:
I have a very strange problem where the Magento\Framework\Locale\Resolver does not return the correct locale for the current store view.

I have setup a store with two separate store views which have locales set to English and Swedish. I have also configured the stores to append the store code to the current URL.

class Example {
  /** @var \Magento\Store\Model\StoreManagerInterface */
  private $storeManager;

  /** @var \Magento\Framework\Locale\Resolver */
  private $resolver;

  public function __construct(StoreManagerInterface $storeManager,
                              Resolver $resolver)
  {
     $this->storeManager = $storeManager;
     $this->resolver = $resolver;
  }

  /**
   * Get locale using resolver.
  **/
  public function getLocale()
  {
     return $this->resolver->getLocale();
  }

  /**
   * Get locale using storemanager
  **/
  public function getLocaleCode()
  {
     return $this->storeManager->getStore()->getLocaleCode();
  }
}

In the above code the getLocale() and getLocaleCode() always returns the locale of the default store view. I managed to solve this by using the ScopeConfigInterface like this:

class Example {
  /** @var \Magento\Framework\App\Config\ScopeConfigInterface */
  private $scopeConfig;

  public function __construct(ScopeConfigInterface $scopeConfig)
  {
     $this->scopeConfig = $scopeConfig;
  }

  public function getLocale()
  {
     return
     $this->scopeConfig->getValue(
       'general/locale/code',
       ScopeInterface::SCOPE_STORE,
       $this->storeManager->getStore()->getId()
     );
  }
}

Even though the above works I really would like to know why the resolver returns the incorrect locale for the current store? I am thinking that this might be some kind of weird caching issue, I have tried all the following without any success:

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:di:compile
php bin/magento setup:upgrade
php bin/magento indexer:reindex


texts: Restore deleted products in Magento 1.8.1.0

texts:
I have deleted some products from Magento 1.8.1.0 to avoid duplicity   from a new import. But now all the associated alerts with deleted products are seem to be lost.

Usually a customer use to get an alert for already ordered item on website but it is not working the warning alert popup of 'item already ordered' is disappeared.

What are my chances to restore the product if there no backup?

Does deleting products deletes all the product_ids, mappings etc. from database?

Please help as soon as you can.


texts: Training certification developer frontend

texts: Is There someone who has passed or possesses examples of question for the certificate developer frontend or otherwise for a training.


texts: Magento 2 dashboard recent order template change

texts:
I have created a new module in Magento2 for order feedback, for that, I have just change the template of the recent order file.

The below mentioned file have that template(order/recent.phtml) with the block name of "customer_account_dashboard_top"

File path:-
vendor\magento\module-sales\view\frontend\layout\customer_account_index.xml

Then I have created the customer_account_index.xml file on the following path
app\code\Namespace\Modulename\view\frontend\layout\customer_account_index.xml

and i placed the following code on that my file

  <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_dashboard_top">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Learning_Orderreview::order/recentorder.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

But still, the content came from the core(vendor folder) instead of our new view file. do you have any idea on this means kindly share with us

Thanks in advance for your help


texts:
how to add one more option in head component in sales order view page?

i check in layout and ui_component in magento sales module,there i not getting any exact idea about to edit.

  [![enter image description here][1]][1]

 <referenceBlock name="head.components">
        <block class="Magento\Framework\View\Element\Js\Components" name="sales_page_head_components" template="Vnecoms_VendorsSales::page/js/components.phtml"/>
    </referenceBlock>
    <referenceBlock name="sales_order_invoice.grid.container">
        <uiComponent name="vendor_sales_order_view_invoice_grid"/>
    </referenceBlock>
   <referenceBlock name="sales_order_creditmemo.grid.container">
        <uiComponent name="vendor_sales_order_view_creditmemo_grid"/>
    </referenceBlock>
    <referenceBlock name="sales_order_shipment.grid.container">
        <uiComponent name="vendor_sales_order_view_shipment_grid"/>
    </referenceBlock>

please help me


texts:
I am using the customer_login event for my observer. I am trying to redirect my user after login.

I used below code.

$session = Mage::getSingleton('customer/session');
$session->setAfterAuthUrl("/checkout/onepage/");

I want to redirect my account page.

Any idea why this is not working ?


texts: Is "persistent cart session" in fact checkout/session or is it a separate session? If it is separate, can I use it from my modules? I need some data to persist together with the shopping cart content.


texts: Magento2 Cart and Checkout page is not working

texts:
I am using Magento 2.3.1. When entering the cart and checkout page, the errors appear in the console log.
I am trying with an upgrade and a clear cache. but it's not working.
Try with some solution. But still it's not working.

Please, someone help me to figured out.

Thanks in advance.


texts: How can i display product id in the admin order details page.]


texts: Magento 2.1.9 - System.log: "Attempt to load value of nonexistent EAV attribute '237' for entity type 'Magento\Catalog\Api\Data\ProductInterface'"

texts:
The message "Attempt to load value of nonexistent EAV attribute '237' for entity type 'Magento\Catalog\Api\Data\ProductInterface'" appears every time I load a product that has the custom attribute with Id= 237. It is happening in storefront and in backend.

Preconditions

Magento 2.1.9
Eshop with 1 storeview.

Steps to reproduce

Create a custom attribute, dropdown with values 'disabled', 'enabled'
and code=promot1.
Insert it in all attribute sets.
Go to a product in backend and make the promot1='enabled'.

Expected result

In Catalog the product to appear with promot1=enabled.
In product edit page the promot1 dropdown to have the value
'enabled'.

Actual result

In Catalog the product appears with promot1=enabled.
In product edit page the promot1 dropdown has NO value.
In system log I have the message: "Attempt to load value of
nonexistent EAV attribute '237' for entity type
'Magento\Catalog\Api\Data\ProductInterface'"
The same message if I try to load the product in frontend.

Any suggestion why it is happening?.


texts:
I am running Magento version 1.9.2.0 and I am trying to install patch 7405 v1.1 with "PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh" but I am getting an error patching. Below is the error I am getting

  sh PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh

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

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

  patching file app/code/core/Mage/Adminhtml/Helper/Sales.php

  Hunk #1 FAILED at 121. 1 out of 1 hunk Failed -- saving rejects to
  file app/code/core/Mage/Adminhtml/Helper/Sales.php.rej

  patching file app/code/core/Mage/Core/Model/Config.php patching file

    app/code/core/Mage/Sales/Model/Quote/Item.php

  patching file lib/Varien/File/Uploader.php

The previous version(7405 v1) was installed by my developer who said he never change the core file manually which I think is a lie because I checked the core file and noticed $links = array(); was added :

if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
 #$links = [];
 $links = array();
 $i = 1;
 $data = str_replace('%', '%%', $data);
 $regexp = "/]*href\s*?=\s*?([\"\']??)([^\" >]*?)\\1[^>]*>(.*)<\/a>/siU";
 while (preg_match($regexp, $data, $matches)) {
 //Revert the sprintf escaping
 $url = str_replace('%%', '%', $matches[2]);
 $text = str_replace('%%', '%', $matches[3]);
 //Check for an valid url
 if ($url) {
 $urlScheme = strtolower(parse_url($url, PHP_URL_SCHEME));
 if ($urlScheme !== 'http' && $urlScheme !== 'https') {
 $url = null;
 }
 }
 //Use hash tag as fallback
 if (!$url) {
 $url = '#';
 }
 //Recreate a minimalistic secure a tag
 $links[] = sprintf(
 '%s',
 htmlspecialchars($url, ENT_QUOTES, 'UTF-8', false),
 parent::escapeHtml($text)
 );
 $data = str_replace($matches[0], '%' . $i . '$s', $data);
 ++$i;
 }
 $data = parent::escapeHtml($data, $allowedTags);
 return vsprintf($data, $links);
 }
 return parent::escapeHtml($data, $allowedTags);
 }
}

I have delete $links = array(); and remove # in front of the (#$links = [];) but still given the same error.

I checked app/etc/ folder for "applied.patches.list" but there is no file with that name, I noticed there is "PATCH_SUPEE-7405_CE_1.9.2.2_v1-2016-01-20-04-35-33.sh" in my Magento folder which I believe is the file he used to patch.
My question is can you use a patch with version 1.9.2.2 on Magento version 1.9.2.0? Do I need to download "PATCH_SUPEE-7405_CE_1.9.2.2_v1.1-2016-02-23-07-41-47.sh" instead of "PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh" to solve the problem?

Any help please?


texts:
Is it possible to clear cache directly from module?

After some actions in my module and I'm saving data into database. Basing on the values from the database I am displaying some informations (or not if they don't exists) in frontend. The problem is that, that those informations are caching in frontend and in order to see any changes I need to refresh cache. It's pretty bad for users of my app because they will be forced to clear cache manually.

So I'm wondering is there any possibility to force magento to refresh cache directly from module in order to see changes in frontend?

I need to refresh "Page Cache : Full page caching "


texts:
Renamed File Not store in Database Original Name only stored in Database But Media Folder it store Renamed File.

$uploader = new Varien_File_Uploader('img');
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png')); // Your Format Here
$uploader->setAllowRenameFiles(true);
$uploader->setFilesDispersion(false);
$path = Mage::getBaseDir('media').DS.'FanBook'.DS;
$destFile = $path.'/'.$_FILES['img']['name'];
$filename = $uploader->getNewFileName($destFile);
$uploader->save($path, $filename);
$img ='FanBook/'.$filename;

 $collection = Mage::getModel('fanbook/fanbook');
$collection ->setData('img',$img);
$collection->save();


texts: How to filter category when i load from Mage_Catalog_Model_Category?

texts:
I have the code bellow and i want exclude a category id 70 from collection, but i tried with :

$_productCollection->addAttributeToFilter('category_id', array('nin'=>'70'));

and doesn't works

$category = new Mage_Catalog_Model_Category();
   $category->load();
 $_productCollection = $category->getProductCollection();
        Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($_productCollection);
        $_productCollection->addAttributeToFilter('visibility',4)->addAttributeToSelect('*');
        // $_productCollection->addAttributeToFilter('category_id', array('nin'=>'70'));
        $_productCollection->getSelect()->order('RAND()');
        $_productCollection->addAttributeToFilter('status',1);
        $_productCollection->getSelect()->limit(20);


texts: Magento 1.9 updating catalog product name changed every single price to 1

texts:
Yesterday I wanted to make some changes in every single product name. Basically it was only about changing the position of one string - from the beginning to the end.

What happened was that after successfully changing name to my desire, I found out that my product's price was changed as well. Unfortunately to 1$.

I'm sharing my code, if anyone could explain what happened, why did the price change, I would be grateful.

function update_names(){
    $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('name');

    $items = array(
        'Smart Fox'
    );
    $count = 0;
    foreach ($products as $product) {
        $count += 1;
        $name = $product->name;

        foreach ($items as $collection){
            if (strpos($name, $collection) !== false) {
                $name = trim($name);
                $name = str_replace($collection, "PINOKIO ".$collection, $name);
                $name = ucfirst($name);

                $product->setName($name);
                $product->save();
                break;
            }
        }
    }
}


texts: how to create a variant for configurable products in magento 1.9


texts:
Building my own module and it works perfectly at the moment. My next step is to add server side validation to the data being inputted by admin in the module form.

I am validating the data in my models _beforeSave method which is fine. its wrapped in a try catch and if the validation fails it adds an error to the session.

Here is that code.

protected function _beforeSave()
{
    $data = $this->getData();
    $strLengthValidator = new Zend_Validate_StringLength();
    $strLengthValidator->setMax(40);

    try{
        $strLengthValidator->isValid($data['identifier']);
    }
    catch(Exception $e)    {
        Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
    }
}

I have 2 issues:

1) the error doesn't get saved in the session? Why is this?

2) When i eventually get the error to save in the session, how do i handle it in the controller?

Thanks


texts: Magento 2 - Show non required custom option only when customer is logged in/with dependency

texts:
I have 2 custom options (radio buttons) for a product with 2 option values each

Custom Option A

Value A1
Value A2

Custom Option B

Value B1
Value B2

Requirement:
Custom Option B should be visible only when

Customer is logged in
Value A2 is selected from Custom Option A

How can this be achieved?


texts: How do I reorder sections on Product Edit in admin

texts:
My product edit page is a painful mess at the moment. Things are not in a logical order at all.
I can reorder attributes in a section, but I cannot seem to change the order of the sections.
It does not use the set in the Attribute Set management. There are also other modules jumping in odd places all over that aren't in the Attribute Set list at all
There really should be a way to reorder the sections to one's preference!
So my questions is: how can I override the sortOrder value for these sections?
Can I do it in di.xml? or do I need to do it via the ui_component interface somehow? or code?
I can't even be sure what the number does, because I have modules at 200 above modules at 10 but one with 999 at the bottom.
Background:
I have found entries like this both in the Magento code and in vendors modules:
    <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
    <arguments>
        <argument name="modifiers" xsi:type="array">
            <item name="productgridextend" xsi:type="array">
                <item name="class" xsi:type="string">Company\Module\Ui\DataProvider\Product\Form\Modifier\Inventory</item>
                <item name="sortOrder" xsi:type="number">200</item>
            </item>
        </argument>
    </arguments>
</virtualType>

In other cases all I could find is a template entry in ui_component called product_form.xml
And many of the Magento entries do not have a sortOrder value, so there must be a mechanism at page building to decide these based on data


texts: Magento2: What's the right/best way to override the getProductsCollection() on category pages?

texts:
My goal: I want to create a special category that will display products by different rules (not by associated products), for example: 'products on sale' / 'new products' / 'products from multiple categories', ...
I saw some extensions that overrided the ListProduct block but I think that it's a bad solution as it has no effect on the layered navigation for example.
I also prefer to use plugins instead of overriding the original classes in order to avoid conflicts as much as possible.
At the moment, I keep overriding more & more core classes & still face issues & I think I'm missing something.
-- Any idea?


texts:
I am wondering should i go for old method or something new for image upload check  in magento 2?

<?php if(isset($_FILES['image']['name']) and $_FILES['image']['name']!="") ?>

any other solution?


texts: Category collection retrieves wrong attribute values

texts:
$categories = Mage::getModel('catalog/category')->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('level', 2) level
        ->addAttributeToFilter('is_active', 1)
        ->addAttributeToFilter('include_in_menu', 1)
        ->addFieldToFilter('path', array('like'=> "1/$rootid/%"))
    ;

    foreach ($categories as $category) { yaddayadda() }

Calling this from a simple script in the shell directory leads to the correct result. I only get the categories that are active and included in the menu. But when it is called in the normal Magento Block for building the top navigation it somehow changes the attributes of the categories. It shows everyone and when I check the attributes via debugger or var_dump it says "included_in_menu" (or "is_active") is 1. But it's not! It's correctly set in the backend and getting this collection via shell it says the values are 0. I cleared the caches endless times and saved the categories multiple times.

What can possibly cause this?


texts: Get sub category of current category in magento2

texts:
I want to create custom list (category) page in magento2.

If current category has sub category then it's show sub category.

If current category have sub category and products then it's show both.

If current category has only products then it's show products only.

which file I need to do changes?

Can anyone give me a suggestion?


texts: Only show link in Account Navigation to specific customer groups

texts:
I have a link which I've added to the Account Navigation in Magento2.  It's called VIP Customer Info.

I would like to be able to hide or disable this link depending on weather the customer is logged in and belongs to the VIP customer group.

Any suggestions on how this could be possible?  I have tried the method below but it didn't work :(

Maybe I need to manage it from template file?

I thought I could achieve this by using a method from custom block in view/frontend/layout/customer_account.xml

<referenceBlock name="customer_account_navigation">
    <block class="Holy\Vip\Block\Html\Link\Vip" name="customer-account-navigation-vip-info-link">
        <action method="isVipCustomer">
            <arguments>
                <argument name="label" xsi:type="string" translate="true">VIP Customer Info</argument>
                <argument name="path" xsi:type="string">vip/customer/info</argument>
            </arguments>
        </action>
    </block>
</referenceBlock>

But this didn't work, it just stopped the link from being rendered at all.

This is my block class:

<?php

namespace Holy\Vip\Block\Html\Link;

class Vip extends \Magento\Framework\View\Element\Html\Link\Current
{
    public function isVipCustomer()
    {
        return true;
    }
}

Unfortunately, this does not work. It just shows a empty space with a link to the homepage no matter what the return value:


texts: Magento 2: Payment methods not showing on admin create order

texts:
When creating an order from the admin panel I cannot see payment methods available
However, in the fronted, customers can see the available payment methods, which are  CHECK / MONEY ORDER and CyberSource ( CREDIT CARD  )
There are no errors in the console neither in the logs.
Any suggestions on how to debug this?
Thanks


texts: Create Simple Controller Not Working In My Module in Magento 1.9.2?

texts:
I am Trying To create a Simple Module. It's Found 404 page Error.

My config file in app/etc/modules/Codefire_Mymodule.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Codefire_Mymodule>
            <actve>true</actve>
            <codePool>local</codePool>
        </Codefire_Mymodule>
    </modules>
</config>

Create Controllrer in app\code\local\Codefire\Mymodule\controllers\IndexController.php

<?php
class Codefire_Mymodule_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        echo "Hello tuts+ World";
    }
     public function testAction()
    {
        echo "test action";
    }
}

And Create My Plugin xml file in app\code\local\Codefire\Mymodule\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Codefire_Mymodule>
            <version>0.1.0</version>
        </Codefire_Mymodule>
    </modules>
    <frontend>
        <routers>
            <mymodule>
                <use>standard</use>
                <args>
                    <module>Codefire_Mymodule</module>
                    <frontName>mymodule</frontName>
                </args>
            </mymodule>
        </routers>
    </frontend>
</config>

URL: index.php/mymodule/index/index
When I am Write testing in magento in display 404 page error. can You Tell me What's Issue?


texts:
I have an error after a recent update to Magento 1.9.3.1 when I try to save a product in a specific storeview.

It only happens with products where the group-price is set like this:

It seems to me the group-price is set correctly like this. Anyway, before the upgrade it worked.
The solution could be to add the group-price in every website separately, but that would be a lot of work.

Is this common behaviour or a bug? Anyone experienced the same or knows a fix?


texts: Getting Error: Attribute ktype_motors exceeded max length

texts:
In my Magento Project at the time of updating products to the store programmatically, I am getting below import error:

Following Error has occurred during the importing process:

Attribute ktype_motors exceeded max length

My product data array is as follows:
=> Array
    (
        [entity_id] => 73400
        [attribute_set_code] => Default
        [sku] => cjc-motor
        [name] => Motor 2013 Audi Seat A4 8K Q5 Exeo ST 2,0 TDI CJC CJCA CJCB CJCC CJCD
        [ebay_name] => Motor 2013 Audi Seat A4 8K Q5 Exeo ST 2,0 TDI CJC CJCA CJCB CJCC CJCD
        [ebay_motors_name] => Engine 2013 Audi Seat A4 8K Q5 Exeo ST 2.0 TDI CJC CJCA CJCB CJCC CJCD
        [ebay_fr_name] => Moteur 2013 Audi Seat A4 8K Q5 Exeo ST 2.0 TDI CJC CJCA CJCB CJCC CJCD
        [description] =>
        [ebay_fr_description] => En cas de Retrait du Moteur, après Examen, que le Prix d'achat sera remboursé.
        [short_description] =>
        [price] => 1799.0000
        [special_price] => 1300.0000
        [weight] => 104.0000
        [status] => 1
        [url_key] => motor-2013-audi-seat-a4-8k-q5-exeo-st-2-0-tdi-cjc-cjca-cjcb-cjcc-cjcd
        [ktype] => "31585","11060","31956","33413","22766","25508","30996","23301","30994","31350","31000","25454","33418","30006","33412","11058","31957","26848","30390","31588","31352","58562","59563","59572","59566","59567","59633","59642","59263","59264"
        [ktype_motors] => "31585","11060","31956","33413","22766","25508","30996","23301","30994","31350","31000","25454","33418","30006","33412","11058","31957","26848","30390","31588","31352","58562","59563","59572","59566","59567","59633","59642","59263","59264"
        [delivery_time] => 3-5 Tage
        [oe_nummer] =>
        [motorcode] => CJC CJCA CJCB CJCC CJCD
        [fahrzeug_typ] => A4 8K Q5 Exeo ST
        [fahrzeug] => Audi Seat
        [baujahr] => 2013
        [baureihe] => ab 11/2007
        [laufleistung] => 29.000
        [leistung_kw] => 88 - 110
        [leistung_ps] => 120 - 150
        [image] => /p/1/p1630863_4.jpg
        [additional_images] => /media/catalog/product/p/1/p1630861_3.jpg,/media/catalog/product/p/1/p1630862_3.jpg,/media/catalog/product/p/1/p1630863_4.jpg,/media/catalog/product/p/1/p1630860_4.jpg,/media/catalog/product/p/1/p1630859_4.jpg,/media/catalog/product/p/1/p1630858_4.jpg
        [qty] => 1
        [product_type] => simple
        [product_websites] => base
        [base_image] => /p/1/p1630863_4.jpg
        [small_image] => /p/1/p1630863_4.jpg
        [thumbnail] => /p/1/p1630863_4.jpg
    )

How to solve this error?


texts: Magento 2:Imported resource (image) could not be downloaded from external resource due to timeout or access permissions

texts:
I try to import product using csv file in localhost of wamp server but show error in Imported resource (image) could not be downloaded from external resource due to timeout or access permissions
I add product images in pub/media/import


texts: Magento 2.3.3 addAttributeToFilter is_saleable attribute no longer supported

texts:
After upgrading to Magento 2.3.3 product collections filtering with the is_saleable attribute no longer appears to work and the following error is seen in templates calling the collection :

  The "is_saleable" attribute name is invalid. Reset the name and try
  again.

What is the correct way to filter product collections for saleable products in Magento 2.3.3?


texts: How to use Magento 2’s built in Vagrant box?

texts:
With a clean checkout of Magento 2.0 on branch 2.0, I’ve run composer install. Included in the dependencies is a Vagrant configuration file in vendor/magento/zendframework1.

While it seems like this would be a great built in resource, it doesn’t seem to be working properly, and it’s not clear if the VM is designed to be an out of the box Vagrant box for Magento 2, or something geared towards the Zend Framework.

If it is in the repository for a purpose, what is that purpose and how should I set it up?


texts:
Is there a way to disable all the product types in the "add product" -> "product type"-dropdown, so that the shop owner only can add simple products?

thx in forward


texts: Migrated images not showing frontend and backend both

texts:
Hi I have migrated my magento 1.9.2 to 2.3.0 and migrated images manually whole media folder. But for some products images are not showing in frontend  or even in backend. In admin panel product -> product image and video it is showing 0 bytes for images. It is showing the magento placeholder in front-end and back-end.

Please help what is the issue.


texts: Group product and Bundle product has price display issues

texts:
When I create a bundle or a group product, the pricing is at the bottom and not on the right as shown in simple and downloadable.
The price is shown after the description with add bundle to cart and before related products.
Any ideas on how to have this at the top?


texts: Magento 2 - Event sales_convert_quote_item_to_order_item removed

texts:
I was adding additional details in custom table after sales_convert_quote_item_to_order_item event in magento1.x. Now I need to do the same in Magento2.x , but As i have searched, this event is removed from Magento2.x. What's the alternative plugin approach for the same?

Thanks


texts: Add product to cart with custom price, using the API

texts:
How can I add a product with a custom price to the cart, using the Magento API?

I found a solution where a special price is configured for one second, but this leaves the special price visible in the backend and this is not allowed.


texts: Magento 2: available field types in system.xml

texts:
What are available values for field types in etc/system.xml configuration file:

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


texts: MySQL-Query: GROUP_CONCAT() doesn't work correctly

texts:
I try to execute this SQL-query, but I don't get the right result:

SELECT k.product_id,  product.sku, group_concat(i.value)
FROM catalog_product_super_link AS par
LEFT JOIN  staging.catalog_category_product k ON k.product_id = par.parent_id
LEFT JOIN  catalog_product_entity AS product ON k.product_id = product.entity_id
LEFT JOIN  catalog_category_entity_varchar AS p ON p.entity_id = k.category_id LEFT JOIN  catalog_category_entity_varchar i  ON i.entity_id = k.category_id
WHERE  product.entity_id = 368538
GROUP BY par.parent_id, k.category_id

Can someone help?


texts:
We have redesigned and rebuilt our site in Magento 1.9.4.2

We have released it a couple of days back, but have to make changes on a daily basis as it is very feature-rich.

Though the changes show up after we flush cache and manage the index, there are some users that just cannot add any products to cart after we are done with our processes. However, such users are able to add products to cart after they empty THEIR cache.

Is there a solution that will allow users to buy products without flushing their cache?

Your help will be appreciated. Thanks.


texts: Is it a good idea to set visibility to 'Catalog' only for configurable 'SIMPLE/associated' products?

texts:
Our Magento store is having some issues with Google Merchant center.

Google requires us to have landing pages for all associated products in order to run adwords campaign. The problem is, by default, only configurable products are displayed in catalog and search whereas the simple products are not displayed individually.
One solution to fix this issue is to set simple product visibility to catalog only so they are only accessible via direct link.

My question is, would it break anything in Magento or cause us issues if we set simple products to display in catalog only?

I hope I haven't confused anyone here.

Thank for your help.


texts: How to find theme name in magento,just by seeing in frontend

texts: I wanted to know the theme name of this magento site : http://steel.newtrendzonline.com/


texts: Differences between InstallSchema and UpgradeSchema?

texts:
Do you know what is the design criteria of splitting InstallSchema and UpgradeSchema? They are basically doing the same thing. It seems redundant to me.

EDIT 1: I don't think this is duplicate. I just would like to understand and discuss what is the point of splitting Install and Upgrade scripts.

Anyway, I believe Magento also thinks that this is not a good implementation and decide to change the upgrade system. You can get more information on in this link.


texts:
Currently I have a custom block loaded almost last on the page containing:

<script type="text/javascript" src="/test.js"></script>

This script is pretty much the usual stuff, just manipulating HTML of my product page.

jQuery.noConflict();
  jQuery(document).ready(function($) {
    $(window).load(function() {
    {
      Do stuff with various HTML elements;
    }
  });
});

However, this method only seems to work as intended in Chrome. In Firefox, it just throws jQuery not defined, despite Magento 2 obviously having a local copy of jQuery called very early on the page.

Any ideas on how to get this working in Firefox? (Or better yet, how to do this properly, as I have a feeling I'm skirting round a lot of Magento's intended JS usage.)


texts: Building Magento online vs Download and building locally

texts:
I see that Magento can be downloaded and your store can be developed locally and then uploaded or you can develop it online using softaculous to install it.

I want to know if there any advantage/disadvantage of choosing one over the other.


texts: How reset order history magento without myphpadmin?

texts:
I need nulling/zero/ reset order history. For example, New Order # 100000001 (BUT NOT # 10000023)

Preferably without the use MyPHPadmin. Maybe my problem can be solved through SSH commands or by using the module from Magento Connect?
Maybe there are ways to move the database to another server without order history?

Please help, any advice and suggestions
Thanks


texts:
I found a code at /vendor/magento/module-customer/Controller/Account/Login.php
/** @var Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
I want to know everything related to this object. which model or class it linked to and how does it work.
The flow of the code and more information i need to have in this.


texts: Magento Shopping Cart Rule diiferent discount in a single rule

texts:
I am trying to create a new module for a single shopping cart rule like this:

1) Buy any 3-5 qty of products from category A (can be any product or combination of products) - get 10% discount for them only.

2) Buy any 5+ qty of products from category A (can be any product or combination of products) - get 15% discount for them only.

I know how to set the conditions, but my problem is when I observe sales_rule_validator_process how I can get what number of items the customer have in his basket which are compatible with my rule.

E.g. I can have 2xA (CatA), 3xB (CatB), 1xC(Cat A) in my basket, which should lead that I have Qty 3 and that means I need to set 10% discount.

Thanks


texts:
Here is my problem: I am trying to set up a development copy of a running Magento website. I created a subdomain, copied all the files to the /dev directory, made a copy of the database, set up the new credentials in /dev/etc/local.xml, change the secure and unsecure URL in core_config_data, but when I try to access the dev page I am always redirected to the live page.

I checked the .htaccess files, I actually cleared it at one point, I disabled Auto-redirect to Base URL (both on the live and the dev version), but the page is still getting redirected.

What and where should I look to get this issue resolved.

Here is the live version of the site: www.example.com
Dev version should be here: dev.example.com or www.example.com/dev


texts: Magento 2 GuzzleHttp\Client and CuRl in Controller Not Working

texts:
I am working on the integration of Point Of Sale System with Magento 2 shop whenever the user click add to cart button API will hit that API will check the stock in POS if requested product quantity from the user is available in POS(point of sale) Stock or not.

 $http = new \GuzzleHttp\Client;
 $response = $http->get('http://poswebpoint.co/magentos/getstock/'.$websiteId.'/'.$sku, [
    'headers' => [
    'Accept'  => 'application/json',
 ],]);

Now, this code works fine in my Magento custom APIs but I want to make an API  call in \magento\module-checkout\Controller\Cart\Add.php but unfortunately, it's not working.


texts: Magento 1 - How to apply custom popup message option to checkout courier selection?

texts:
In my website there is two courier service, customer can able to select the courier service as their wish. I am using the Matrix shipping rate.

Backend Code:

app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml

courier option section:

<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" />
<?php else: ?>

<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?> "<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>

And my HTML popup code:

https://paste.ofcode.org/qYJe3faagunkikwQph6UZP

HTML output :

How to apply HTML code into phtml file


texts: How add custom checkbox to product price in save/edit product page on admin panel?

texts:
How i can add custom checkbox to save/edit product page in Admin?

I need to add a checkbox like 'Use Default value'.
Tell me how can I do this? Thanks everyone for the help!


texts: Magento 2 Login Popup not firing on Proceed to Checkout

texts:
Configuration:

Magento 2.3.5. p1
Guest checkout disabled
Cookie lifetime 604800

Test scenario 1: When I enter the site the user seems to be logged in as it shows the name in the welcome message. After adding 1 product to the cart and pressing Proceed to Checkout the the cart does not proceed to the checkout page and the login popup also does not open.
Test scenario 2 : If I log in and log out, and add a product to cart as guest and press Proceed to Checkout the popup window opens.
How can I troubleshoot on scenario 1 the reason why it neither proceeds to checkout or shows the login popup? The source code for both scenarios does not show any customer information, so it looks that both are in guest mode.


texts:
For a specific order, I need to go directly to payment, with onepage system.
For others orders, customer has to specify addresses and shipping method.

More details : A customer can create a quotation for marketplace order (processed with API). When quotation is validated, customer can order products with specific price. So I empty current cart to add these products, and customer is redirected to onepage. Addresses are specified in quotation so, customer will be redirected to payment page.

Any solution ?


texts: How to overwrite authentication-popup.html in Magento 2

texts:
I need to overwrite authentication-popup.html. I need to add some extra html.

I just duplicated the authentication-popup.html file inside my module in the same folder from the default Magento module, but it didn't work.

There's some extra steps to do?


texts: I want to alter the new custom fields to sales_flat_order and sales_flat_order_item table

texts:
I have created one custom module, now I need to alter some fields into the table sales_flat_order and sales_flat_order_item , I have used following alter queries:

ALTER TABLE `sales_flat_order_item` ADD COLUMN `sweet_tooth_label` VARCHAR( 60 )
ALTER TABLE sales_flat_order ADD COLUMN `sweet_tooth_label` VARCHAR( 60 )

but it won't work for me.
Please suggest me any best solution.


texts: Facing 503 error while uploading bulk product

texts:
I am facing issue while trying to upload bulk amount of product to my magento site.
I have 1M product in a csv format, but I split the file in several csv files including 10k data in each file.
But when I am trying to import the file after a while shows 503 server unavailable error.
After trying several times I split the files into more smaller pieces where only 500 rows available. But still facing the same issue.

Please suggest.


texts: For an import file that has some records with new data for category column and others that don't need updating. Is there a skip/ignore field word I can put into those fields like magmi's "MAGMI_IGNORE" ?


texts: I would like to know the flow of calls to various methods in payment method of magento. Like when do authorize(), capture(), refund() etc. gets called? And what could be the possible scenario which may influence it (if any)?