texts: Magento 2 (Ubuntu) - Thumbnail image caching fails

texts:
I'm using Magento 2.1.0 with a bought with a template (SM Sawyer) on Ubuntu 16.04.1
Our products are being inserted/controlled by an external registersystem.

After this external source adds products, their thumbnails get created correctly in /pub/media/catalog/product/...
At some point after they update certain products, these thumbnails get mixed up in the cache: Once you click on the product you get shown the correct full image, but when shown in lists you will see another product (probably the old cached thumbnail). Once I delete the folder in which this cached images exists, it will start creating the correct thumbnails again.

I ensured the file permissions are on 777 in the media folder.

Does anyone have a clue?


texts: Review form in custom template not working Magento 2.3.4

texts:
I have created a custom template for the product page based on the attribute value.

in my template i used below code to display the review section.

<?php  echo $block->getLayout()->createBlock("Magento\Catalog\Block\Product\View")->setTemplate("Magento_Catalog::product/view/review.phtml")->toHtml(); ?>

with this code, i can see the link 'Be the first to review the product'.

But after clicking the link, the review form tab is not expanding. Can anyone help me on this please?

sometimes in console i get this error,

  Uncaught Error: no such method 'activate' for tabs widget instance

Please check this n share your ideas.

Thanks in Advance!!


texts: Add Analytics code to Success Checkout Page

texts:
Im adding this to my Local.xml and it just kills my footer.  I want to add my analytics code to the head of just my success checkout page. What am I missing?  Wrong update handle?

<checkout_onepage_success>
    <reference name="head">
        <block type="core/text" name="google_tracking" as="google_tracking">
            <action method="setText">
                <text><![CDATA[

                        ]]>
                </text>
            </action>
        </block>
    </reference>
</checkout_onepage_success>


texts: Magento / PayPal Partial Refunds, Refunding Whole Order

texts:
We are using Magento ver. 1.7.0.2 and have an issue when processing partial refunds via Magento.

When processing a refund for 1 item, when 3 items are purchased, Magento sends a message to PayPal of the refund though PayPal sends a message back to Magento stating that the order has been refunded, this puts the whole order of 3 items back in stock. The correct amount is refunded though.

Using PayPal Payments Standard.

Does anyone have experience with this?

Stuck.


texts: Product's Images' URLs are not same after migrating from Magento 1.9 to Magento 2.2

texts:
I have migrated Magento 1.9 to Magento 2.2.2 using magento-migration-tool and after that, I have updated an image of the product which I have also update in Magento 1.9  but both images have different URL in front, Which are below.

  http://www.domain1.com/media/catalog/product/cache/1/thumbnail/543x403/qwer751fc24f39b632cb88e6c5925d9b/p/r/pr_img01.jpg

  http://magento2.devdomain.com/pub/media/catalog/product/cache/23577479b544d65e11d54d23e4df6b67/p/r/pr_img01.jpg

These URLs are also different if we import new products also.

Is there any easy to map the images directory from Magento 1.9 to Magento 2.2

Thank you


texts: How to update content and right bar together from custom module?

texts:
I have a slider and I want to display that slider to right side and content together .
In my bellow code it displays only in content .

<layout version="0.1.0">
<default>
    <reference name="head">
        <action method="addCss">
            <js>css/dreamztech/productslider/style.css</js>
        </action>
    </reference>
</default>
  <customeslider_index_index>
    <reference name="root">
      <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </reference>
    <reference name="right">
      <block type="customeslider/index" name="customeslider_list" template="customeslider/list.phtml"/>
    </reference>
    <reference name="content">
      <block type="customeslider/index" name="customeslider_slider" template="customeslider/index.phtml"/>
    </reference>
  </customeslider_index_index>
</layout>

I also tried

<customeslider_index_index>
<reference name="root">
  <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
  <block type="customeslider/index" name="customeslider_slider" template="customeslider/index.phtml"/>
</reference>
<reference name="right">
   <block type="customeslider/index" name="customeslider_list" before="-">
     <action method="setTemplate" >
                    <template>customeslider/list.phtml</template>
     </action>
   </block>
</reference>

Still same issue


texts: How can modify method initializeProductCollection() without changing in core file

texts:
In the class Magento\Catalog\Block\Product\ListProduct, how can we modify private
method  "initializeProductCollection()" without changing anything in this core file?

Please help!!!


texts: Show Price Above Add To Cart Button for configurable products using rwd theme

texts:
My default / default theme in Magento 1.9 shows the product price in two places on the product page for configurable products; once near the top and again above the Add to Cart Button. But when I change the theme to rwd / default the price is no longer displayed near the Add To Cart Button.

Looking at template path hints I can see price_clone.phtml which includes price.phtml in the correct place above the Add To Cart Button on the page but the price still does not actually show when using the rwd them.

How do I get price_clone.phtml to work in the rwd theme?


texts: Resources and admin panel are not available after installing

texts:
I've installed Magento 2.1 Community Edition through composer (there was just an alert about some utility). I use Ubuntu 16.04, PHP 5.6, Apache2, MYSQL.

After installing I went to the admin panel but got just -

Not Found

The requested URL /admin_admin was not found on this server.

Apache/2.4.18 (Ubuntu) Server at magento.support.loc Port 80

Site settings in apache

<Directory home/ivan/sites/magento>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>

When I load my front page, I just see HTML markup and no one font or style loading. They are in not existing folders like

  http://magento.loc/pub/static/version1499045285/frontend/Magento/luma/en_US/css/styles-l.css

There is no version1499045285 folder.

What i did wrong? Maybe i did not activate some Apache mods?


texts: Magento 2 - how to set a message for the customer cart page after removing cart items via cronjob

texts:
I have made a cronjob that removes items from customer cart after a specific time has passed and the customer hasn't checked out.

Now I need to set a message for the customer to see when he / she comes back to the cart page, explaining that such items have been removed due to timeout.

Since the cron runs outside the customer session, I cant just use the messages Manager to add a message. How could I do that?


texts: Remove specific product from Solr core while deleting product in magento 1.9

texts:
Is there any better way to deleting the product from Solr core while deleting the product from Magento admin.

When I delete a product , it doesn't actually reflected or removed the product from Solr core. So, Even I can able to view the deleted product in the autosuggest result.

Could anyone have an idea or solution about how to handle these scenarios?

Solution Found

By using below solr query (Refer image or Referral link), we can remove the specific product from Solr core.

Referral Link


texts: Using repository in admin form magento 2

texts:
I using admin form from this example
But i want change modelFactory from model to repository
But i don`t know how do it.
I need to change this files from model to repository
    <?php

namespace Jeff\Contacts\Controller\Adminhtml\Index;

use Exception;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use Jeff\Contacts\Model\ContactFactory;

class Delete extends Action
{

    const ADMIN_RESOURCE = 'Index';

    protected $resultPageFactory;
    protected $contactFactory;

    public function __construct(
        Context $context,
        PageFactory $resultPageFactory,
        ContactFactory $contactFactory
    )
    {
        $this->resultPageFactory = $resultPageFactory;
        $this->contactFactory = $contactFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $id = $this->getRequest()->getParam('id');

        $contact = $this->contactFactory->create()->load($id);

        if(!$contact)
        {
            $this->messageManager->addError(__('Unable to process. please, try again.'));
            $resultRedirect = $this->resultRedirectFactory->create();
            return $resultRedirect->setPath('*/*/', array('_current' => true));
        }

        try{
            $contact->delete();
            $this->messageManager->addSuccess(__('Your contact has been deleted !'));
        }
        catch(\Exception $e)
        {
            $this->messageManager->addError(__('Error while trying to delete contact'));
            $resultRedirect = $this->resultRedirectFactory->create();
            return $resultRedirect->setPath('*/*/index', array('_current' => true));
        }

        $resultRedirect = $this->resultRedirectFactory->create();
        return $resultRedirect->setPath('*/*/index', array('_current' => true));
    }
}

And this file:

    <?php
namespace Jeff\Contacts\Controller\Adminhtml\Index;
use Exception;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use Jeff\Contacts\Model\ContactFactory;

class Save extends Action
{

    const ADMIN_RESOURCE = 'Index';

    protected $resultPageFactory;
    protected $contactFactory;

    public function __construct(
        Context $context,
        PageFactory $resultPageFactory,
        ContactFactory $contactFactory
    )
    {
        $this->resultPageFactory = $resultPageFactory;
        $this->contactFactory = $contactFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $resultRedirect = $this->resultRedirectFactory->create();
        $data = $this->getRequest()->getPostValue();

        if($data)
        {
            try{
                $id = $data['jeff_contacts_contact_id'];

                $contact = $this->contactFactory->create()->load($id);

                $data = array_filter($data, function($value) {return $value !== ''; });

                $contact->setData($data);
                $contact->save();
                $this->messageManager->addSuccess(__('Successfully saved the item.'));
                $this->_objectManager->get('Magento\Backend\Model\Session')->setFormData(false);
                return $resultRedirect->setPath('*/*/');
            }
            catch(Exception $e)
            {
                $this->messageManager->addError($e->getMessage());
                $this->_objectManager->get('Magento\Backend\Model\Session')->setFormData($data);
                return $resultRedirect->setPath('*/*/edit', ['id' => $contact->getId()]);
            }
        }

        return $resultRedirect->setPath('*/*/');
    }
}


texts:
I am new to magento 2, And want to join 4 tables.

TABLE 1) market_p_userdata (columns -> seller_id, image)
TABLE 2) market_product (columns -> seller_id, magepro_id)
TABLE 3) catalog_category_product (columns -> product_id)
TABLE 4) customer_entity (columns-> entity_id)

TABLE 3) product_id (primary key) which is as a foriegn key in TABLE 2) named as magepro_id,

TABLE 4) enity_id(primary key) which is foreign key in TABLE 3) AND 2) named as seller_id,

TABLE 2) seller_id(primary key) which is foreign key in TABLE 1) named as seller_id,

I want to get Image of seller and name of seller, I have searched many links, But still I am not getting how to create join.


texts:
How to extend the Swatch rendered js file in my custom module?

I have override the phtml template files.

<script type="text/x-magento-init">
    {
        "[data-role=swatch-option-<?= /* @escapeNotVerified */ $productId ?>]": {
            "Custom_Swatch/js/swatch-renderer": {
                "selectorProduct": ".product-item-details",
                "onlySwatches": true,
                "enableControlLabel": false,
                "numberToShow": <?= /* @escapeNotVerified */ $block->getNumberSwatchesPerProduct(); ?>,
                "jsonConfig": <?= /* @escapeNotVerified */ $block->getJsonConfig(); ?>,
                "jsonSwatchConfig": <?= /* @escapeNotVerified */ $block->getJsonSwatchConfig(); ?>,
                "mediaCallback": "<?= /* @escapeNotVerified */ $block->getMediaCallback() ?>",
                "flipImageAttribute": "<?= /* @escapeNotVerified */ $getFlipAttributeLabel ?>",
                "isFlipEnabled":"<?= /* @escapeNotVerified */ $isFlipEnabled ?>"
            }
        }
    }
</script>

I have added Require JS file in that I have mapped my custom JS file like this -

var config = {
    map: {
        '*': {
              'Magento_Swatches/js/swatch-renderer':'Custom_Swatch/js/swatch-renderer'
        }
    }
};

After this I have copied the Swatch-renderer.js in the shared location and the file is working fine. But I only want the specific function in my file, and not all. And that is done by extended. I read that mixin does something like that but I am not sure on how to do that.


texts:
I am trying to configure magento2 EE 2.0.2 with Solr v5.4.1 (latest), although the magento2 documentation shows that how to setup Solr 4.10.4 as an example.

I was wondering if magento2 EE is only compatible with Solr4 only or will it support Solr5 as well ?


texts: proper way to use .less files in custom theme?

texts:
I've followed a number of guides to properly setting up .less files in a custom magento theme and nothing seems to be working.  I've read these threads on here:

how to automatic update file `.less` in custom theme magento2?

Unable to import custom less file in custom theme's modules in Magento2

How can I add custom less file and in a particular theme compile less file in Magento 2

and poured over this page on the magento 2 docs:

https://devdocs.magento.com/guides/v2.1/frontend-dev-guide/css-topics/css-preprocess.html

I tried making  modifications in:
 {mythemedir}/web/css/source/_extend.less
 {mythemedir}/web/css/source/_extends.less
 {mythemedir}/web/css/source/_theme.less
 {mythemedir}/web/css/source/_styles.less

I've made local copies of the styles-l.less and styles-m.less from the blank (which had imports for source/_sources.less and source/_theme.less)

At this point I'm just trying to drop a simple custom class in to see that it properly gets added to the site css, but nothing I tried generates anything anywhere in the static files:

> rm -fr pub/static/frontend/Magento/custom
> php bin/magento setup:static-content:deploy -f
> php bin/magento cache:flush
> grep -r customClass pub/static
>

I also then check by Ctrl-F5 reloading the test page with a block assigned that class and nothing.

So what the hell is necessary to get the built in .less to function properly in a custom class?


texts: Move from Opencart to Magento - Category url structure not matching

texts:
When moving from Opencart to Magento I have encountered a big issue.

Open cart shop has this structure:

example.com/barnvagnar/bugaboo/bugaboo-buffalo

example.com/barnvagnar/bugaboo-buffalo

example.com/bugaboo-buffalo

All urls are for the exact same category. None has rel canonical (which they should have). example.com/bugaboo-buffalo is the url that is ranking high in Google.

On the new Magento 1.9.x site we only have one url for this category:
example.com/barnvagnar/bugaboo/bugaboo-buffalo

Question:
How can I get both example.com/barnvagnar/bugaboo/bugaboo-buffalo and example.com/bugaboo-buffalo to work on Magento? With correct rel cononical to example.com/bugaboo-buffalo. I really need the example.com/bugaboo-buffalo to work for SEO purposes. I really want to avoid to do a 301 redirect.

Basically I need this

- Root-Category (URL: /rootcategory )

-- Sublevel category (both has to work) --> /sublevelcategory
-- Sublevel category (both has to work) --> /rootcategory/sublevelcategory

Is there a built in setting for this in the Magento backend configuration?


texts: Cannot access magento admin panel from edge browser

texts:
I have installed wamp server 3.0.6 64 bit & Magento 2.1
 server on windows 10.

When I try to access magento admin panel from edge browser it does open the admin page i also see following URL
http://localhost/magento/admin_ujwal/admin/index/index/key/8befcc252419fbc51aa80295b3b5ef2128b2dc762e9b226d0599e61774564477/

and wegpage displays "we cant reach the page"

how ever same is accessible from chrome. why i cant access my magento admin panel from MS edge browser


texts: How can I restrict available shipping methods based on items in cart (weight, etc.)?

texts:
I'm looking how to restrict available shipping methods based on the items in a customer's cart. Here's some examples of what I want to do.

Customers may be purchasing smaller and lighter items, shipping UPS ground doesn't seem to make sense here.

This more pressing concern here is, if I'm always listing some flat rate options, like UPS padded flat rate envelope or UPS small flat rate box, and the customer has a bunch of items, or even 1 small item that's too large, I can't have them picking the shipping options that are too small.
The items I'm shipping can very greatly in dimensions and weight. Maybe if there's some way I can restrict the shipping methods based on dimensions AND/OR weight, that would be great.

I've been a lot of references to extensions but I'm hoping to find one that's free. The ones I have saw, are not. I also seen some things with code, even though I'm a web dev, I'm hoping there's something to handle this with an extension or creating some rules in the back end and not coding.

I have magento 1.9.2.4

Thank you.


texts:
I have a Magento EE v2.0.9 instance running. The install works fine, the site loads all areas fine. I'm trying to install the sample data and I keep running into this issue when running bin/magento sampledata:deploy:

Problem 1
    - The requested package magento/module-gift-card-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 2
    - The requested package magento/module-customer-balance-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package magento/module-target-rule-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package magento/module-gift-registry-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 5
    - The requested package magento/module-multiple-wishlist-sample-data could not be found in any version, there may be a typo in the package name.

In true Magento style the dev docs assume everything is working so I haven't been able to find much on troubleshooting this. Ideally I am looking to install 2.1.1 EE with Sample Data, but I read there is no sample data released for 2.1 yet, so I'm settling for 2.0.9


texts: Is it OK to modify app/Mage.php to edit the date_default_timezone_set value in magento 1.9?

texts:
Is it OK to modify app/Mage.php to edit the date_default_timezone_set value?

I've modified my timezone in magento at System => General => Locale Options => Timezone, and set it to America/New_York, but it's still showing UTC time and every time based function is keying off of UTC time.

When I look at app/Mage.php it shows:

if (is_readable($localConfigFile)) {
    libxml_disable_entity_loader(false);
    $localConfig = simplexml_load_file($localConfigFile);
    date_default_timezone_set('UTC');
    if (($date = $localConfig->global->install->date) && strtotime($date)) {
        self::$_isInstalled = true;
    }
}

Thus, I assume I have to modify date_local_timezone_set from UTC to America/New_York? But is it OK to modify the app/Mage.php in this manner?

Thank you.


texts:
I'm working on trying to refactor an old module someone had built and wanted to have unit tests in place so I could make sure the refactored version was working correctly, so I installed EcomDev_PHPUnit via Magento Connect, added the database and url details to local.xml.phpunit and then added the phpunit entry into the module configuration so it would recognise it as having tests present

The problem is that, when I try to run phpunit in the base directory like the instructions say, it just shows the help prompt phpunit does when you run it without a target. I then tried running it on the Magento directory, but other modules with tests started throwing errors about core classes not being available. The last thing I tried was just running phpunit on the test I'd built, which just had an empty function in it so shouldn't have thrown any errors, but that complained about EcomDev_PHPUnit_Test_Case not being found.

So I'm stuck, it seems like I either can't run any tests or the tests won't import the correct classes from Magento. Does anyone know what might be causing this? I'd really appreciate a bit of help with this


texts: How to create admin form using UI component in 2-column layout with tab in magento 2?

texts:
I have created a form using UI component and added tab in the form. I used the reference from
/vendor/magento/module-customer/view/base/ui_component/customer_form.xml. I can see the tabs in left but form is not loaded and only loading spinner is showing. Can anyone help me to fix this?


texts:
Hi guys recently updated Magento to the latest core and I am having an issue with a plugins page in the admin area. I am getting a 404 so I assumed it was an admin route issue.

I changed:

<admin>
    <routers>
        <kiwiplugin>
            <use>admin</use>
            <args>
                <module>Kiwicompany_Kiwiplugin</module>
                <frontName>kiwiplugin</frontName>
            </args>
        </kiwiplugin>
    </routers>
</admin>

to...

<admin>
    <routers>
      <kiwiplugin>
          <args>
              <modules>
                      <kiwiplugin before="Mage_Adminhtml">Kiwicompany_Kiwiplugin_Adminhtml</kiwiplugin>
              </modules>
          </args>
      </kiwiplugin>
    </routers>
</admin>

With no luck. I see a lot of conflicting information on whether to move controllers around etc, can someone talk me through my next steps? When I click the link in the nav in the admin I get:

http://www.example.com/index.php/kiwiplugin/adminhtml_kiwiplugin/index/key/....


texts: How to override product custom option price too in magneto 2

texts:
I am overriding the price using observer and it works fine until the product has custom options. I do updated the price for special price/regular price but seems like because of not handling the custom option my product are not being added to the cart. I am sharing what i have done so far:
created an observer:
<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
 <event name="checkout_cart_product_add_after">
        <observer name="set_custom_price_after_add_to_cart" instance="vendor\module\Observer\CustomPrice" />
 </event>
</config>

and related class:

namespace vendor\module\Observer;

use \Magento\Framework\Event\ObserverInterface;

/**
 * Class CustomPrice
 * @package vendor\module\Observer
 *
 */
class CustomPrice implements ObserverInterface
{

    public function execute(\Magento\Framework\Event\Observer $observer) {
        $item = $observer->getEvent()->getData('quote_item');
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        $regularprice = $item->getProduct()->getPrice();
        $price = 2*$regularprice;
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        $item->getProduct()->setIsSuperMode(true);
}
}

Now my problem is how to handle the custom option prices??
Please help!!


texts: Integrating composer's autoloader into Magento

texts:
So composer is awesome, and there's a lot of code in composer's packagist repository that makes writing Magento extensions easier.

The problem I'm facing, is how best to (cleanly) setup autoloading.

By default composer packages get installed to /vendor, and inside of that directory is an autoload.php file which sets up classloading for the composer managed packages.

So what would be the best way to require_once composer's '/vendor/autoload.php' file? This would need to work for both the webstore and shell scripts. Is there an observer event I can tap to do the require_once?

Cheers!


texts: Magento 2 : installation stuck at 67% every time

texts:
I m trying to install magento2.1 with sample data but every time it stuck on 67%.
As I check in console ....setup/index.php/session/prolong returning false every time.

Please let me know what should I check to complete this.


texts: Magento 2 Magnifier widget preview image issue

texts:
In Magento2 MY_THEME/etc/view.xml for the magnifier I've set the following values.
<var name="magnifier">
    <var name="fullscreenzoom">5</var>  <!-- Zoom for fullscreen (integer)-->
    <var name="top">0</var> <!-- Top position of magnifier -->
    <var name="left">600</var> <!-- Left position of magnifier -->
    <var name="width"></var> <!-- Width of magnifier block -->
    <var name="height"></var> <!-- Height of magnifier block -->
    <var name="eventType">hover</var> <!-- Action that atcivates zoom (hover/click) -->
    <var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
</var>

So while on hover zoomed image should be shown beside of image but the zoomed image get clipped or not properly visible as shown in following picture.
Any ideas what can be wrong with it???


texts:
While migrate the data from Magento 1.14.2.2 to Magento 2.2.3, I'm getting the below error.

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Migration\Step\Map\Data::getRecordTransformer() must be an instance of Migration\ResourceModel\Document, boolean given, called in /var/www/html/magentoroot/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php on line 147

Please any suggestion the solutions


texts: how to get tax amount of a product in success page?

texts: I want to get tax amount of a product in success page. I'm getting price of a product but not tax amount from order object. can anyone please help me on this. Thanks


texts: How can i add the Manufacturer Name in Product title?

texts:
I want to add the Manufacturer into the Product Title like:

"Nike" Shoe XYZ or "Apple" iPhone 5s

The manufacturer Attribute is already set in Backend. But i want to import our 15k Products via csv import.


texts: Custom option selection from checkout/cart in Magento 1.9

texts:
I want to add functionality of custom option selection from checkout/cart, As like custom option selection from product page.

Anyone know about this? Please help me.


texts: default magento onepage checkout success page gives 404 error

texts:
I am using Magento 1.9.2.4 and default onepage checkout. I am facing issue when customer already on checkout page and click on place order but session was got timeout before placing order. Below is scenario:

My session time out set from backend is 3600sec.

I am on checkout page and on order review step and selected COD payment method
I waited for 1hr then I clicked on place order button, My order got placed and redirect to checkout/onepage/success and throws 404 because customer session was timed out.

If I visit this url http://domain.com/checkout/onepage/success directly in address bar if customer is not logged then magento throwing 404 error page.

I have configure in backend system > configuration > checkout > allow guest checkout > No
and system > configuration  > checkout > Require Customer To Be Logged In To Checkout > Yes

When I changed Yes to No for Require Customer To Be Logged In To Checkout then it's working fine.

Why Magento treating success page url as 404 error page when customer session timed out and setting for Require Customer To Be Logged In To Checkout is set to Yes?

Any help appreciated!


texts: Assets from module not appearing in pub/static folder

texts:
Running Magento 2.1

I am building a module with alert.js in the /view/frontend/web/ folder in my module: https://github.com/waynhall/frontend1/tree/master/Pulsestorm/FrontendTutorial1

However, after enabling the module and running magento setup:upgrade and magento setup:di:compile and reloading the homepage to generate the pub/static folder, there is no folder here as I would expect:

  /var/www/magento.dev/public_html/pub/static/frontend/Magento/luma/en_US/Pulsestorm_FrontendTutorial1/ in order to serve the alert.js

What am I doing wrong?


texts: Magento2.2.2: UI Component Grid Filter Issue-Please explain getCollection function with excluded and selected how related with ui-grid?

texts:
Magento2.2.2 UI Component Grid Filter Issue.

Please explain getCollection function with excluded and selected how related with UI-grid

\Magento\Ui\Component\MassAction\Filter

public function getCollection(AbstractDb $collection)
{
    $selected = $this->request->getParam(static::SELECTED_PARAM);
    $excluded = $this->request->getParam(static::EXCLUDED_PARAM);

    $isExcludedIdsValid = (is_array($excluded) && !empty($excluded));
    $isSelectedIdsValid = (is_array($selected) && !empty($selected));

    if ('false' !== $excluded) {
        if (!$isExcludedIdsValid && !$isSelectedIdsValid) {
            throw new LocalizedException(__('Please select item(s).'));
        }
    }
    /** @var \Magento\Customer\Model\ResourceModel\Customer\Collection $collection */
    $idsArray = $this->getFilterIds();
    if (!empty($idsArray)) {
        $collection->addFieldToFilter(
            $collection->getIdFieldName(),
            ['in' => $idsArray]
        );
    }
    return $collection;
}

here what is the selected and excluded parameter and how it related with our admin UI-grid?


texts: Time To First Byte with varnish cache - 12 seconds

texts:
I installed varnish cache and verified using official guide.

In official guide mention 5ms to load the url with varnish but mine it is 12s.

Info:

OS : ubuntu 14.0.4, webserver : apache2, php : 7, php memory_limit : 2G, Varnish : varnish-4.0.5

Below attached my store front(http://host/codebase/production) chrome console output

what I need to tune? please feel free to post answer/comment, any help would be much appreciated, we can keep consolidating answer of tuning page load speed.


texts: Discount code shows in cart but not checkout Magento 2.2.5

texts:
We have a cart price rule that applies a discount to a certain product (e.g. if item found in cart with brand 'Nike' then discount 'Nike' product 10%).

A customer goes to checkout/cart/ the discount shows OK.
A customer moves to checkout/#shipping the discount no longer shows.
A customer moves to checkout/#payment the discounts shows OK.

It's confusing for customers not to see the same basket value all the way through the process.

Is there a way to resolve this issue? And ensure product price with discount is visible in the same way on the #shipping page?


texts: Category tab content page is not showing up(blank) in manage categories (categories) in Magento 1.9


texts: Magento 2. Category Search engine optimization returns error

texts:
I have created many categories in my magento site.I want to remove .html in category url suffix...When i make empty the text field in

Configuration->Catalog->catalog->search engine optimization->Category URL Suffix

It returns following error

  Something went wrong while saving this configuration: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'best-seller-1' for key 'BM_URL_REWRITE_REQUEST_PATH_STORE_ID', query was: UPDATE bm_url_rewrite SET request_path = ? WHERE (url_rewrite_id = 238)

I can't find any solution about this..please anyone help me...


texts: magento2 home page load very slow when user visit first time

texts:
In my home page I have slider, some dynamic category images, some dynamic products and blogs. When user visit first time it's very slow.

Could anyone suggest me how I load part by part, not all at one time.
I want to say, using lazy load how I load one by one block.

Slider, category image, products and blog all are configure by magento widgets.

My home page url is: https://www.lapisbard.com/


texts: How to code Magento 2 enterprise's default pagebuilder as responsive (mobile friendly)?

texts:
As part of one of my Magento 2 enterprise projects, I need to enable the admin user to customize the page layout (responsive layout) using the page builder. For desktop, it could be done pretty well but there seems no solution on this for mobile devices.

I've been thinking of following approaches but do not find a code-level solution:

1. Customize the page builder code and apply CSS classes instead of the inline CSS code, which applies at the moment.

2. Add some attribute for page builder's column component so that admin could modify the ordering and sizing for mobile too as it works for desktop.

I do not find any relevant information on devdocs.magento.com either. If anyone could suggest some resources, it would be beneficial with the kind suggestions and solution if you have already implemented anything before.


texts:
Synopsis

I have a custom module which is designed to allow attachments to be uploaded for a specific product.  I have done some research and lot's of trial and error, but I think my lack of understanding is partly the reason why it isn't working.

Along with my research i've followed several tutorials, and only one of them used their own custom table except it was still based on an existing table.

My goal

I am attempting to accomplish - A grid that will display data from a custom table in the database.

./controllers/Adminhtml/Product/Uploader/AttachmentController.php

class Vendor_ProductUploader_Adminhtml_Product_Uploader_AttachmentController
    extends Mage_Adminhtml_Controller_action
{
    /**
     * Array of actions that can be processed without a secret key validation.
     * @var array
     */
    protected $_publicActions = array();

    public function indexAction()
    {
        $this->loadLayout();
        $this->_addContent($this->getLayout()->createBlock('vendor_productuploader/adminhtml_attachment'));
        $this->renderLayout();
    }

    public function gridAction()
    {
        $this->loadLayout();

        $response = $this->getLayout()
            ->createBlock('vendor_productuploader/adminhtml_attachment_grid')
            ->toHtml();

        $this->getResponse()->setBody($response);
    }
}

./Block/Adminhtml/Attachment.php

class Vendor_ProductUploader_Block_Adminhtml_Attachment
    extends Mage_Adminhtml_Block_Widget_Grid_Container
{
    public function __construct()
    {
        $this->_blockGroup = 'productuploader';
        $this->_controller = 'adminhtml_product_uploader';
        $this->_headerText = Mage::helper('vendor_productuploader')->__('Product Attachments');
        parent::__construct();
        $this->_removeButton('export_button');
    }
}

./Block/Adminhtml/Attachment/Grid.php

class Vendor_ProductUploader_Block_Adminhtml_Attachment_Grid
    extends Mage_Adminhtml_Block_Widget_Grid
{
    public function __construct()
    {
        parent::__construct();
        $this->setId('entity_id');
        $this->setDefaultSort('updated_at');
        $this->setDefaultDir('ASC');
        $this->setSaveParametersInSession(true);
        $this->setUseAjax(true);
    }

    protected function _prepareCollection()
    {
        $collection = Mage::getModel('vendor_productuploader/attachment')
            ->getCollection();

        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

    protected function _prepareColumns()
    {
        $this->addColumn('entity_id', array(
            'header' => Mage::helper('vendor_productuploader')->__('ID'),
            'index'  => 'entity_id',
        ));
        $this->addColumn('label', array(
            'header' => Mage::helper('vendor_productuploader')->__('File Name'),
            'index'  => 'label',
        ));
        $this->addColumn('description', array(
            'header' => Mage::helper('vendor_productuploader')->__('Description'),
            'index'  => 'description',
        ));
        $this->addColumn('created_at', array(
            'header' => Mage::helper('vendor_productuploader')->__('Created At'),
            'type'   => 'date',
            'index'  => 'created_at',
        ));

        return parent::_prepareColumns();
    }

    public function getGridUrl()
    {
        return $this->getUrl('*/*/grid', array('_current' => true));
    }
}


texts: Magento 2 Ui Component Date Field Saves current date

texts:
Magento 2 Ui component Date Fields save the current date not saved the inputed date please show my below code

Form

 <field name="active_from_date" formElement="date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">program</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="validate-date" xsi:type="boolean">true</rule>
            </validation>
            <dataType>text</dataType>
            From
            <dataScope>active_from_date</dataScope>
        </settings>
    </field>

    <field name="active_to_date" formElement="date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">program</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="validate-date" xsi:type="boolean">true</rule>
            </validation>
            <dataType>text</dataType>
            To
            <dataScope>active_to_date</dataScope>
        </settings>
    </field>

and save action

 public function execute()
{
    $data = $this->getRequest()->getPostValue();

    $resultRedirect = $this->resultRedirectFactory->create();
    if ($data) {
        $id = $this->getRequest()->getParam('id');
        if ($id) {
            $model = $this->programRepository->getById($id);
        } else {
            unset($data['id']);
            $model = $this->programFactory->create();
        }

        try {
            $this->dataObjectHelper->populateWithArray($model, $data, ProgramInterface::class);
            $this->programRepository->save($model);
            $this->messageManager->addSuccessMessage(__('You saved this data.'));
            $this->_getSession()->setFormData(false);
            if ($this->getRequest()->getParam('back')) {
                return $resultRedirect->setPath('*/*/edit', ['id' => $model->getId(), '_current' => true]);
            }
            return $resultRedirect->setPath('*/*/');
        } catch (\Magento\Framework\Exception\LocalizedException $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        } catch (\RuntimeException $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        } catch (\Exception $e) {
            $this->messageManager->addException($e, __('Something went wrong while saving the data.'));
        }

        $this->_getSession()->setFormData($data);
        return $resultRedirect->setPath('*/*/edit', ['id' => $this->getRequest()->getParam('id')]);
    }
    return $resultRedirect->setPath('*/*/');
}

Please help me


texts: How can I change an existing modal in Magento 2?

texts:
I'm trying to change the behavior of a Modal (not Model) in Magento 2.
The modal in question is advanced_inventory_modal, declared in module-catalog-inventory/view/adminhtml/ui_component/product_form.xml.

Now I know I can use a Modifier in the product-form-modifier-pool:

<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
    <arguments>
        <argument name="modifiers" xsi:type="array">
            <item name="hf_quantity" xsi:type="array">
                <item name="class" xsi:type="string">Vendor\Module\Ui\DataProvider\Product\Form\Modifier\Quantity</item>
                <item name="sortOrder" xsi:type="number">100</item>
            </item>
        </argument>
    </arguments>
</virtualType>

... and use the modifyMeta()-method in my modifier to manipulate the XML configuration, but for some reason, the inventory modal is not present in the data that is provided here. It's also not a sortOrder-related problem since I already set that way high. The sortOrder-attribute might have something to do with it.

So what gives? Can anyone tell me what's the proper way to modify the content of an existing modal in Magento 2?

Edit:

I found a solution or workaround (not sure yet) on how to achieve what I am trying to achieve. It turns out that if I set sortOrder to 10000 I have some data in my modifyMeta()-a method that I can use:

public function modifyMeta(array $meta)
{
    if ($path = $this->arrayManager->findPath('quantity_and_stock_status_qty', $meta, null, 'children')) {
        $this->arrayManager->remove(
            $path . '/children/qty/arguments/data/config/validation/validate-digits',
            $meta
        );
    }

    if ($path = $this->arrayManager->findPath('advanced_inventory_modal', $meta)) {
        $meta = $this->arrayManager->merge(
            $path . '/children/stock_data/children/qty/arguments/data/config',
            $meta,
            ['validation' => ['validate-digits' => false]]
        );
    }

    return $meta;
}

Note that the `advanced_inventory_modal` node is not yet complete, but my best guess is that the later addition of the modal merges with these settings, but doesn't override it. Could be wrong though, perhaps someone could share some more light on how this mechanism works?


texts:
I want to create new action (like 'webrequest/index/search') on existed module. I created following https://www.mageplaza.com/magento-2-module-development/
But when I run http:///webrequest/index/search, the program go to default page (http://)
Please give me solution
Edited: I add my code
Controller/Index/Search.php
<?php
namespace Paymentpf\webrequest\Controller\Index;

use \Magento\Framework\App\Action\Action;

class Search extends Action
{

        /**
 * @var \Magento\Framework\View\Result\PageFactory
 */
protected $_resultPageFactory;
  /**
 * @var \Magento\Customer\Model\Session
 */
protected $_customerSession;

/**
 * @param Context                                       $context
 * @param \Magento\Framework\View\Result\PageFactory    $resultPageFactory
 * @param \Magento\Customer\Model\Session $customerSession
 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
 */
public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory,
    \Magento\Customer\Model\Session $customerSession
) {
    parent::__construct($context);
    $this->_resultPageFactory = $resultPageFactory;
    $this->_customerSession = $customerSession;
}

/**
 * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
 */
public function execute()
{
     $cusSession = $this->_customerSession->getId();

         /** @var \Magento\Framework\View\Result\Page $resultPage */
         $resultPage = $this->_resultPageFactory->create();
         $resultPage->getConfig()->getTitle()->set(
             __('新規請求登録')// UIUX 20200730
         );
         return $resultPage;
    }
}

webrequest_index_search.xml
<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content">
        <block class="Paymentpf\Webrequest\Block\Webrequest" name="webrequest_index_search" template="Paymentpf_Webrequest::webrequest_search.phtml" cacheable="false"/>
    </referenceContainer>

webrequest_search.phtml

Hello


texts: Magento 2 – default admin editor -where is settings js code?

texts: I want to change admin editor setting but not found config js code, please guys share me JS code path so i can change editor settings.


texts: Where are sales_flat_*_grid tables filled?

texts:
Hi i'm making a copy of the Shipping-Model for my own purposes.
But i cannot find the point where the

sales_flat_shipment_grid

is filled. Can anybody show me?
I'm on magento 1.9CE


texts:
Right now my store is located at www.example.com/store

How do change that so that when I type www.example.com it goes to the store? Right now it goes to what I was trying to design before. I don't want that.

Thanks!

Rachel


texts:
I am trying to override the content on /requisition_list/requisition/index/ in the account pages. I have created the following file -> app/design/frontend/[COMPANY]/[THEME_NAME]/Magento_RequisitionList/frontend/templates/requisition/actions/create.phtml

create.phtml is copied over from vagrant/tmp/vendor/magento/module-requisition-list/view/frontend/templates/requisition/actions/create.phtml

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

    <button class="action add" type="button"
            data-bind="
                click: edit.bind($data, {}),
                visible: isCanCreateList()">
        <?= $block->escapeHtml(__('Create New Requisition List')) ?>
    </button>

MESSAGE TO GO HERE

but the changes are not visible on the front end. I have verified the template using by enabling theme hints, tried running setup:di:compile, flushed the cache, cleaned the cache, verified file permissions, etc. without no luck.

How can override content on this page?


texts: HTTP 500 error in Aheadworks Blog Module in magento 1.9.3.6

texts:
I am using aheadworks blog extension for magento community edition version 1.9.3.6. module is installed correctly and blog is showing at frontend. however when i click on blog's link. it shows HTTP 500 error.

anyone has an idea, what is the reason behind this error?


texts: How to set header in magento2 controller function?

texts:
I am trying to create a ICS file, core php I wrote the code like this -

    include 'ICS.php';

header('Content-Type: text/calendar; charset=utf-8');

$ics = new ICS(array(
  'location' => '123 test St, New York, NY  ',
  'description' => 'This is my description',
  'dtstart' => '2018-8-16 9:00AM',
  'dtend' => '2018-8-16 10:00AM',
  'summary' => 'Testing',
  'url' => 'www.google.com'
));

file_put_contents('/home/test.ics', $ics->to_string());

Its running fine.

Now I am trying to implement the code in Magento2 controller's private function. But how can I set header('Content-Type: text/calendar; charset=utf-8'); in magento2 ?


texts: How to programmatically create a product review for Administrator?

texts:
I'm trying to create product review programmatically, using the below code

<?php
ini_set('memory_limit', '128M');
require_once 'app/Mage.php';
Mage::app();
Mage::app()->setCurrentStore(1); //desired store id
$review = Mage::getModel('review/review');
$review->setEntityPkValue(1);//product id
$review->setStatusId(1);
$review->setTitle("mytitle");
$review->setDetail("mydetail");
$review->setEntityId(1);
$review->setStoreId(Mage::app()->getStore()->getId());      //storeview
$review->setStatusId(1); //approved
$review->setCustomerId(1);
$review->setNickname("Menickname");
$review->setReviewId($review->getId());
$review->setStores(array(Mage::app()->getStore()->getId()));
$review->save();
$review->aggregate();
?>

When I set customer Id $review->setCustomerId(1) like this, it creates review for the product by customer with id=1 and when I use this $review->setCustomerId(), it creates review for the product by Guest. But I could not make review by administrator, I tried the below

$review->setCustomerId(null)

This also set review by Guest. How to create review for product by administrator?


texts: Save 2 columns in one row with setData()

texts:
How can I save 2 values of a row in a table, simultaneously?
The table is called entity_export and the columns are entity_id and entity_type.

Here is what I have:

Mage::getModel('xmlexport/export_entity')->setData('entity_id' => $orderNumber, 'entity_type' => 'order')->save();

but I get syntax error on the first =>. And it looks like setData() can save only 1 column value at a time, but I need them 2 simultaneously.

This is the direct SQL query execution that I was using before:

$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql = 'INSERT INTO  `export_entity` (
        `id` ,
        `entity_id` ,
        `entity_type`
        )
        VALUES (
        NULL ,  "'.$orderNumber.'",  "order"
        )';
$connection->query($sql);

But I want to make it more elegant and injection proof. That's why I am trying to use the provided functionality by the framework, but I can't seem to handle it correctly. Any suggestions?


texts: What hash method need to use generate password_hash - Magento2

texts:
I have a situation to write java code to match password_hash field as like customer_entity table. After read this answer I have tried with SHA256 but the result was different also I have tried with MD5, it also does not match with password_hash field.

I have used this online generator tool, it list most of the hash method but none of the result match with password_hash of customer_entity table.

I'm looking for your suggestion what is the exact hash method I need to use?, it should be match with password_hash field of customer_entity table.


texts:
I was wondering how to split cents from price so I can style them differently .
I am new to magento so I cannot really understand where and how to find the file that creates this html ->
I want to change it to 108,00лв


texts: Magento 1.9 I need add qty in category page and mask should not load

texts:
My template used ajax cart
this code in my category page(list.phtml)

<a href="<?php if(!Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code) && !Mage::getStoreConfig("tnd        _settings/category/qty_field", $code)): ?>
<?php echo $this->getAddToCartUrl($_product) ?><?php else: ?>javascript:void(0)<?php endif; ?>" class="addtocart" title="<?php echo $this->__('Add to Cart') ?>"
<?php if(Mage::getStoreConfig("ajaxcart/addtocart/enablecategory", $code)):?>onclick="setLocationAjax(this,'<?php echo $this->getAddToCartUrl($_product) ?>'
,'<?php echo $_product->getId(); ?>')"<?php elseif(Mage::getStoreConfig("tnd_settings/category/qty_field", $code)): ?>onclick="document.getElementById('addtocart_form_<?php echo $_product->getId(); ?>').submit()"<?php endif; ?>>&nbsp;<?php echo $this->__('Add to Cart') ?>

A number is added when the user clicks on add to cart and load the mask in page
i need the user to be able to enter the number of need the product on this page
of course by an number input


texts: Magento 2 Ui Conditions component in custom module

texts:
Please tell me about using Ui Conditions component in my custom module. I`m trying to make module with products conditions filtration, like a catalog widget 'catalog product list':

I'm trying to implement conditions component in XML like this:

<fieldset name="conditions">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Conditions</item>
            <item name="collapsible" xsi:type="boolean">true</item>
            <item name="sortOrder" xsi:type="number">20</item>
        </item>
    </argument>
    <container name="conditions_apply_to" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">10</item>
            </item>
        </argument>
        <htmlContent name="html_content">
            <argument name="block" xsi:type="object">Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Conditions</argument>
        </htmlContent>
    </container>
</fieldset>

And then I have this view in admin console:

But it have wrong menu when i trying to add new condition. I have:

I need to (like a catalog product list widget):

Questions:

The right way to implement and use conditions component;
How to take right menu when I add new condition;
How to take a view of the conditions component like catalog product list widget, instead view which I have.

Thanks beforehand!


texts: Manage Qty Stock update using Magento SOAP API

texts:
We are using below like code for Qty stock update using Magento SOAP API.

try {
$client = new SoapClient('http://www.magentosite/index.php/api/?wsdl', array("connection_timeout" => 5,'cache_wsdl' => WSDL_CACHE_NONE, 'exceptions' => true, 'trace' => 1));
$sessionId = $client->login('user', 'apikey');
$resultCatalogProductList = $client->call($sessionId, 'catalog_product.list');

$allPordIds=[];
foreach ($resultCatalogProductList as $prod) {
    $allPordIds[]= $prod['product_id'];
}
$allProdStockList=$client->call( $sessionId, 'product_stock.list',   array( $allPordIds));
$calls = array();
foreach ($allProdStockList as $product) {
   $updatedQty=10;
             $calls[] =array( 'product_stock.update', array($product['sku'], array('qty' =>$updatedQty, 'is_in_stock' => $updatedQty > 0  )) );
}
foreach (array_chunk($calls, 100) as $skuChunk) {

            $result=$client->multiCall($sessionId, $skuChunk);
             print_r($result);

        $cnt++;
    }

Currently our store have 2500 products and We want to stock update of all product.For that We have used array_chunk($calls,100) so it will Break into blocks of 100 for speed boost.

So when we call above script then it will take to much time to update.and Sometimes it will continue load.

So please help us for above slow loading qty update to make faster.


texts: I have a custom cms page like "www.example.com/brand-productlist?brand-id=147" .I need the url like "www.example.com/brand-productlist/147" using htaccess in magento 2.2.1.


texts: Create an admin user programmatically in Magento 2.0

texts:
It is simple to add new admin user in Magento 1.9

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

$user = Mage::getModel('admin/user')
    ->setData(array(
        'username'  => 'admin',
        'firstname' => 'admin',
        'lastname'  => 'admin',
        'email'     => 'me@hackme.com',
        'password'  => 'hacker@123',
        'is_active' => 1
    ))
    ->save();

$user->setRoleIds(array(1))
    ->setRoleUserId($user->getUserId())
    ->saveRelations();

echo "User has been created successfully!";

?>

But how can I add admin user in Magento 2.0?


texts: New Root Category Not Display At FrontEnd

texts:
I Have Created New Root Category As Name "New Store2"
And its also have subcategory As Name "laptops".

But It was not displays in front end.


texts: Getting An Error Message With All My Category Pages

texts:
I'm in the process of setting up my new store and all of my category pages produce this error when you try to visit them. Is anyone familiar with this and how to fix the problem? Thanks for the help as always, you guys are excellent.

Here's an example: http://www.lightsy.co.uk/index.php/bottom.html


texts: Top menu depth level different than left categories depth level

texts: I would like to show in top menu just until 3rd depth level and in left categories sidebar all depth levels. How I supposed to do? Thanks


texts: Magento 2 - Transactional E-Mail Template location

texts:
I need to change the code of a transactional E-Mail template.
Where can I find them in the magento project so I can change them?


texts: Magento 2: Downloadable file compression

texts:
I am uploading size of 500mb downloadable video for downloadable product.
How can we compress the file during upload ?
I have checked the setting, no such features available from admin end.
Thanks


texts: Magento 2 : Add comment field in checkout page

texts:
I want to add the Delivery Comment field in the checkout page like this.

How can I do that?
Any help? Thank in advance.


texts: Magento - automatically export all products at 00:01 at first day of the month

texts:
i would like to automatically export all products of my webshop at the first day of the month right after 00:00.

I do know how to export them manually with the export functionality and know how to set a cron for this.

But is there to export all products with the attributes?
And preferably only all products with qty 1 or more ...

I have Magento 1.8.1 CE


texts: Redirect Add to cart button to cart page

texts:
IF we click on "Buy now " button in view page

its redirecting to cart page. we are using following code :

<button class="button buy-now" onclick=”location.href =’{{config path=”web/unsecure/base_url”}}/checkout/cart/add?product=1&qty=1′”>
Buy Now</button>

we are using following code for "Add to cart" button, what we need is if we click on "add to cart" button,

than it should redirect to cart page.

<button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart"
onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>

edit

JS code :

 productAddToCartForm.submit = function(button, url) {
            if (('undefined' != typeof productAddToCartFormOld) && productAddToCartFormOld) {
                if (Catalog.Map.active) {
                    Catalog.Map.hideHelp();
                }
                if (productAddToCartForm.qty && $('qty')) {
                    $('qty').value = productAddToCartForm.qty;
                }
                parentResult = productAddToCartFormOld.submit();
                return false;
            }
            if(window.opener) {
                var parentButton = button;
                new Ajax.Request(this.form.action, {
                    parameters: {isAjax: 1, method: 'GET'},
                    onSuccess: function(transport) {
                        window.opener.focus();
                        if (parentButton && parentButton.href) {
                            setPLocation(parentButton.href, true);
                            Catalog.Map.hideHelp();
                        }
                    }
                });
                return;
            }
            if (this.validator.validate()) {
                var form = this.form;
                var oldUrl = form.action;

                if (url) {
                   form.action = url;
                }
                if (!form.getAttribute('action')) {
                   form.action = productAddToCartForm.action;
                }
                try {
                    this.form.submit();
                } catch (e) {
                    this.form.action = oldUrl;
                    throw e;
                }
                this.form.action = oldUrl;

                if (button && button != 'undefined') {
                    button.disabled = true;
                }
            }
        };


texts:
In magento 2, How to provide transaction ?
Anyone knew, please show me step by step.
I found a solution for M1.x here How Provide transaction In Magento


texts: Where to extract the Magento Amazon Sales Channel and folder name

texts:
Install instructions at the link https://devdocs.magento.com/extensions/amazon-sales/ are incomplete. instructions say to extract package manually to root. This will overwrite the root composer file & leave a mess of folders.
-If not to root where should the folder be placed & what should the folder name be? Magento 2.3.4


texts: Cron job is only working when I run the cron command manually

texts:
I have created a cron job and its only working when I run the below command:

php bin/magento cron:run

But the cron should run automatically. What Could be the issue and why the cron is not running automatically in my case?
Could anyone please help me and guide on this?


texts: How can i choose more than one category of product import using magmi


texts: Manipulating list.phtml file's getloadedproductcollection

texts:
I've been trying to something for days and stuck! Need help. I'm trying to manipulate the getloadedproductcollection() method called in list.phtml file in catalog/product. I want to remove the duplicate entries of a product(by name). I tried to apply filters in phtml files but with no success. When looked in the list.php file, couldn't get anything to achieve what I want. Is there any possible way to apply that filter to the product collection on category pages.
I tried getSelect()->group('name') as it was mentioned on a question in stackoverflow, but it generated error. Can't do distinct() as it is having no effect. Also tried removeItemByKey(&key) inside foreach loop, it again generated error.
Can anyone redirect me to right direction, as it strongly feel, it should be possible in an environment like magento.

P.S.: don't want to delete duplicate products from backend as they are necessity.

Reason for duplicate products: I'm having variations of products in weight, volume, or other units, which can't be managed with configurable products, as there is no rule for defining these values in advance, they may be ranging from 1kg to 100kg for example. Therefore, I created an attribute for their respective  units and products having same name are differentiated using their respective units. That's why I'm having duplicate entries.


texts:
I have recently been updating the meta info for a site that is on Magento 2.3.6.
I have come across an issue in the way the meta description appears on google for the category pages. Before the description starts, it is adding the product count for the page as seen in the attached image. This means that the description gets cut off and does not display optimally.
Does anyone know if this is a setting in magento that I can change?


texts: Do excluded images increasing the loading time of a page?

texts: let's say I got 10 images and 7 of this images are excluded(customer don't see them) or I got 3 images with none of them are excluded. Would there be any difference in the loading time?


texts:
I am getting this error on home page

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer': This element is not expected. Expected is one of ( action, arguments, block, container, referenceBlock, uiComponent ).
Line: 889


texts: Production mode won't geneate files inside var/view_processed folder

texts:
When I open the frontend and backend I always got an error like this:

  "Warning:
  include(/var/www/test.com/var/view_preprocessed/html/vendor/magento/module-theme/view/base/templates/root.phtml):
  failed to open stream: No such file or directory in
  /var/www/test.com/vendor/magento/framework/View/Result/Page.php on
  line 312";

I checked inside var/view_processed folder and it only has 1 css file.

I already tried this solution, but it's not working, I already set the permission for var folder to 775 but it's not working either

chmod -R 775 var

The only solution for me right now is change the Magento mode from production to developer.

bin/magento deploy:mode:set developer

When I change to developer mode it's working fine, but when I change back to production mode the same error appear. How to fix this error for production mode?


texts: How to disable/enable backorder for particular website/store?

texts: I want to enable/disable backorder from one of the available websites. How can I implement it?


texts: Indexer not taking correct batch size in Magento 2

texts:
I have created a module and a file
app/code/Mag/Indexer/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\CatalogInventory\Model\Indexer\Stock\Action\Full">
        <arguments>
            <argument name="batchRowsCount" xsi:type="array">
                <item name="configurable" xsi:type="number">100</item>
                <item name="default" xsi:type="number">100</item>
            </argument>
        </arguments>
    </type>
</config>

But it doesn't take 100 when i check on proceslist.
I have checked my module is enabled.
Any help is appreciated.


texts: How to hide empty attribute in any magento template?

texts:
I want to hide the custom attribute in magento template. My magento version is 1.8.1

We have added custom attribute for our product like brand, dimension, product type etc. but sometimes we didn't add values in these attributes. magento shows No or N/A in product view page.

So, we want to hide attributes which are empty or no value in template.


texts: Cart Rule to apply single "big box" shipping if item matches attribute

texts:
I'm trying to setup a tricky thing here in Magento 2.1

We sell some sport stuf with a FLAT rate of EUR10 on all items. However their are some bigger items that require a "Big Box" which is EUR28.

The problem is, if even if there are multiple "Big Box" items selected, the shipping charge remains single Eur28 only, not multiple. So if multiple biog and small items are selected, the effective shipping remains Eur28 only.

We create an Attribute "Big Box" to those specific products and then in Cart rule, I set up a condition if item found in cart has attribute "Big Box" then

can you help me sort out the action?? what/where to set up ?


texts:
I am creating a custom payment module for magento 2 and I am experiencing the following problem. I get an error on the method=renderer.js on the getCode function saying 'Cannot read property '[name of module]' of undefined'. After a little research I see that on cc-form.js I see the following

getCcAvailableTypes: function () {
            return window.checkoutConfig.payment.ccform.availableTypes[this.getCode()];
        },

The window.checkoutConfig.payment.ccform returns only the icon object.

This is my code on method_renderer.js

define(
[
    'Magento_Payment/js/view/payment/cc-form',
    'jquery',
    'Magento_Payment/js/model/credit-card-validation/validator'
],
function (Component) {
    'use strict';
    return Component.extend({
        defaults: {
            template: 'Vendor_Module/payment/module'
        },
        getCode: function() {
            return 'vendor_module';
        },
        isActive: function() {
            return true;
        },
        validate: function() {
            var $form = $('#' + this.getCode() + '-form');
            return $form.validation() && $form.validation('isValid');
        }
    });
}

);

Thanks in advance.


texts: How to add array of input fields in magento 2 admin form

texts: In Magento2 custom module, I need to add an two input fields say text1 & text2 which will be dynamic and will have "Add More option". so clicking on Add More will add two new fields in the form, How I can do it? Please help


texts:
I have added one script in the form page which is,

<script type="text/javascript">
$(document).ready(function(){
$('.removeOnFocus').each(function()
{
    this.data = new Object(); //TODO don't overwrite previous data
    this.data.value = this.value;

    $(this).focus(function(){
        if (this.value == this.data.value)
            this.value = '';
    });
    $(this).blur(function(){
        if (this.value == '')
            this.value = this.data.value;
    });
});
});
</script>

To make this script working, I have added <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> in the same page. Its working fine but other contents in the page getting overlapping. How to avoid this and have to make this script?


texts: How does the layout array work in Magento 2.1?

texts:
As I understand it, the \Magento\Framework\View\Result\PageFactory class is responsible for keeping an array of layout handles. According to this tutorial there are 3 types of handles. You can add handles programatically by calling $page->addPageLayoutHandles() or $page->addHandle() (which is looks like addPageLayoutHandles just adds them through addHandle anyway).

Here is what I have

app/code/module/Social/Controller/Index/Index.php

<?php

namespace module\Social\Controller\Index;

use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{

    protected $_resultPageFactory;

    /**
     * Constructor
     * @param Context                                    $context           [description]
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory [description]
     */
    public function __construct(Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
    {
        $this->_resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    /**
     *
     * @return \Magento\Framework\View\Result\Page
     */
    public function execute()
    {
        $page = $this->_resultPageFactory->create();

        $page->addPageLayoutHandles(['one' => 'one', 'two' => 'two']);

        return $page;
    }
}

app/code/module/Social/view/frontend/layout/social_index_index.xml

<?xml version="1.0"?>

<page layout="4columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="mycontainer">
            <block class="module\Social\Block\Social" name="social" template="socialmedia.phtml" />
        </referenceContainer>
    </body>
</page>

app/code/module/Social/view/frontend/layout/social_index_index_one_one.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="mycontainer">
            <block class="module\Social\Block\Social" name="social" template="socialmediaone.phtml" />
        </referenceContainer>
    </body>
</page>

app/code/module/Social/view/frontend/layout/social_index_index_two_two.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="mycontainer">
            <block class="module\Social\Block\Social" name="social" template="socialmediatwo.phtml" />
        </referenceContainer>
    </body>
</page>

Now, if I hit the page at http://mylocal/social/index/index, Magento calls my controller because I have it in the path for the action. When it hits that controller I am adding social_index_index_one_one and social_index_index_two_two to the array. Here are all of my questions.

How does this array of handles work?
Why is it that the last handle in the array is the template that gets output?
What is the point in adding other template handles then?
If I was to add sku or id handles what is the point of that?

The documentation on handles is pretty bad, and I can not find any explanation on the point of these handles in any detail.


texts: How to prioritize a single item in collection sort order

texts:
I am working with custom collection that is already sorted. I have to move one item on first place, if it is exist in collection.

$id=10;
$collection = Mage::getModel('test/test')->getCollection();
$collection->addFieldToFilter('status', array('eq' => '1'));
$collection->getSelect()->order(new Zend_Db_Expr('FIELD(id, ' . implode(',', $ids).')'));

How can I modify the sort order so that an item with id 10 will always be at the beginning?


texts: How to create and insert data into the table in Magento 2

texts:
enter code here i am creating a custom extension to save the data in database but all the time getting . only one error

{"0":"Class data_example does not exist","1":"#0 D:\xampp\htdocs\store\vendor\magento\framework\Code\Reader\ClassReader.php(19): ReflectionClass->__construct('data_example')\n#1

data_exampe is my table name and i set it in Model\ResourceModel

her is my extension file code

app/code/Well/Done/Model/DataExample.php

class DataExample extends \Magento\Framework\Model\AbstractModel{
    public function _construct(){
        $this->_init("Well\Done\Model\ResourceModel\DataExample");
    }
}
?>
app/code/Well/Done/Model/ResourceModel/DataExample.php

class DataExample extends \Magento\Framework\Model\AbstractModel{
    public function _construct(){
        $this->_init("data_example","id");
    }
}
?>


texts:
I've successfully changed it once by this.

Cascading style sheets (CSS)

then I want to change it to other colors,
but my new code are not working, the color is still the old one.

I change like this(_theme.less):
from@button-primary__background: @color-orange-red1;
to  @button-primary__background: @color-dark-pink1;

I've Flush Magento Cache or Flush JavaScript/CSS Cache,
how can I make it change again untill the color I want?


texts: How to get tracking info in observer Magento 2?

texts:
I am trying to get tracking number and courier name while submitting a shipment in backend but I am not getting these data in observer. below is the code.

events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
 <event name="sales_order_shipment_save_after">
    <observer name="trackShiping" instance="Aftership\Track\Observer\Tracking"/>
 </event>
 </config>

Tracking.php

<?php
 namespace Aftership\Track\Observer;
 use Magento\Framework\Event\ObserverInterface;

 class Tracking implements ObserverInterface {

  protected $logger;

  public function __construct( \Psr\Log\LoggerInterface $logger) {
    $this->logger = $logger;
  }
/**
 * @param \Magento\Framework\Event\Observer $observer
 */
  public function execute(\Magento\Framework\Event\Observer $observer)
  {
    $magento_order = $observer->getShipment()->getOrder();
    $data = $magento_order->getData();
    $this->logger->info('Data', $data);
  }
 }

In system.log I am not getting data related to tracking. What I am doing wrong. Please help me to get tracking data.


texts: Magento 2 - Remove and change footer links

texts: I want to remove the default links of the luma layout and add new links. How can I do that?


texts: Address validation in customer's account

texts:
I need to implement an address validation in the address book in customer's account. The validation should be like the one that happens during the checkout, that checks if the given address exists or not. In the checkout it happens by calling the saveBilling() method in this url: http://site_domain.com/index.php/checkout/onepage/saveBilling/

Is there any way of making the same kind of validation in customer's account? I have been trying for 2 weeks to achieve this, but with no good results.

Help will be appreciated! Thanks in advance.

Edit: I mean same validation that goes on during checkout. For example: "An exact street name could not be found!". When debugging using firebug, we see that URL ttp://site_domain.com/index.php/checkout/onepage/saveBilling/ returns the above error message. This url is passed as the third parameter in this line of code: var billing = new Billing('co-billing-form', 'getUrl('checkout/onepage/getAddress') ?>address/', 'getUrl('checkout/onepage/saveBilling') ?>'); I try to do the same thing in the customer address book, but the validation won't happen.
I get the 403 error, saying i have no permission to access this url. Maybe someone could tell me in general how do you validate the billing address on the address book on a customer's account? I'm stuck with this and i have no clue, at all


texts: How to modify add to wishlist success message in magento?

texts: I have wishlist text coming twice when adding a product to wish list from cart (url : my_project/checkout/cart/) , but its not there when adding from single product view . how to remove that ?


texts:
I am having an problem securing my site.I went to System - configuration - web and i changed edited the secure configuration

It seemed as though it worked. the only problem is, everywhere on my site i have a secure connection in the backend and frontend execpt for the home page.It says your connection is not fully secure. https://truckpartsactions.com/


texts: Is it good practice to edit custom extension's code after compilation

texts:
I get lots of adjustment requests (feature add, issue fix, etc) every day from one of my client.

Their site is in production mode and they want the changes to take effect immediately. I believe proper way of make changes is by scheduling it.

I want to know, if adjusting the code after compiling is bad practice?

Do I always need to re-compile after any change (small or big) to the extensions?

If it is bad practice then, would it matter if the extension is for admin area only?

Please suggest.

UPDATE
On the change request, I make sure that no di.xml changes, no dependencies are added, no construct changes, no plugin added.


texts:
How can I change my product URL to name_sku?
Example:

baseurl.com/shirt_35458.html

also I have product url preficx that I created a module for it.


texts:
I'am administrating a site in Magento 1.9.0.1 with mailchimp integration. We had a newsletter subscription problem (users didn't get subscribed in magento) and I noticed that the webhook configured in mailchimp gives 404.

How do I proper configure a magento webhook for mailchimp ?

I really appreciate any help you can provide, thanks.


texts: Magento 2.2: Git deploy error following composer installation

texts:
When cloning CE and deploying on Gandi servers, following their own instructions, the process is aborted with the error mentioned in the title.

Preconditions

Magento 2.2.1 CE
PHP7.1
MySQL 5.6
Gandi.net servers - simple hosting instance
Local machine is ubuntu 16.04 x64

Steps to reproduce

Following directions from gandi.net here and here.
Enter following commands:

$ cd ~
$ mkdir [VHOST_NAME]
$ cd [VHOST_NAME]
$ git remote add gandi git+ssh://[USER_ID]@git.[SERVER].gpaas.net/[VHOST_NAME].git
$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition htdocs
$ git add .
$ git commit -m 'Install Magento 2'
$ git push gandi master
$ ssh [USER_ID]@git.[SERVER].gpaas.net deploy [VHOST_NAME].git

Expected result

'Build complete' message should be seen in terminal.

Actual result

Completed up to step 10 of 'Steps to reproduce' successfully.
Step 11 fails with error message:

  composer.json and composer.lock files should be placed outside the htdocs directory.


texts: Shipping logic from multiple warehouse in magento1.9.1

texts:
I have different warehouses like warehouseA, warehouseB, warehouseC. I purchased one item like product1 as qty 20. This item is available in three warehouses with 10,5,10. This order is check the item is available in warehouseA it decrease the 10 items and remaning in warehouseB, reamining in warehouseC like a below matrix structure.

WarehouseName     location      productqty
warehouseA        Bangalore      10
warehouseB        Hyderabad       5
warehouseC        Delhi          10

customer purchase the item with Qty 20 to shipping address kolkata. I want the shipping calculation from bangalore->kolkata for 10 items,hyderabad ->kolkata for 5 items and Delhi->kolkata for 5 items?

Thanks


texts:
After I log into Magento (using mozilla firefox), go to Dashboard/Catalog/Manage Products.
I will edit a product and click save and I get this error.

Can anyone help? I cannot do anything to my site, not even add new products.


texts: why endpoints estimate-shipping-method just return one shipping method, even though from model should return two shipping method

texts:
on api /rest//V1/carts/mine/estimate-shipping-method just return one shipping method, even though from model should return two shipping method

so this is pic that above response from model carrier and below response from /rest//V1/carts/mine/estimate-shipping-method

so how to fix this bug?


texts: How to add text block in magento 2 custom module

texts:
I have a admin config page.

Where i have successfully listed my module.

I want to add a text block with procedures to follow. What is the tag that i should use in system.xml in order to use a text block.

I dont want to display it using comment tag since the content is long and it looks cluttered. Also, Is there a option to Link a text in the custom module to an external website like


texts: Get all Images except "base image" and "small image"

texts:
I would like to output all Images except 'base image' and 'small image' for an image Slider. Right now this code below outputs all Images:

    <?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
?>
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>

            <?php foreach ($this->getGalleryImages() as $_image): ?>

                  <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile()); ?>" class="sliderImage" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />

            <?php endforeach; ?>

<?php endif; ?>

What is the best way to display all Images not tagged with anything?


texts: How can i run system->import/export->export by Command ssh

texts: I get no valid data send error during product export via system->import/export->export. Actually this because of time out error. How can run this export by command ssh.


texts: After upgrading POS module, only incognito window catches the right appearance

texts:
I have upgraded Point of Sales module. If I enter admin panel in incognito window, the new table and buttons of POS are aligned well, otherwise they are misplaced and product images are not displaying in its list.
I emptied the cache but did not help.


texts: I have created a cronjob which will create or update a number of products(around 2000 products, runs cron two times in a day). When the cron runs and update the products data, huge amount of "cache-invalidated" logs are written to debug.log file which largely increases the size of the debug.log. My system is in production mode. How can we block the system generated "cache-invalidated" logs.


texts:
after installing a few cron tasks for auto sitemap creation/submission, I came across a cron task which seems to be running many times a day.

This might be an amature question but I haven't been able to find any information about it online.

Task: cronjob_vacationmode

Could anyone tell me exactly what this is and how (if needed) to remove it?


texts: Magento Default Captcha shows "Incorrect CAPTCHA" even if correct code is entered

texts:
In my magento site I have enabled Captcha for Create Account form of custom theme which I built from scratch(not "rwd"), but when I try to register a customer with providing correct captcha code in the field, even then it shows "Incorrect Captcha" after refreshing & redirecting to same page.

No warnings/errors either in the client or server.

Can anyone guide me ?


texts: Someone have API soap working in VB.net?

texts:
I have tried for a while to get the Magento API via soap to work in VS2015 4.6 VB.net both web and win with no success.

I have the wsdl recognized but can't get a session id returned with login.

When using ....

    Dim mag1 As New mag.PortTypeClient
    Dim sessid = mag1.login("xxxxx", "xxxxxxxxx")

I receive the error  "Invalid XML"

Didn't know if I could correspond with someone who has been successful with this.

thanks
mark


texts: third party module controller overriding not working in magento 1

texts:
my config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mindtwo_Formbuildercrfprotection>
            <version>0.0.1</version>
            <depends>
                <Phxsolution_Formbuilder/>
            </depends>
        </Mindtwo_Formbuildercrfprotection>
    </modules>
    <frontend>
        <routers>
            <formbuilder>
                <args>
                    <modules>
                        <mindtwo_formbuildercrfprotection before="Phxsolution_Formbuilder">Mindtwo_Formbuildercrfprotection</mindtwo_formbuildercrfprotection>
                    </modules>
                </args>
            </formbuilder>
        </routers>
    </frontend>
</config>

and in indexController.php

<?php
require_once("Phxsolution/Formbuilder/controllers/IndexController.php");
class Mindtwo_Formbuildercrfprotection_IndexController extends Phxsolution_Formbuilder_IndexController
{

    public function indexAction()
    {die("dsfdf");
        $this->loadLayout();
        $this->getLayout()->getBlock("head")->setTitle($this->__("Formbuilder"));

        $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
        $breadcrumbs->addCrumb("home", array(
            "label" => $this->__("Home"),
            "title" => $this->__("Home"),
            "link"  => Mage::getBaseUrl()
        ));
        $breadcrumbs->addCrumb("formbuilder", array(
            "label" => $this->__("Formbuilder"),
            "title" => $this->__("Formbuilder")
        ));
        $this->renderLayout();
    }

}

but it is not working


texts: How to give non-fixed discount for different fixed prices?

texts:
we are using Magento version 1.9.2.3 and we want to make one promotion on our site. We have some products in one specific category and our promotion will be: "Buy product from category 70 and get other products free for the same price."

The problem is that the products from category 70 have different prices and we can't fix the discount. The discount has to be exactly as the product's price.

I made Conditions - "If ALL  of these conditions are TRUE: If an item is FOUND  in the cart with ALL  of these conditions true: Category  is  70", but can't handle with the Actions

Apply Percent of Product price discount; Discount Amount: 100;
Apply the rule only to cart items matching the following conditions:

If ALL  of these conditions are TRUE: Category is not  70.

Now the rule is working, but there is no limit of discounting and clients can add products for free by undefined amount.

Can you help me with this kind of promotion? We want when someone buys a product from category 70, he can get other products for the price of this product. Can this be done with Magento's Shopping cart price rules?

Thank you in advance.


texts: How do I report Magento bugs and submit bugfixes so that they are likely to be closed?

texts:
I found a bug in Magento 1.x and I also found a bugfix for it. Where do I report it? Where do I have a chance that a Magento core developer has a look at it? The Magento bug tracker seems to be ignored and unmaintained (see e.g. this issue).

You can actually sign the Magento Contributor Agreement in order to submit patches, but I heard that even these patches are often refused. So is there any other way to get a patch into the Magento core?

With Magento 2 on GitHub, everything seems to become better. But I think there should also be a place for Magento 1 bugfixes...


texts: Possible raw SQL statement detected. delete from $tableName WHERE sku = $productSku

texts:
the code is working well and doing it's job but pipeline on bitbuckets drops an error

 Possible raw SQL statement "delete from $tableName WHERE sku = $productSku " detected.

my function where this query is located is

 private function removeLG()
    {
        $productcollection = $this->collectionFactory->create()->addAttributeToSelect('manufacturer', 'LG')->load();
        $tableName = $this->getTableName('catalog_product_entity');
        foreach ($productcollection as $product) {
               $productSku = $product->getSku();
                $sqls = "delete from $tableName WHERE sku = $productSku ";
                $this->resourceConnection->getConnection()->query($sqls);
        }
    }


texts:
I want use the code, but i get a error:
"Fatal error: Call to a member function delete() on boolean in …"

The code:

public function _del()
{
    umask(0);
    Mage::app();
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    $f = file("var/import/sku.csv");

    foreach ($f as $line_num => $productSku) {
        $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $productSku);
        $product->delete();
    }
}

With the sku.csv:

220112¬
220111¬
220114¬


texts:
I want to create custom cache for top menu

For this I have created cache.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Cache/etc/cache.xsd">
    <type instance="Vendor\Module\Model\Cache\Vmenu" name="vmenu_cache_tag" translate="label,description">
        <label>vmenu</label>
        <description>My Menu</description>
    </type>
</config>

Also created Model/Cache/Vmenu.php

<?php
namespace Vendor\Module\Model\Cache;
class Vmenu extends \Magento\Framework\Cache\Frontend\Decorator\TagScope
{
    const TYPE_IDENTIFIER = 'vmenu_cache_tag';
    const CACHE_TAG = 'VMENU_CACHE_TAG';

    /**
     * @param \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool
     */
    public function __construct(
        \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool
    ) {
        parent::__construct($cacheFrontendPool->get(self::TYPE_IDENTIFIER), self::CACHE_TAG);
    }
}

Now my vmenu.phtml is calling from header.phtml

<?php echo $this->getLayout()->createBlock("Magento\Framework\View\Element\Template")->setTemplate("Magento_Theme::html/vmenu.phtml")->toHtml(); ?>

My question is, how can I connect vmenu.phtml to my newly created cache?


texts: Add product to cart from main store product view page to second store cart

texts:
I have setup subdomain multi store. The main store is on domain.com and another store view is at store.domain.com.

The main store holds all products. so I want customer to be able to add some of the products to cart from main store to store.domain.com cart.

I did tried url method like store.domain.com/checkout/cart/add?product=[id]&qty=[qty] as mentioned in Magento Wiki Page,  but it is not working.

I believe the reason behind is, Magento recently implemented the feature form key.

Is there any other way to accomplish my requirement?


texts:
I saw two topics about that but I'm still not sure.

I'm discovering Magento 2, I'm a frontend developer and right now, I just want to make my company website's header and footer (html, css) (so a theme)

Which folder should I use ? app/code or app/design.

If I'm creating a new module, I have to create all phtml files, layout, etc... in app/code/../view/frontend/templates/xx.phtml but if I'm overriding an existing module, eg : module-theme or module-catalog, I'm doing it in app/design/frontend/../../templates/xx.phtml?


texts: Overriding an account feature for editing email/username

texts:
I found the element that i want to remove here:
vendor/magento/module-customer-custom-attributes/view/frontend/templates/customer/form/edit.phtml

I've created a new edit.phtml file here:

app/design/frontend/Myne/default/Magento_CustomerCustomAttributes/view/frontend/templates/customer/form/edit.phtml

My changes are not showing up when i override but they work when i directly edit the vendor file?

What am i missing?

I'm just attempting to hide the checkbox for change email so they're not able to change email.

After my changes i run upgrade, di:compile and deploy static content as well as clean and flush cache.


texts: Checkout redirects to checkout again after purchase - no order created

texts:
Magento 2.2.3

Whenever I buy something in my store, I am being redirected to the checkout again, just as if I did not press the "buy now" button. The cart is still filled, no order is created. I checked the logs and found nothing suspicous.

Its the Magento 2 standard checkout. Any idweas where to start looking?

  Thanks!


texts: SUPEE_7405 not getting installed on magento 1.9.1.0

texts:
I have successfully installed following patches

5344

5944

6237

6788

for Magento 1.9.1.0. Now for SUPEE_7405 I am getting this error

checking file app/code/core/Mage/Core/Model/Email/Template/Filter.php

Hunk #1 FAILED at 171.

Hunk #2 succeeded at 182 (offset -10 lines).

1 out of 2 hunks FAILED


texts: How does the Sort Order of Products in Subcategories work?

texts:
When adding a product to a category, a sorting order value can be specified.

Imaging now we have a Category "P" set to "Anchor" and various categories "C1" and "C2" which are childs of "P".

How is the order of those products defined, which are only in the sub categories, but displayed when opening the parent category?


texts: Magento2 / Add check for disable submit button on custom payment method

texts:
I have developed a payment method for Magento 2. I would like the "send order" button ("invia ordine") to be disabled in checkout (or send an error message) if the customer does not select an item in the options menu of my method ("seleziona").

/app/code/Infocurci/Pagamentodilazionato/view/frontend/web/template/payment/pagamentodilazionato.html

    <input type="radio"
           name="payment[method]"
           class="radio"
           data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>

    <select name="payment[condizionipagamento]" class="select input-text required-entry"
                            data-bind="
                                attr: {id: getCode()+'_condizionipagamento'},
                                options: getCardList(),
                                optionsValue: 'value',
                                optionsText: 'type',
                                optionsCaption: $t('--Please Select--'),
                                ">
                </select>

            <button class="action primary checkout"
                    type="submit"
                    data-bind="
                    click: placeOrder,
                    attr: {title: $t('Place Order')},
                    css: {disabled: !isPlaceOrderActionAllowed()},
                    enable: (getCode() == isChecked())
                    "
                    disabled>

            </button>


texts:
I make a new module which is a simply form, but i can not write into the ddbb, because (i think) can not find the model. I have this code in controllers/IndexController.php:

public function createPersonAction() {
    $data = $this->getRequest()->getPost();
    $session = Mage::getSingleton('core/session');
    $landing = Mage::getModel('landing/landing');
    $landing->setData('name', $data['name']);
    $landing->setData('apellido1', $data['apellido1']);
    $landing->setData('apellido2', $data['apellido2']);
    $landing->setData('email', $data['email']);
    $landing->setData('telefono', $data['telefono']);
    //$person->setData($data);
  try{
    $landing->save();
    $session->addSuccess('Add a person sucessfully');
  }catch(Exception $e){
    $session->addError('Add Error');
  }
$this->_redirect('landing');
}

But i have this error:

Fatal error: Call to a member function setData() on boolean in \app\code\local\LP\Landing\controllers\IndexController.php on line 28

(Line 28 is --> $landing->setData('name', $data['name']);)

I have all the needed files, this is my tree:

\app\code\local\LP\Landing\Block\Index.php
\app\code\local\LP\Landing\Block\Adminhtml\Landingbackend.php
\app\code\local\LP\Landing\controllers\IndexController.php
\app\code\local\LP\Landing\controllers\Adminhtml\LandingbackendController.php
\app\code\local\LP\Landing\etc\config.xml
\app\code\local\LP\Landing\Helper\Data.php
\app\code\local\LP\Landing\Model\Landing.php
\app\code\local\LP\Landing\Model\Resource\Landing.php
\app\code\local\LP\Landing\Model\Resource\Landing\Collection.php
\app\code\local\LP\Landing\sql\landing_setup\mysql4-install-0.1.0.php

Help please.


texts:
What is the popular way to call external API in magento2? I see some use curl while others use ZendClient. Do you guys have the helper class that wraps ZendClient that I can take a look for an example of how to use that? I am new to magento 2 and cannot find a good documentation of ZendClient
I want to write a class that wraps ZendClient so the base_url can be shared and error will be handled properly.


texts: Add custom Form to Review and Payments page

texts: There are many examples online about adding a custom form with custom fields to the shipping-step, but I would like to know how to add a custom form with fields to the billing-step page.


texts: Magento 2.3.4 shows 404 on some resources and admin with strange url

texts:
I have installed Magento 2.3.4 on Ubuntu 18.04 without any issue.
I tried with FTP and with composer but the issue is the same.
I tried with data package and without but the issue persists.
I checked the logs (magento and system but no luck)

I tried several recent answers here with no luck either.
My issue is:
the store is accessible but I get 404 on css and images

The admin is accessible doing /index.php/ instead of / (that's the smallest issue so far) but no css and images.

If from the admin I go to the setup to install new packages I see properly css and images.

Functionalities seem to work properly.

How can I solve?

Edit: If I inspect one resource that is not loaded I see that the url it is trying to solve is:

https://store.aaa.com/pub/static/version1588064406/adminhtml/Magento/backend/en_US/Dotdigitalgroup_Email/js/fancyBoxInit.js

but looking in the folder I see that the correct path is

pub/static/adminhtml/Magento/backend/en_US/Dotdigitalgroup_Email/js/fancyBoxInit.js

in static there is a version.txt folder with an entry for 1588064406 but not such folder


texts: How to create custom phtml to PDF and attach in email at admin in Magento 2?

texts:
I am already created Custom email from admin panel with attachment of sample pdf file,
But now i want to create .phtml file to .pdf file & which is attach in my custom email.


texts: Does magento backup everything in its installation directory?

texts:
Magento 2 is installed in public_html folder, all its files directly there.

I want to install wordpress such as example.com/blog therefore I placed the blog folder alongside the other folders.

What happens when magento 2 backup all the files, will it include the blog folder too?