texts: how to create a form popup-modal in magento2.3

texts:
here I want to create a modal pop up when the button was a click, by using block file how can I pass the modal link through this below code...

 public function getMainButtonsHtml()
{
    $html = parent::getMainButtonsHtml();//get the parent class buttons
    $addButton = $this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')
        ->setData(array(
        'label'     => 'Add Amount',
        'onclick'   => "setLocation('redirect-url')",
        'class'   => 'amount'
    ))->toHtml();
    return $addButton.$html;
}

Note: 'onclick'   => "setLocation('redirect-url')",  ----> here i want to pass the link ,Wheather it is possible???If yes please help.


texts: How can I queue a custom email when an order is placed?

texts:
I am sent an email when an order is placed, but there is speed issue.
Can you advise me how to add a custom email to the queue when an order is placed?

try {
        $mail = Mage::getModel('core/email');
        $mail->setToName($email);
        $mail->setToEmail($email);
        $mail->setBody($html);
        $mail->setSubject("Automated Bundle Purchase: Coupon Code");
        $mail->setFromEmail(Mage::getStoreConfig('trans_email/ident_general/email'));
        $mail->setFromName(Mage::getStoreConfig('trans_email/ident_general/name'));
        $mail->setType('html');
        $mail->send();
    } catch (Exception $e) {
        Mage::log($e->getMessage());
    }


texts:
I know there are many answers for this i tried all and not able to do it on my server hosted with godaddy magento latest version

I tried this

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

404 not found error for admin page

didn't work out

then

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

rm -rf var/cache/*

rm -rf var/generation/*

this dint work out

added httaccess to my root directory

https://github.com/emizentech/magento2/blob/master/.htaccess.sample

though it was not there still dint work out
home page works fine as expected with no erros on it

but admin page says 404 error

domain.com/admin

Not Found
The requested URL /admin was not found on this server.

Apache/2.4.18 (Ubuntu) Server at 192.169.143.135 Port 80

If I added domain.com/index.php/admin

Not Found
The requested URL /admin/admin/index/index/key/be1e5947f83b71x354749eds3ba0aa7321a8a8d659aca49cc8a00fb4de1cc57ab956f/ was not found on this server.

Apache/2.4.18 (Ubuntu) Server at 192.169.143.135 Port 80

I enabled developer mode to

 main.DEBUG: cache_invalidate:  {"method":"GET","url":"http://192.169.143.135/index.php/admin/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} []


texts: Is there an existing admin / config model for building a list of key-value pairs?

texts:
I'm working on a new extension which has the need for some user defined key-value pairs.  In the system config area of the admin panel the user will need to enter several values such as:

"some/relative/path" -> "some external uri"
"some/relative/path" -> "some external uri"
"some/relative/path" -> "some external uri"

In the admin panel I'd like to present the user with two side-by-side text boxes, with validation that requires entries in both boxes to submit.

Is there an existing model that has that functionality?


texts: UI component select box on change event call ajax

texts:
How can I add an event when changes select box dropdown value and I will trigger Ajax when change value in the dropdown, Below are my code.
<fieldset name="sample_fieldset">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Attribute Information</item>
        </item>
    </argument>
    <field name="attr">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">vendor\module\Model\Source\option</item>
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Select Attribute</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="source" xsi:type="string">splitattr</item>
                <item name="dataScope" xsi:type="string">attr</item>
                <item name="default" xsi:type="string">0</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>

Below is the output which created


texts:
Magento 2 customer account doesn't allow special characters(å, ä, ø, ö, æ etc.) in the email address field.

Please do needful to allow special characters(å, ä, ø, ö, æ etc.) in the email address field for Magento 2 new customers or edit customers from the admin panel.


texts:
I have made changes to my paypal/express/reivew.phtml. The problem is they are not showing up. Cleared cache multiple times. Copied the file and put it under my theme as well.

I have closed the browser and gone back into the checkout process to see if the edits worked...still no dice.

Any ideas at where the correct file to edit is. Everything I read, I am in the right place, I just don't see my changes.

Thank you


texts: Shipment emails not being sent even though other emails are working Magento 2.3.4

texts:
I'm running into an issue where Magento 2.3.4 is not sending the shipment confirmation email after I enter the shipment for an order.
I have tried to send the shipping details (by checking the box to send customer notification) and it does not send.
If I go into the Admin page, go to Sales > Orders, pull up the shipment, and then click "Send Tracking Information", the email is also does not send.
When I press "Send Tracking Information" it asks me for confirmation "Do you really want to send the customer an e-mail of the order" and then the screen remains blank with a text "Sent by Shipment Number".
Debug.log & cron.log
main.INFO: Cron Job sales_send_order_shipment_emails is run [] []
main.INFO: Cron Job sales_send_order_shipment_emails is successfully finished

When I place an order, the order confirmation email is sent correctly.
When I invoice the order, the invoice email is sent correctly.
Why are the shipment emails not being sent when a shipment is entered?


texts:
how to Give options to

        <column name="status" class="Katalyst\Rfq\Ui\Component\Listing\Column\Status">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">select</item>
                    <settings>
                        <options class="Katalyst\Rfq\Model\Source\Status"/>
                        <filter>select</filter>
                        <dataType>select</dataType>
                        <label translate="true">Status</label>
                    </settings>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Status</item>
                <item name="sortOrder" xsi:type="number">22</item>
            </item>
        </argument>
    </column>

in magento 2 admin grid.

current output is shown in image

I want to show some options in it.
Thanks


texts:
Is it possible to allow users to purchase simple products and nominal products (subscriptions) together with Credit Card in Magento?

Presently PayPal does not allow to purchase products and nominal products (subscriptions) together for sure. But is there any possibility that we can allow this payment using Credit Card?

If yes, then will there be any issue with the recurring payments received from customers?


texts: Tracking down extremely slow performance by route

texts:
Using Magento 2.1.7 EE and New Relic.

I've been monitoring the performance of a site which which is almost to the point of being unusable. If I break down the transactions by most time consuming, I'm left with these three:

/cms/noroute/index
/customer/section/load
/search/ajax/suggest

Sometimes the /customer/section/load takes precedent but I'm currently focused on the first entry in that list. I did a string search for cms/noroute/index and it returned a single file: vendor/magento/module-cms/etc/config.xml

The contents of which are this:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <web>
            <default>
                <cms_home_page>home</cms_home_page>
                <cms_no_route>no-route</cms_no_route>
                <cms_no_cookies>enable-cookies</cms_no_cookies>
                <front>cms</front>
                <no_route>cms/noroute/index</no_route>
                <show_cms_breadcrumbs>1</show_cms_breadcrumbs>
            </default>
        </web>
        <cms>
            <wysiwyg>
                <enabled>enabled</enabled>
            </wysiwyg>
        </cms>
        <system>
            <media_storage_configuration>
                <allowed_resources>
                    <wysiwyg_image_folder>wysiwyg</wysiwyg_image_folder>
                </allowed_resources>
            </media_storage_configuration>
        </system>
    </default>
</config>

I'm not seeing much from this file that would indicate bad practice or performance hogging. Is there a better way to determine if I've got an event-driven issue with Magento or some other piece of functionality which would could be globally affecting performance even on CMS pages? We've already tried restarting all services and scaling the environment 4x with no success.


texts: To add product grid in custom module admin form

texts:
I have created custom module in magento. Its working good. But now my problem is, I want to add product grid to my product list tab.I have found the solution through this link.I have created new tab.But when i load that tab, its shows me an error like

Fatal error: Call to a member function setProdlist() on a non-object in /home/trendyc/public_html/app/code/community/Whole/Cate/controllers/Adminhtml/WhcatalogController.php on line 64

Mycontroller file's productsAction code here

$this->getLayout()->getBlock('products.grid')
            ->setProdlist($this->getRequest()->getPost('products_prodlist', null));

I think, i need to do some modification on layout file. But i can't get what modifications need to do there in layout .xml file.I hope you understand my problem. Please help me guys!


texts: How to inject one module to another in magento 2?

texts:
I have 2 module within the same namespace.

MyCompany/Module1/ and MyCompany/Module2/

Now, I want to call some function of MyCompany/Module1/ from MyCompany/Module2/

If I add module1 in the constructor of module2 it didn't work.

How to inject it?


texts:
I`ve my store on 1.9.3.4 and now my customers are not receiving order confirmation email, Contact us mail, new registration mail, forget password mail.

I tried sending through the admin panel but nothing happens, also no update email is being received. Any one can help me with this problem for magento 1.9.3.4?

My site is on Go Daddy server.
I have checked using script "mail.php" using this Mails are going.
Even I have checked var folder therew is no "log" folder.


texts: Code Sniffer Results: The use of function exec() is forbidden

texts:
I uploaded new version of extension on Magento Marketplace. And I've got Code Sniffer error during technical testing:

The use of function exec() is forbidden
severity : 10
Line : 441
Column : 17
Source : Magento2.Security.InsecureFunction.Found

How should I replace exec() ?

I use server command and cannot just delete exec().


texts:
I am working on a Magento 2.1.7 shop.

The products are organized into categories and subcategories.

Whenever a customer visits a category, filters (links to its subcategories) are displayed. I want to disable the filters.

The path to the file responsible with the filters is

  vendor/magento/module-catalog/view/frontend/templates/navigation/left.phtml

I want to overwrite it from app/design/frontend/myCompany/myTheme/.

How do I disable filters by coding?
Can the filters be disabled from Magento admin?


texts:
In my website after login product marge not working in some customer

Let us assume i added one product in to the cart after that i logged in but before added product not merging into my cart. Old product only is there. How i fix it?


texts: Colors aren't showing in the “Shop By Color”

texts:
Im using magento 1.9
i have added Configurable Product in magento with 3 diff. swatches,but when I go to category,I notice that colors aren't present.
im adding some screenshots here.


texts:
I have code for last order detail but I want last 5 orders.
For last order detail code is:

$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
        $orderDatamodel = $objectManager->get('Magento\Sales\Model\Order')->getCollection()->getLastItem();
        $orderId   =   $orderDatamodel->getId();
        $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId);
        $orderItems = $order->getAllItems();

        foreach ($orderItems as $item) {
           $product_name=   $item->getName();
           $product_id=   $item->getProductId();
        }

I want last 5 oders detail.


texts: What Happens to Redirects if Product Deleted in Magento

texts:
I have 10's of thousands of disabled products on my site (inherited from previous owner) that I will never use again.

There are redirects set up on most of them already, but I want to delete them as it is annoying to maintain the catalog with so much irrelevant product in the back end, not to mention the possible performance pickup from getting rid of them.

Does anyone know if my redirects will be affected if I delete a product? Will this cause more problems than it is worth?


texts: report_uri of Magento CSP is not working

texts:
I have given path of my component's controller/action in the request_uri but it is not working.
I have also defined my csp_whitelist.xml
config.xml*
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
    <csp>
        <mode>
            <storefront>
                <report_uri>http://domain/<route>/<contoller>/index</report_uri>
                <report_only>1</report_only>
                <restrict>0</restrict>
            </storefront>
            <admin>
                <report_uri>http://domain/<route>/<contoller>/index</report_uri>
                <report_only>1</report_only>
                <restrict>0</restrict>
            </admin>
        </mode>
    </csp>
</default>
</config>


texts: How to check particular custom option exists or not?

texts:
I need to put a check whether the product have the particular custom option or not?

I have product ID and the custom option title is Custom Size now I want to check that for the product with this I'd have any custom option with title size or not.

I hope anyone came across this.


texts: SSH “Could not open input file: bin/magento” in Magento2

texts:
I try to install: https://www.magesolution.com/front-end-cms-page-builder.html

in Magesolution document told run ssh command:

unzip -o Extension_Package_Name.zip

but the problem is when run unzip -o Extension_Package_Name.zip its told me this problem

http://prntscr.com/o5pttb

and then try to run :

php bin/magento module:enable MGS_Fbuilder

it shows me this error:

  Could not open input file: bin/magento

where is the problem?

First I run command php bin/magento setup:upgrade then php bin/magento setup:static-content:deploy also I run command related cache, indexing but same error I get all the time.

can anyone tell me why is it happening ? and how to solve this error message?

I checked in Magento root folder that there is a bin folder and within bin folder, there is a Magento file.


texts:
My client changed admin settings from their admin panel and they don't know what exactly they changed and updated in the configuration area.

I am calculating donation for each product based on some custom product attributes for example product type, product donation [in percentage].

But now the donation is showing Zero, I checked it but I am not getting what they changed and updated.

Is there any way to know what they changed/updated?
Is there any server log file to maintain all admin actions?


texts: Magento admin logs out when upload an image via CMS WYSIWYG editor?

texts:
After installing Magento patch SUPEE-8788 there's an issue in CMS page  WYSIWYG editor. When I try to upload an image via  WYSIWYG editor, it automatically logs out from the admin panel. My Magento version is EE 1.11.2.0

Have anyone else encountered this issue? Any suggestions to solve this would be appreciated.


texts:
I display the expected delivery date on our products, using the following line:

<?php if (in_array($_product->getData('delivery_eta'), array('2010-01-01 00:00:00','12-31-2099'))):?>

I want to expand this, by adding another if element that checks the currect date and if it "delivery_eta" is lower than today.

How can I achieve that?


texts: Magento(1.6.2.0) add custom customer registration field to email template

texts:
i used the new customer registration field guide from here: (Thanks @Marius) https://magento.stackexchange.com/a/65760/47305

Works fine but is it possible to add the new created custom field in customer_registration_admin.html email template too ?

The install script used for the new field:

<?php
$this->addAttribute('customer', 'callback', array(
'type'      => 'varchar',
'label'     => 'Rückruf',
'input'     => 'text',
'position'  => 120,
'required'  => false,//or true
'is_system' => 0,
));
$attribute = Mage::getSingleton('eav/config')->getAttribute('customer','callback');
$attribute->setData('used_in_forms', array(
'adminhtml_customer',
'checkout_register',
'customer_account_create',
'customer_account_edit',
));
$attribute->setData('is_user_defined', 0);
$attribute->save();

Thanks !


texts:
This is part of the aw blog module.
I have 2 tables.

aw_blog
post_id | tags
1 tag1
2 tag2
3 tag3

aw_blog_post_cat
cat_id | post_id
1 1
1 3
2 3

I have that SQL statement and i am trying to do it with magento way:

SELECT `aw_blog`.`tags` FROM `aw_blog_post_cat` RIGHT JOIN  `aw_blog` on `aw_blog`.`post_id`=`aw_blog_post_cat`.`post_id` WHERE `aw_blog_post_cat`.`cat_id`=1

I tried something like that:

$collection = Mage::getModel('blog/blog')->getCollection()
->getSelect()->joinRight(array("post_cat" => $this->getTable('aw_blog_post_cat')), 'main_table.post_id = post_cat.post_id', array());

from that link
But with no luck.
There is no model implemented for aw_blog_post_cat table


texts: Product Alerts - Show Customers and Products

texts:
We are just trying to run a little script that returns the customers that are signed up for price alerts and what products they are watching

I tried this code

require_once('app/Mage.php');

$customer_id = 76046;
//$customer_id = Mage::getSingleton('customer/session')->getCustomer()->getId();
$customer_price_alerts = Mage::getModel('productalert/price')
     ->getCollection()
     ->addFieldToFilter('customer_id', $customer_id);
foreach ( $customer_price_alerts as $alert )
{
 echo $alert->getProductId();
}

however get error

Call to a member function getModelInstance() on a non-object in /var/www/html/app/Mage.php on line 432

anyone?

cheers
FireHorse


texts: Override bloks and models in Magento 1.9.4.0 is not working

texts:
I'm trying to override the function _prepareCollection in Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid class

    <?php
class Ayasoftware_RequiredOptions_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config_Grid extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid
{
     protected function _prepareCollection()
    {
         echo "testing if overridden ";
        $allowProductTypes = array();
        foreach (Mage::helper('catalog/product_configuration')->getConfigurableAllowedTypes() as $type) {
            $allowProductTypes[] = $type->getName();
        }

        $product = $this->_getProduct();
        $collection = $product->getCollection()
            ->addAttributeToSelect('name')
            ->addAttributeToSelect('sku')
            ->addAttributeToSelect('attribute_set_id')
            ->addAttributeToSelect('type_id')
            ->addAttributeToSelect('price')
            ->addFieldToFilter('attribute_set_id',$product->getAttributeSetId())
            ->addFieldToFilter('type_id', $allowProductTypes)
           // ->addFilterByRequiredOptions()
            ->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner');

        if (Mage::helper('catalog')->isModuleEnabled('Mage_CatalogInventory')) {
            Mage::getModel('cataloginventory/stock_item')->addCatalogInventoryToProductCollection($collection);
        }

        foreach ($product->getTypeInstance(true)->getUsedProductAttributes($product) as $attribute) {
            $collection->addAttributeToSelect($attribute->getAttributeCode());
            $collection->addAttributeToFilter($attribute->getAttributeCode(), array('notnull'=>1));
        }

        $this->setCollection($collection);

        if ($this->isReadonly()) {
            $collection->addFieldToFilter('entity_id', array('in' => $this->_getSelectedProducts()));
        }

        parent::_prepareCollection();
        return $this;
    }
}

in my config.xml I have this

    <?xml version="1.0"?>
<config>
    <modules>
        <Ayasoftware_RequiredOptions>
            <version>0.1.0</version>
        </Ayasoftware_RequiredOptions>
    </modules>
    <global>
        <helpers>
            <requiredoptions>
                <class>Ayasoftware_RequiredOptions_Helper</class>
            </requiredoptions>
        </helpers>
        <blocks>
            <requiredoptions>
                <class>Ayasoftware_RequiredOptions_Block</class>
            </requiredoptions>
            <adminhtml>
                <rewrite>
                    <catalog_product_edit_tab_super_config_grid>Ayasoftware_RequiredOptions_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config_Grid</catalog_product_edit_tab_super_config_grid>
                </rewrite>
            </adminhtml>
        </blocks>
        <models>
            <requiredoptions>
                <class>Ayasoftware_RequiredOptions_Model</class>
                <resourceModel>requiredoptions_mysql4</resourceModel>
            </requiredoptions>

        </models>
    </global>
</config>

the function _prepareCollection is overridden correctly, but still using the original function that does not filter by ->addFilterByRequiredOptions()

any idea how to fix this?
was working fine in older versions.


texts: Magento - Access session outside magento

texts:
I'm using Mangeto 1.9.1

I'm trying to access the magento customer session outside magento in a php file in the root folder of the magento.

Here is my code:

<?php
error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
$app = Mage::app('default');
Mage::app();

$customer_id = Mage::getSingleton('customer/session')->getId();

$GrandTotal = Mage::getModel('sales/quote')->loadByCustomer($customer_id)->getGrandTotal();
$HalfTotal = $GrandTotal / 2;
echo "Grand: $GrandTotal<br>Half: $HalfTotal";
?>

My magento is installed on a subdomain like beta.mymagento.com

But it seems it can not access the session.
How i can fix it?

Thanks in advance!


texts: How to add column in admin sales order grid magento 2

texts:
I want to add SKU column, customer first name and last name in admin sales order grid.
Please guide me how can I achieve this?


texts: Add category description to "catalog/category_tree" collection

texts:
class Ab_CategoryObserver_Model_Observer
{
    public function updateTopMenuJson(Varien_Event_Observer $observer)
    {
        $_helper = Mage::helper('catalog/category');
        $_categories = $_helper->getStoreCategories();
        $recursionLevel = 3; // Add recursion level
        $storeId = 1; // Add your Store ID for which you want to get category tree
        $node = '';
        $categoryTreeData = $this->getCategoryTree($recursionLevel, $storeId);
        $arr = json_encode($this->getCategoryTree(3));
        echo "<pre>";print_r($arr);
        echo("<script>console.log('PHP: ".$arr."');</script>");
        file_put_contents("cat_node.json", $arr);
    }

    protected function getCategoryTree($recursionLevel, $storeId = 1)
    {
        $parent = Mage::app()->getStore($storeId)->getRootCategoryId();
        $tree = Mage::getResourceModel('catalog/category_tree');
        /* @var $tree Mage_Catalog_Model_Resource_Category_Tree */

        $nodes = $tree->loadNode($parent)
            ->loadChildren($recursionLevel)
            ->getChildren();
        $tree->addCollectionData(null, false, $parent);

        $categoryTreeData = array();
        foreach ($nodes as $node) {
            if ($node->getIsActive()) {
                $categoryTreeData[$node->getData('entity_id')] = $this->getNodeChildrenData($node);
            }
        }

        return $categoryTreeData;
    }

    protected function getNodeChildrenData(Varien_Data_Tree_Node $node)
    {
        $categoryData = array(
            'title'       => $node->getData('name'),
            'url'         => $node->getData('url_key'),
            'id'          => $node->getId(),
            'description' => $node->getData('description'),
            'mega_menu'   => 'false'
        );

        foreach ($node->getChildren() as $childNode) {
            if (!array_key_exists('children', $categoryData)) {
                $categoryData['mega_menu'] = 'true';
                $categoryData['children']  = array();
            }
                $categoryData['children'][$childNode->getData('entity_id')] = $this->getNodeChildrenData($childNode);
        }
        return $categoryData;
    }
}


texts:
I have experience creating Magento websites, and have a client with a complex product catalog that I'm not sure how to map to Magento product types.

The client sells furniture.

A product for sale may be composed of multiple 'parts'.  For example, a bed would be composed of a headboard, footboard, and slats.  Each one of those three would have its own inventory tracking and shipping needs, but they are not sold separately.

There are also products that are sets.  Continuing our example, the bed may be sold in a bedroom set, including night tables and a dresser.

I'm thinking simple, not visible products for the 'parts', but I don't see the right product type to use for the bed-level.  With both grouped or bundled products, the bed couldn't be included within the higher level bedroom set.

What catalog architecture should I use here?


texts:
How can I display category description in footer for all categories & it should not display in homepage

I tried below code.

<?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
<div class="category-description std">
    <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
</div>
<?php endif; ?>


texts:
Default logo dimensions for invoice is 200*50.If I upload image with dimensions 216*100.How to set size in the code.So far,I've tried changing

protected function insertLogo(&$page, $store = null)
    {
        $image = Mage::getStoreConfig('sales/identity/logo', $store);
        if ($image) {
            $image = Mage::getBaseDir('media') . '/sales/store/logo/' . $image;
            if (is_file($image)) {
                $image = Zend_Pdf_Image::imageWithPath($image);
                $page->drawImage($image, 25, 820, 125, 900);
            }
        }
        //return $page;
    }

This doesn't seem to work.


texts: Magento 2 - Product/Category assignment issue

texts:
We are running on Magento CE-2.3.5 open source and keep experiencing products disappearing from the website.
When we make product changes/updates and we run indexer:reindex; all products are in their correct category assignments but eventually we notice the products begin to appear under different categories that they are not assigned to.
For an example:
A Category has 11 products assigned (6 enabled / 5 disabled) and we see the 6 display on the website as we expect. Then we experience the issue with products being removed/disappearing from the website and then this category becomes 11 products assigned (6 enabled / 5 disabled) but 7 products display on the front end. This extra configurable product does not have this category assigned to it and neither do the simple's underneath it. In order for us to correct this issue we must run the indexer:reindex.
correct-category-assignments
Incorrect-category-assignments
As far as individual product display is concerned: product is enabled, assigned to websites, assigned product to categories, product stock status is in stock, and verified product visibility.


texts: Magento 2 Layered Navigation Not Displaying Price

texts:
I have enabled Layered Navigation in my admin, as well as enabling some product attributes to be used within it.

However, it's not displaying on my category page. I have the category anchored and ensured that the product attribute is set to "filter with results" but nothings working.

It actually doesn't even display in the source code. I've tried several different extensions but these don't work either as they are extending the functionality of the default layered navigation.

The only attribute that actually shows on the layered navigation is a custom product attribute set as a dropdown.


texts: How to get data from custom table and display it in page in Admin Panel?

texts:
I am new to Magento. My Magento version is 2.2.3

I have created the page as explained here Magento tutroial. Now I want to get the custom table data from database and show it in html table in the same page. How can I do that?

Any help would be appreciated.


texts: Create a Multidimension array and convert this in JSON format

texts:
I want to create JSON data to pass in AJAX.
I'll pass the dynamic value of country & postcode in the below JSON.
Let me know how to perform this task.
Required data to pass in JSON

{"address":{"country_id":"IN","postcode":"452002"}

    var form = '';

    var country_id ='';
var postcode ='';  var jsonData ='';

jsonData =?// need logic
    form = jQuery(".form.form-shipping-address").serializeArray();
    jQuery.each(form, function(i, field){
        if(field.name == "country_id"){
            country_id = field.value;
        }
        if(field.name == "postcode"){
            postcode =  field.value;
        }
    });

   jQuery.ajax({
        url: "/rest/default/V1/guest-carts/"+window.checkoutConfig.quoteData.entity_id+"/estimate-shipping-methods",
        data: jsonData,
        cache: false,
        type: "POST",
        dataType: "application/json",
        success: function (response) {
            console.log(response);
        }
    });


texts:
I would like to add a Monetico electronic terminal payment to my Magento shop.

The Monetico service do not give any ready to install module for magento but only few php functions / examples.

As I need it to work as soon as possible, I would like to avoid developing a full module to implement it... Is there a generic module that can be used?

Have you already worked on a Monetico solution?


texts: Magento 2 : Use plugin / interceptor on abstract class

texts:
I am trying to create a plugin that fires after \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShipment\PrintAction::execute.
So I have my plugin setup in di.xml and an afterExecute() method, but it doesn't seem to get fired.
Now I know there are some limitations for plugins, but I can't read anything about abstract classes.
Can plugins / interceptors be used on abstract classes?


texts:
I'm trying to write a custom password reset script that adds rewards points to the accounts of all those that reset their passwords. A customised link to this will only be sent to the customers that have never logged into their account before (About 900 of them).

I need to know how to change the customer's last logged in date so that they can only get the rewards points once. This is the way I make sure that they haven't reset their password before.

$logCustomer = Mage::getModel('log/customer')->loadByCustomer($customer);
$lastVisited = $logCustomer->getLoginAtTimestamp();

if ($lastVisited == NULL)
{
  // Reset password
  // Add reward points to account
}


texts: Display the Products sku that customer ordered in excel sheet

texts:
Background :

I can able to download excel sheet with customer's information....

Requirement :

Now i am trying to get Which products customer ordered ?

Issue :

In all the rows , its displaying same product skus....

<?php

$customerCount = 0;
try
{
    //configure the customer collection
    $collection = Mage::getResourceModel('customer/customer_collection')
    ->addAttributeToSelect('entity_id')
    ->addAttributeToSelect('firstname')
    ->addAttributeToSelect('lastname')
    ->addAttributeToSelect('email');

      //configure the order collection
    $ordercollection = Mage::getModel("sales/order")->getCollection();
    $ordercollection->getSelect()->join(
    'sales_flat_order_item',
    '`sales_flat_order_item`.order_id=`main_table`.entity_id',
        array(
              'skus' => new Zend_Db_Expr('group_concat(`sales_flat_order_item`.sku SEPARATOR ", ")')
             )
    )->group('main_table.customer_id');

    do
    {
         foreach ($collection as $customer)
         {
            foreach ($ordercollection as $data)
            {
             $product = $data->getSkus();
            }
            $customerArray = $customer->toArray();
            $customerREquiredArray['customer ID'] = $customerArray['entity_id'];
            $customerREquiredArray['First name'] = $customerArray['firstname'];
            $customerREquiredArray['Last name'] = $customerArray['lastname'];
            $customerREquiredArray['Email'] = $customerArray['email'];
            $customerREquiredArray['product'] = $product;
         }
    }
}


texts:
I have this column i added. How can i sort it? i can click on sort, but well it doesnt really sort right.

My grid looks like:

$this->addColumn('sn_suppliers_noos', array(
            'header' => Mage::helper('purchase')->__('NOOS'),
            'index' => 'product_id',
            'renderer' => 'MDN_Purchase_Block_Widget_Column_Renderer_SupplyNeeds_Noos',
            'type' => 'number'
        ));

My renderer looks like:

public function render(Varien_Object $row)
    {

        $value =  $row->getData($this->getColumn()->getIndex());
        $product = Mage::getModel('catalog/product')->load($value);
        $value= $product->noos;

        return $value;
    }


texts: Mobile & tablet showing different themes randomly

texts:
Since a few weeks I'm using two themes for the Magento webshop. One for smartphones and one for desktop/tablets. The smartphone theme should only be used on smartphones, but the homepage of the this theme is also displayed on tablets. When tablet shows the desktop homepage, smartphones show the desktop homepage to. Thereby, the desktop/tablet theme shows up randomly on smartphones, on just one page (different one each time). Nothing I'm trying to solve the problem seems te work. What I've already tried:

Clearing the cache.
Flushing the cache.
Disable Amasty Full Page Cache.
Using different types of string to define the screensize.
Adding an acception for tablet (before and after acception for smartphone).

Because it happens randomly, it's hard to investigate what's going on. The log doesn't give any information on this problem. On our development area the two different themes work perfectly. The problem apeared when I added the smartphone theme (via System -> Configuration -> Design -> Themes). I'm using Magento 1.7.0.2. Any ideas wat causes the problem and how to solve it?


texts: Recommended AWS instance type for Magento

texts:
I have a site that peaks out at less than 200 concurrent users maximum when it's busy and a steady 30 or so normally. I am planning an AWS migration from the current provider. I'd like to know what you would consider the ideal instance type for Magento. I am thinking the Memory Optimised instances would be pretty good for Magento as everyone knows how much Magento loves RAM. In another note, would there be much point in setting up a VPC (Virtual Private Cloud) for the traffic?

I am currently thinking to go to with a High Memory, EBS Optimised Instance (m2.4xlarge with 64GB ram, 8 vCPU & 26 ECU) - or should I focus more on CPU?


texts: Magento 2.1.7 - Payment Module using iframe

texts:
I'm trying to create a custom payment module where the user select the payment method and than instead of redirect the user to a different page, I want to:

remove unnecessary elements form the page
show an iframe with a payment form (3rd party iframe)

I've created a basic payment module but I'm not sure how to:

construct the iframe dynamically (the iframe url has query params that contain cart info like total) and modify the html to show it. maybe change the page content using uicomponent? how do I get the cart data in js and this point?
remove html elements in "Magento/ko way".

Any insights/ideas/links?
Is there a Magento payment gateway that works that way so I can reference it for example?


texts: Is it possible to do partial dependency injection? For example, I have a class with a method called findAttrValueByLabel, and I want to be able to inject a Magento\Catalog\Model\Product\Attribute\Repository, but also pass two other parameters myself (namely $attr_code and $label). If it is possible, how do I do it? In fact, in general how do I call a method on a class with dependency injection? I know how to do it with the constructor only, because I just need to create it with object manager.


texts: Using multiple stores - how can I add a class name in the body or html tags for each website name?

texts:
I'm using multistore and I have 2 website names. They are all using the same design package, so they share the same css file and template files, layout files etc.

I just need to add a class name in the body or html tag, a different one for each store.

So for example, for website 1:

<body class="website1">

and website 2:

<body class="website2">

I thought there might have been an option to add a class name for each website name in admin by either going to system>config>manage-stores and adding a class for each website or system>config>design then adding a class name for each website by changing the Current Configuration Scope. But looks like I have to do it by using the local.xml file. Is it possible to do it from the one local.xml file too, because both stores use the same local.xml file. Can anyone help me with it, thanks.


texts: Is it possible in Magento 2 to load content in between products?

texts:
I'm wondering if it is possible at all to load some content (different per page) in between the product collection. I've made a module injecting some content that I enter in the backend, but obviously every page of my category now displays the same content blocks at the same place, since the product collection is just loaded a second time for the second page.

What I want is to be able to inject different content for the second, third page etc. I added some screenshots of how I would want it to be. Any help would be appreciated!


texts: Currency 'USD' not found when trying to access admin

texts:
I have never encountered this error before. I did a quick search for it. I found another thread but it seemed to vary a bit from my problem.

Here is my stack trace:

There has been an error processing your request
Currency 'USD' not found

Trace:
#0 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Locale.php(575): Zend_Currency->__construct('USD', Object(Zend_Locale))
#1 /var/www/vhosts/inc.com/app/code/core/Mage/Directory/Model/Currency.php(233): Mage_Core_Model_Locale->currency('USD')
#2 /var/www/vhosts/inc.com/app/code/core/Mage/Directory/Model/Currency.php(216): Mage_Directory_Model_Currency->formatTxt('444.00000000', Array)
#3 /var/www/vhosts/inc.com/app/code/core/Mage/Directory/Model/Currency.php(197): Mage_Directory_Model_Currency->formatPrecision('444.00000000', 2, Array, true, false)
#4 /var/www/vhosts/inc.com/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format('444.00000000')
#5 /var/www/vhosts/inc.com/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(62): Mage_Adminhtml_Block_Dashboard_Bar->format('444.00000000')
#6 /var/www/vhosts/inc.com/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(74): Mage_Adminhtml_Block_Dashboard_Bar->addTotal('Revenue', '444.00000000')
#7 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#8 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#9 /var/www/vhosts/inc.com/app/code/core/Mage/Adminhtml/Block/Dashboard.php(50): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#10 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#11 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#13 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#14 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#15 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#16 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#17 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#18 /var/www/vhosts/inc.com/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#19 /var/www/vhosts/inc.com/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#20 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_DashboardController->indexAction()
#21 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /var/www/vhosts/inc.com/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#24 /var/www/vhosts/inc.com/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#25 /var/www/vhosts/inc.com/index.php(90): Mage::run('', 'store')
#26 {main}


texts: Magento 1.9.x ORM query to get past successful orders with specific billing street, city, state and zip

texts:
I need an ORM query to get all past successful orders with a specific billing street address, city, state and zip code? ie:

$street = '999 west rd';
$city = 'my town';
$state = 'New York';
$zip = '90001';

//write ORM query to get all past
//successful orders with all those exact values


texts:
Hello I have moved magento2 on live server that centos6 server, And my root directory is /var/www/html/magento source code. But my problem is my backend side working but frontend side just loaded.

How can i resolved ?

Url is : http://204.232.133.184/


texts: Which method I should rewrite or write a new method?

texts:
Normal Proc:

We configure the UPS/FedEx... etc credentials and other api details in Magento Admin Panel.

In cart/checkout page, Magento shows the shipping rates based on configured account details.

If I want to change/show the third party account rates, I will show the custom fields in cart/checkout page based on these credentials, as well as the shipping rates.

If a customer enters values for those custom fields, how can I pass those credentials and get the associated shipping rates.

I mean, which method I should rewrite? Or should I write a new method?

Thanks in advance.


texts:
In general, the loading times of pages in the backend are around 2 seconds. Can't really argue with that. However, I have noticed that Grid Pages (such as the Order and Products) require additional time to finish rendering the page.

If you look at Chrome you can see that after the page loads, it takes ad additional 2 seconds to render the Grid with the Order/Product Data.

Having looked at the loading assets, the following asset is to culprit. It appears that this is responsible for retrieving data from the database. The waterfall data attributes the time down to the TTFB.

What I find interesting, is that if you use any of the Filters or Searches after the page loads, the page renders with the results almost instantly. It's just that initial page load.

However, the reason for this post is an attempt to shed some more light on the following:

As I have no other Production environments to benchmark against, is the Load vs Finish time a reasonable expectation? i.e. Should I even bother to attempt to optimise this
If I were to optimise this, should I be looking at PHP or MySQL as root of the TTFB delay?

Side Note: It also appears that limiting both the Number of Results and the Number of Columns has a small but positive effect on Finish time.


texts:
Per the Magento download page, under the patches section

  Please upload the patch into your Magento root directory and run the appropriate SSH command:
  For patch files with the file extension `.sh:
  sh patch_file_name.sh
  Example: sh PATCH_SUPEE-1868_CE_1.7.0.2_v1.sh

Magento recommends a direct invocation of the sh command to run their patch runner.  The file extension of .sh supports this as well.

However, if you look at the top of each patch runner file, the shebang line points to bash.

#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#

The programmer in me wants to trust the source file, but the process wonk wants to obey what's written on the Magento website, the cynic wonders if the patch has been tested against the differences between bash and sh.


texts: Cms page custom layout update file for multiple pages - Magento 2.3.4

texts:
In Magento 2.3.4 you can add custom layout update via XML files, using

cms_page_view_selectable_<PAGEIDENTIFIER>_<CUSTOMNAME>.xml

format.

But what if I want to apply this layout update on 20 CMS pages? Do I have to create a separate XML file for each page? Is there any way I can apply a layout update XML file on multiple CMS pages?


texts: How to save quote billing address in magento 2?

texts:
For our project we have customized theme in Magento2. This has billing and shipping address pages. We have to save the billing address details in quote address table. But we didn't come across any specific function to save the billing address in Magento 2.

Anybody worked on this kind of billing save in Magento2?


texts: How to highlight the searched keyword on results page?

texts:
When you search in Magento, on search result page you will see the results with below text for example,

Search results for 'configure'

Here my search keyword is configure.

How can I highlight the searched keyword on results page ?

Thanks


texts:
I've got an obeserver that is run inside a transaction. It's writing log data to database.
My problem is that these log entries are missing if the transaction aborted. Is there any way to have $model->save() ignore a surrounding transaction? Is it possible to have a model use a second connection to the main Magento database without duplicating configuration?


texts: I cant translate few words on the website

texts:
I have magento store 1.9.0 that runs in 3 different languages.

Most of it is translated, but there are few words that i can't translate to any other language from english.

Such as Configurable size attribute, where you must select products' size. IT is translated as a filter but not here in the menu.

  Stock measure. Only x Left.

And a revolution slider static block. apparently it supports only one language. what should i do?

Inline translation does not work, as well as translate.csv, i have also searched all Mage_xx.csv files in locale, but still can't translate those words.


texts: How to get products filtering by category and attributes?

texts:
I have searched about how to filter and I have tested about 20 codes but always return "".
The situation is the following:
 - For the current category, I have 8 attributes, 7 are multiselect checkbox and the last one is radio button.
For example:
Attribute code: eniso20345_2011. The selected checkbox value for this one is "S1" and "S3". The current category is "shoes".

So I want to get all products which have the attribute eniso20345_2011 = ("S1" and "S3") into the category "shoes". How can I do that?

This code run but I do not want information about one specific sku, I want all SKU which have specific attributes values and specific category.

$productsS1 = Mage::getModel('catalog/product')
            ->getCollection()
            ->addAttributeToSelect('sku')
            ->addAttributeToFilter('sku',"CUMADE000036")
            // ->addAttributeToFilter('eniso20345_2011', 'S1')
            ->load();

The idea is the commented line but this line return empty.

Thanks,

SQL Return:
SELECT e.*, at_category_id.category_id, at_eniso20345_2011.value AS eniso20345_2011 FROM catalog_product_entity AS e LEFT JOIN catalog_category_product AS at_category_id ON (at_category_id.product_id=e.entity_id) INNER JOIN catalog_product_entity_varchar AS at_eniso20345_2011 ON (at_eniso20345_2011.entity_id = e.entity_id) AND (at_eniso20345_2011.attribute_id = '207') AND (at_eniso20345_2011.store_id = 0) WHERE (at_category_id.category_id IN(525)) AND (((FIND_IN_SET('S1', at_eniso20345_2011.value))))

SOLUTION

Well, this is the way for get all products which belongs to determined category and have determined value or values for determined attribute or attributes:

    $products = Mage::getModel('catalog/category')
    ->load($categoryId)
    ->getProductCollection()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter(
    array(array('attribute'=>'eniso20345_2011', 'finset'=>1933)))
    ->joinField(
        'category_id',
        'catalog/category_product',
        'category_id',
        'product_id=entity_id',
        null,
        'left'
    );
    echo '<br>SIZE : '. $products->getSize() . PHP_EOL;

* The finset value is the Id of the option, if the option has like value 'S1', you have to use the ID associated to 'S1'.

I hope that this can help everyone with doubts about this.


texts:
I want to get product collection with an ip range.

I try:

$_productCollection = Mage::getModel('catalog/product')
                        ->getCollection()
                        ->addAttributeToSelect('*')
                        ->addAttributeToFilter('entity_id', array('from' => $start ,'to' => $end))
                        ->load();

And works in my local but not in the test server. I need other option, or know if this is the only way to look for another problem.


texts: Magento 2.3: Add Tab to product edit page in backend only for grouped type?

texts:
i want to add a product tab only for grouped products in the backend product edit page. I cant figure out how to do this, im only able to show the tab to all products. Is this possible, if yes, how?
Maybe someone has done this and can explain how.

Thanks and Best Regards,
Andreas


texts: Magento REST API Payment Method Aditional Information

texts:
I'm creating orders via REST. When placing the order, I'm invoking this:

$base_url/index.php/rest/V1/guest-carts//order

When using the 'checkmo' payment method it goes without issues, but when using other payment methods like Credit Card (using Braintree) it asks for additional information. Here https://magento.stackexchange.com/questions/136295/magento-rest-api-pass-additional-payment-method-details I have the additional info for Credit Card Payment, but I would like to know where in the whole Magento docs can I find the additional information for other payment methods such as PayPal, Debit Card, etc.


texts: How to export customer data programatically?

texts:
I need to export customer data programatically once in a day. I'm using php script to write the export functionality. I used,

$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$order = $objectManager->create('Magento\Sales\Model\Order')->getCollection();

to get Orders export functionality.

How can I write a script to export customer data?


texts: Apply two tax rates with different percent on a single product in cart

texts:
We want to apply two tax rules(tax and vat) on a single product in cart.  Like below image. I have created tax class with two tax rules but it's always use 1 in cart. I got this image from

Having two tax rates with same percent but different names

But not getting my solutions.

Thanks in advance


texts: How to display 'Shipping & Handling' in PDF if Shipping Amount is $0.00?

texts:
Magento 2.3.2

In my invoice PDF if Shipping & Handling amount is null or 0 it hides that row like this:

But I want to to display it as $0.00 if the price is null like this:

I found this file /vendor/magento/module-sales/Model/Order/Pdf/Total/DefaultTotal.php, in this file there is a function canDisplay() which is responsible for hiding the Title and Amount from Total section in invoice PDF. so I did some changes in function to display Shipping and Handling if it's $0.00:

public function canDisplay()
{
    $amount = $this->getAmount();

    /* TO DISPLAY SHIPPING & HANDLING IN INVOICE PDF IF ITS $0.00 - PARTAB SAIFUDDIN */
    if(strtolower($this->getTitle()) == "shipping & handling" && $amount == 0){
        return true;
    }

    return $this->getDisplayZero() === 'true' || $amount != 0;
}

and I got the result as I want, but when I override this file it didn't work and I find out that "Shipping & Handling" doesn't exist in echo $this->getTitle(), these are the titles which I got in a file which I override:

Discount
Adjustment Refund
Adjustment Fee

and these are the titles which I got in core file:

Subtotal
Tax
Shipping & Handling
Grand Total

I don't understand why I'm not getting "Shipping & Handling" in my overridden file...

Thank You.


texts:
Flush Magento Cache
Flush Cache Storage
Refresh Cache.

Do Flushing process help website speedup?
I have noticed that whenever we are doing flushing cache and refresh cache after that page speed test is better.

Did anyone experience the same?


texts: Has anyone made the admin interface for orders better for multi address orders?

texts:
We have a client doing a lot of order management in Magento, and trying to multi address checkout is annoying. Well, for the admin and Magento it doesn't exist. You have to keep placing new orders. This means asking for credit card information over and over again.

I would think that creating a multi address admin checkout would probably be a huge undertaking and probably not recommended. I am also looking into possibly using the Authorize.net CIM module for saved credit cards to get over the asking of information over and over again. However, I am just checking to see if there  is anything I am missing or if there are any extensions out there to make this process more streamlined?


texts:
I need to add a line between items in Magento2 email Invoice template. I have referred below link for Magento1. How can I achieve same for Magento2

  PDF Invoice draw line between items


texts:
I currently load all my files on one domain.

I thought it would be better to load all js, media and css content from a subdomain, like:

http://media.domain.com
http://js.domain.com
http://css.domain.com

Does anybody know if this improve the speed positive?


texts: Product Block not display in Order summary in Magento 2.2.2 checkout

texts:
I have recently check my site in IE browser and notice there are no display the product block in order summary block. I added 2 custom attribute in order summary block which is work good in chrome, safari, and other browser issue are only with IE 11.

Can anyone help to please.

Thanks.


texts: Enable and disable payment method in magento 2

texts:
I have a custom payment method in magento 2.
I have added an enabled option in the payment settings page in the admin area, this is done in the same way as the payment methods from the offline payments module.

Currently this value affects nothing, you can always see the option for this payment method in the checkout even if enabled is set to no. Which piece of code makes this work for the offline payment options and how can I get my payment method to show or hide correctly?


texts: Magento Cron throws error after upgrade from 1.9.1.0 to 1.9.3.10 with php 7.2

texts:
Upgraded multistore Magento from 1.9.1.0 to 1.9.3.10 to be compliance with PHP 7. But now, if I turn on cache for Configuration

https://monosnap.com/file/QcFj8vBFIpp3JhBZtDItE83P01AHNp#

Cron.php throws errors:

a:3:{i:0;s:0:"";i:1;s:952:"#0 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/app/code/core/Mage/Core/Model/App.php(848): Mage_Core_Model_App->throwStoreException()
#1 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/app/Mage.php(356): Mage_Core_Model_App->getStore(NULL)
#2 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/app/code/core/Mage/Log/Helper/Data.php(47): Mage::getStoreConfig('system/log/enab...')
#3 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/app/Mage.php(550): Mage_Log_Helper_Data->__construct()
#4 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/app/Mage.php(814): Mage::helper('log')
#5 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/app/code/core/Mage/Core/functions.php(234): Mage::log('Warning: simple...', 3)
#6 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/is/htdocs/wp12...', 383, Array)
#7 /is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/lib/Varien/Simplexml/Config.php(383): simplexml_load_string('";s:11:"script_name";s:61:"/is/htdocs/wp12986394_SYR3KK36TC/www/magento/online/index.php";}

Any resolution for this issue?


texts: Can admin add products to specific customers wishlist via administration?

texts:
Pretty much the title.

Can admin add products to wishlist of specific customer via administration panel? if so, how?

Using magento2 btw.


texts: Magento 2: Command to Clear view_preprocessed

texts: Is there a Magento 2 bin/magento command to clear the var/view_preprocessed cache/pre-process folder without doing a full static asset refresh?  The cache:clean command doesn't clear this folder.


texts: Maybe I am completely missing something, but I have yet to find a clear explanation of exactly what the var/package directory is, and how it is used. I've seen it included in a lot of problem solutions (clear it, check for xyz file there, etc) but what is it actually for, specifically?


texts: Magento 2: Impossible open Catalog -> Products

texts:
When I try open catalog --> Product list in backend:

Fatal error: Uncaught TypeError: Argument 1 passed to RLTS\Catingrid\Model\Category\CategoryList::__construct() must be an instance of Magento\Catalog\Model\ResourceModel\Category\CollectionFactory, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /home/b2b/domains/b2bstyle.pl/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /home/b2b/domains/b2bstyle.pl/public_html/app/code/RLTS/Catingrid/Model/Category/Categorylist.php:7 Stack trace: #0 /home/b2b/domains/b2bstyle.pl/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): RLTS\Catingrid\Model\Category\CategoryList->__construct(Object(Magento\Framework\ObjectManager\ObjectManager)) #1 /home/b2b/domains/b2bstyle.pl/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('RLTS\\Catingrid\\...', Array) #2 /home/b2b/domains/b2bstyle.pl/public_html/vendor/magento/framework/Object in /home/b2b/domains/b2bstyle.pl/public_html/app/code/RLTS/Catingrid/Model/Category/Categorylist.php on line 7

Any solution?

update

<?php

namespace RLTS\Catingrid\Model\Category;

class CategoryList implements \Magento\Framework\Option\ArrayInterface
{
   public function __construct(
   \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $collectionFactory
   ) {
      $this->_categoryCollectionFactory = $collectionFactory;

   }
   public function toOptionArray($addEmpty = true)
   {
      /** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */
      $collection = $this->_categoryCollectionFactory->create();
      $collection->addAttributeToSelect('name');//->addRootLevelFilter()->load();
      $options = [];
      if ($addEmpty) {
         $options[] = ['label' => __('-- Please Select a Category --'), 'value' => ''];
      }
      foreach ($collection as $category) {
         $options[] = ['label' => $category->getName(), 'value' => $category->getId()];
      }
      return $options;
   }
}


texts: Adding a message to a product in the cart

texts: I am looking for a way of displaying custom message to certain products in the cart depending on the product attributes.


texts:
I'm not sure how to programmatically add customer to one of previously created customer groups when he/she registers.

There are 2 groups:

General customer - basic group
Regular customer - customer needs to be added there if he/she requests a regular customer card

I need to add a customer to the latter group programmatically. Any ideas?


texts: how to get shipping methods in cms(in admin panel) but not programmatically using php magento 2?

texts:
Actually i am trying to get selected shipping methods from checkout
  page in cms(in admin panel). Here I want to put if else condition in
  cms content only with selected shipping Method.

Actually i am trying this way because when we can get base url from cms also same way i am trying to get selected shipping Method

  {{store url="customer/account/"}}


texts:
I have 2 store views, English & French.

I also have 2 CMS pages, the English page being /stores & the French pages being /magasins

Is there any way in the admin to actually link these 2 pages together as currently they are completely separate pages but they are really the same page but translated into a different languages.


texts: Magento 2: how to get CMS Pages using REST API

texts:
i want to get all cms pages using REST api i am trying to get via http://localhost/rest/V1/cmsPage/searchs but getting error

The "searchs" value's type is invalid. The "int" type was expected. Verify and try again.

what is proper way to get all cms pages data via REST api without any fillter parametter ?
any help appreciate..


texts:
This is for Magento 2 Enterprise Edition.

Some products can only be shipped within the United States. How can we identify those products and prevent checkout when the shipping address is international?

Note that this only applies to certain products.


texts: Always display Shopping Cart Price Rules Label above cart (not just when rule is first applied)

texts:
I have just started using Amasty's Promo Items extension to add free items to the cart when certain products are purchased.

The label I wrote telling the shopper why a free item was added appears above the cart listing when the rule is first applied (I have store views available in 2 languages, and it works fine for both).

However, if the user continues to shop and adds more items, next time they see their cart the label isn't displayed. If they missed it the first time, they sometimes get confused about why stuff is appearing in their cart they didn't place there.

I asked Amasty about it, and they told me it is default Magento behavior for Shopping Cart Price Rules (only to display the label when the rule is first applied).

Is there a way to override this behavior and have the label always display above the cart?


texts:
I have Magento 2.3.
I have moved the website to another server but all command [php bin/magento setup:upgrade
, php bin/magento setup:static-content:deploy -f, and any other command
]
on command putty command line . gives result
"check-requirements": false,
    "dump-autoload": false,
    "stub": "php-cs-fixer",
    "compactors": [
        "KevinGH\\Box\\Compactor\\Json",
        "KevinGH\\Box\\Com[klinikomcom@37-148-208-177 public_html]$


texts: Magento | Logged in customers can't send orders to a new address only the default address work!

texts:
Our Website is Magento based and I have a problem:

When a customer logged in and go to My Address in Account page then Add Address this address will be the default for both billing and shipping.If you need to send the order to another address and select new address it always use the default which is a big problem for our store!!

How can we solve this problem? Thanks:)


texts:
What would be the best practice way to redirect all logged in users to HTTPS? The login persists the site that's concerned. So if you login, come back to www.foobar.com a week later, you are still logged in - however, you'd be on the HTTP version.

The homepage on HTTP is not so much an issue - however can anyone suggest of ways to route the links HTTPS based on the logged in status? What would I need to override?


texts: Question about the rewards points system

texts: My question is, as magento default system, no rewards points are to be given to the orders below $100?


texts: Magento 2.3.2 Authorize.net Cannot read property 'length' of null

texts:
Just setup a fresh install of Magento2.3.2 and enabled Authorize.net
now when I try to do a transaction I just get a spinner on the checkout page and in the console I get an error that says the below and not sure what to do. Also I notice a field in the Authorize.net admin panel labeled public Key but idk where to get that. I have the API ID, Transaction key and Signature Key. What is the Public Key and where do I get it? Maybe because I have that field blank thats why I get this error?

Uncaught TypeError: Cannot read property 'length' of null
at b (AcceptCore.js:1)
at Object.a.dispatchData.a.dispatchData (AcceptCore.js:1)
at UiClass._createTokens (acceptjs-client.js:59)
at UiClass.<anonymous> (acceptjs-client.js:45)
at fire (jquery.js:3232)
at Object.fireWith [as resolveWith] (jquery.js:3362)
at Object.deferred.<computed> [as resolve] (jquery.js:3461)
at HTMLBodyElement.<anonymous> (acceptjs-factory.js:29)
at HTMLBodyElement.dispatch (jquery.js:5226)
at HTMLBodyElement.elemData.handle (jquery.js:4878)
at v (AcceptCore.js:1)
at w (AcceptCore.js:1)
at AcceptCore.js:1
at AcceptCore.js:1


texts: Magento 1.9 Cron.php Works, Cron.sh Does Not

texts:
I've tried many solutions, but can not seem to get cron restored. It was working fine and suddenly it no longer does. I have Truncated the cron_schedule table, but it doesn't populate. If I run cron.php (Had to remove the block from .htaccess) it will populate the cron_schedule table, however the cron I used that previously worked, no longer works.

sh /home/vigeos/public_html/cron.sh

I have tried

/home/vigeos/public_html/cron.sh /home/vigeos/public_html/cron.php -mdefault
/home/vigeos/public_html/cron.sh /home/vigeos/public_html/cron.php -malways

and

/bin/sh /home/vigeos/public_html/cron.sh

I even ran which php and changed cron.sh to be

PHP_BIN=`/usr/local/bin/php`

Still no results.

I also tried to change permissions of cron.sh and cron.php to be 744 which also did not work. I'm running out of ideas here. I even restarted cron daemon in between.

Any suggestions?


texts: Calling load with attribute name - $product->load('attribute_name');

texts:
Looking through one of the projects I've been working on, I keep coming across code that does $product->load('attribute_name'), where product is an instance of Mage_Catalog_Model_Product. Digging down through the code for a product model, I fail to see what this is supposed to do. Is this just a misunderstanding by whoever wrote this custom code, or am I missing something?

As far as I'm concerned this would attempt to load a product with the id of 'attribute_code', which doesn't exist. In this situation it would hit Mage_Eav_Model_Entity_Abstract::load with $product, 'attribute_code', array() as the arguments. This would actually mark the current model as new with isObjectNew(true) since it can't be loaded from the database, but since $attributes is empty it will trigger Mage_Eav_Model_Entity_Abstract::loadAllAttributes, which due to the fact the model was partly loaded and thus contains an entity_id already, fetches all attributes from the database for that entity_id. If this is the case, the string 'attribute_code' is somewhat irrelevant (so long as it isn't the entity_id of another product) and all attributes will be loaded for the entity_id contained in the model.

Is my understanding correct, or am I missing something?


texts: Magento 2 indexer:status Schedule Status always "working" instead of "idle"

texts:
Our new products don't show up (can't find by sku in search). We checked the indexer

bin/magento indexer:status

and found that the schedule of the "Catalog Product Rule" is always "working" instead of "idle", also found 10747 error in backlog.

My questions are

How to check the 10747 errors in the backlog? I checked

var/log/cron.log

and try to find it by

index
indexer
catalogrule_rule
Catalog Product Rule

but no luck

How to clear the Schedule Status "working" status to "idle", make it really work?


texts: How to display price times quantity in minicart

texts: I would like my minicart to reflect price multiplied by quantity per item. Currently it reflects the quantity correctly but the price itself is for a single item, not qty x items. It needs to be the actual price (after any discounts). I also realize this is a large chunk of code due to the conditionals, taxes and other various things Magento uses to show a single price. I'm just not sure what file to reference for this code.


texts:
I written Product collection but i can't able to get current seller id

public function getMy(){

        $collection = Mage::getResourceModel('catalog/product_collection');
        $collection->addAttributeToFilter('status',1); //only enabled product
        $collection->addAttributeToSelect('*'); //add product attribute to be fetched
        $collection->getSelect()->order('rand()');
        $collection->getSelect()->limit(5);
        //$collection->addAttributeToFilter('seller_id');
        $collection->addStoreFilter();
        return $collection;

    }

My problem is i want to display other product of same seller in product details page, So how to get Current seller id

Mage::getModel ( 'marketplace/sellerprofile' )


texts: Deprecated Registry alternate using session or any other possibilities for 'Custom module'

texts:
In my case, I created Blog Module and in that while getting current_blog_post from URL's id, I register it in coreRegistry and use registry to get the value in various places.

register is used in Controller to get the current id while editing the form.
The below code is Located in

  myVendor/myModule/Controller/Adminhtml/Post/Edit.php

Similarly, the registered value is called through registry in various place such as

Question: Is there any other way instead of using the registry as it is deprecated?

Note: I referred in many places including atwix and in that they showed to get the values by the registry which are already registered by the core. In my case, I am using register and getting the registered value using registry.


texts: Magento 2 : How to get store information in specific Block

texts:
I have Override \Magento\Catalog\Block\Product\View Block in which i can not get store information. I have use \Magento\Store\Model\StoreManagerInterface $storeManager but it throws following error.

  Fatal error: Uncaught TypeError: Argument 12 passed to
  Tecksky\Catalog\Block\Product\Specification::__construct() must
  implement interface Magento\Store\Model\StoreManagerInterface, array
  given, called in
  /home/sysadmin/share/magento2/project/generated/code/Tecksky/Catalog/Block/Product/Specification/Interceptor.php
  on line 14 and defined in
  /home/sysadmin/share/magento2/project/app/code/Tecksky/Catalog/Block/Product/Specification.php:12
  Stack trace: `#0
  /home/sysadmin/share/magento2/project/generated/code/Tecksky/Catalog/Block/Product/Specification/Interceptor.php(14):

`

How can I use it in this Block file


texts:
I want to get data value of checkbox from input filter product but the value have value old. In my js file i write
var nameVal = "";
if($('.am_shopby_link_selected input').prop('checked')){
    var nameVal = $('.am_shopby_link_selected').parent('.item').data("label");
    $(document).find('.breadcrumbs_selected .items').append("
"+nameVal+"
");
}

But when i check and two times filter i have same value

Please help me!


texts: Shopping cart shows as empty upon clicking "add to cart"

texts:
We are using magento 1.7 I believe, when you are on our website on mozilla or IE on some pcs (not all) and you navigate to a product and click "add to cart" on the product page, you are redirected to "your cart is empty" page - in chrome it works and it's only on a select number of pc's here at the office.

What I have tried includes:

Set cookie lifetime: 86400
Set cookie domain: http://www.domain.com/
Set cookie path: to "/" upon suggestion

I can't figure out what might be causing this, has anyone experienced this issue before?

As a side note, it started occuring on exactly the 12th of February which is 5 days ago, I am not quite sure what went down on the 12th...

Thank you


texts: Product showing Out of Stock in Magento 2?

texts:
I have created a product but on checking on front end it goes to out of stock.

This is my product which have quantity and in stock also.
I have run also indexer:reindex and cache clean but still it shows out of stock.
Any Help is appreciated.


texts: Override Mage_Checkout_Block_Onepage with an extension

texts:
I'm aiming to override the class Mage_Checkout_Block_Onepage in order to begin a rework of the onepage checkout. Unfortunately, i fail to success at overriding it, while the onePageController override works fine. My package name is Ohwee, my extension name is ThirdStepsCheckout.

Files in my extension:

Checkout/
    Block/
        Onepage.php
controllers/
    OnepageController.php
etc/
    config.xml

Here's my config.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Ohwee_ThirdStepsCheckout>
            <version>0.1.0</version>
        </Ohwee_ThirdStepsCheckout>
    </modules>
    <global>
        <blocks>
            <checkout>
                <rewrite>
                    <onepage>
                        Ohwee_ThirdStepsCheckout_Block_Onepage
                    </onepage>
                </rewrite>
            </checkout>
        </blocks>
    </global>
    <frontend>
        <routers>
            <checkout>
                <args>
                    <modules>
                        <ohwee_thirdstepscheckout before="Mage_Checkout">Ohwee_ThirdStepsCheckout</ohwee_thirdstepscheckout>
                    </modules>
                </args>
            </checkout>
        </routers>
    </frontend>
</config>

at the time, the block class Onepage.php is just a test to see if the override is working :

<?php
require_once 'Mage/Checkout/Block/Onepage.php';

class Ohwee_ThirdStepsCheckout_Block_Onepage extends Mage_Checkout_Block_Onepage {
    public function getSteps()
    {
        exit('custom steps');
    }
}
?>

The problem is I don't see the exit on front, but the layout is now empty, so it seems the original Mage controller isn't called either. If i delete the config.xml part about overriding the block, checkout is functional again. I can't see from where the issue come from,any ideas ?

I'm on Magento CE 1.8.0.1


texts: Authorize.net Accept.js partial refunds not working / not enabled on Magento 2.3.3

texts: We are using Authorize.net Acceptjs as a payment method and it does not allow us to create partial refunds. Any help to resolve this issue for Magento 2.3.3 would be greatly appreciated.


texts: Magento 1.9 : How to Edit the price of all products؟

texts:
I want to increase the price of all products
And if I want to edit each one
It's very time consuming
Is there a way to group?


texts:
http://stage.infinitealoe.com/directory/currency/switch/currency/CAD/uenc/aHR0cDovL3N0YWdlLmluZmluaXRlYWxvZS5jb20,?___store=default

I am getting above Currency switcher redirect url. How can i remove it?


texts:
I am getting the error below while trying to view the cart page on my magento 1.9.3 shop.

  Fatal error:  Call to undefined method
  Mage_Catalog_Model_Product_Type_Simple::getUsedProducts() in ...
  includes/src/Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection.php on line 150

Line 150 is this:

public function _addAssociatedProductFilters()
{
  $this->getProduct()->getTypeInstance(true)->getUsedProducts($this->getColumnValues('attribute_id'), $this->getProduct()); //Filter associated products
  return $this;
}

The error appears after certain simple products are added to the cart, but only if they are added last and usually only if the cart already contains configurable products. I tried re-creating the simple products, but it does not solve any problems.

Can anyone point me in the right direction?


texts: Assign attribute to a product using mysql Magento 2

texts:
I am trying to assign attribute to a product in mysql, but not able to do so.
Any idea how to do it ?


texts: Display selected child product instead of the parent product in order email

texts:
In Magento 2.3, customer selects a specific product from the configurable product and place order. Now every-where (checkout, order and invoice) child product shows, but in order email confirmation parent product showing instead of that child product.
Please anybody can help me where I need to make changes.
Thank you


texts: How can I get additional data for each order item, based on order id? I need to get additional data for each order when order is made. I already implemented the observer, it works fine. I hooked observer to the sales_order_place_after event, it seems that at this moment, the additional data is not yet saved into the database, so maybe it is not available to this event? When is additionalData for an order item created, and where can I catch it, while the order is being made, ie. what is the soonest (earliest) moment I can catch this data and how?


texts: magento 2 how to add fb open graph and twitter card for cms pages

texts: I want to add open graph tags and twitter card for Magento 2 cms pages and also wanted to know where this cms pages will be stored either in any module or database?


texts: Saving order extension attribute to database

texts:
What is the process for saving an extension attribute to the database, when passed over using the REST API? How does it know which table / field to save the value to? the method are being generated in the OrderExtension.php but don't seem to do anything.

I can't seem to find an example of this that doesn't use the object manager (How to insert data in custom table using REST API in Magento2). I have also looked through the Magento/Giftmessage code, but it seems to just magically know where to save this.

I have tried adding these sort of lines to the extension_attributes.xml -

 <join reference_table="" reference_field="" join_on_field="">
            <field></field>
 </join>

But it doesn't seem to do anything when the correct fields are added.


texts: How to make if else statement in magento 1 customize search bar

texts:
I have a problem on this code :

if(isset($_POST['btn-save'])){
    $resource = Mage::getSingleton('core/resource');
    $readConnection = $resource->getConnection('core_read');
    $table = $resource->getTableName('catalog/product');
    $search = $_POST['gsearch'];
    $query = 'SELECT * FROM ' . $table . 'WHERE name LIKE' .$search.'';
    $results = $readConnection->fetchAll($query);
     foreach($results as $res){
        echo $res ['name'];
     }
}


texts: Some product pages layout issue Magento 2

texts: Suddenly my site has suffering layout issue on some product pages. I checked in console and it says require is not a defined, but many other product pages and site is working fine.


texts: language is reset to default on any new page load

texts:
I have a multi-language website with a language switcher that actually works. If I click on the new language (e.g, Italian) I'm redirected to a new page with the ?___store=it&___from_store=en url extension and the contents are translated.

The problem is that when I follow a link from that page, the new page shows the default - initial - language.

What do you think is going wrong?

edit

Links to other pages are simple <a> tags; is there any function in Magento to build links that consider the selected language?


texts: Magento 2 - Color swatches not display in Category Page

texts:
My site in Magento 2.3.5 does not display color samples on the category page.

Instead, they appear on the home page and on the product page.

In the backend I set everything correctly to display the color samples on the category page but they are not seen.

In my custom theme taken by Luma there is this code in list.phtml:

<?php if ($_product->isAvailable()) :?>
        <?= $block->getProductDetailsHtml($_product) ?>
<?php endif; ?>

But it doesn't work and I return null

Why?


texts:
Braintree is slowing my website when "proceed to Checkout". But when changing to sandbox website is working good, but I have no idea why?

Need help!

Magento 2.2.1


texts: How to add buy now button on product page to checkout page with the quantities

texts:
I´m not a programmer but I'm running my shop with Magento, I tried to use the suggestion below to create a 'Buy Now' button and works fine.

But add only 1 unit of the product.

How can I do to add the quantities as the client needs?

Suggestion of code:

<button type="button" title="<?php echo $this->__('Check out') ?>" class="button btn-cart" onclick="setcheckoutLocation('<?php echo $this->getAddToCartUrl($_product) ?>','<?php echo Mage::getUrl('onestepcheckout/index/') ?>')"><?php echo $this->__('Buy Now') ?></button>

Today my original code is bellow.

Thanks!

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

        <?php if(!$_product->isGrouped()): ?>

                <?php echo $this->__('Qty:') ?>
                <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" />

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

<?php echo $this->getChildHtml('', true, true) ?>

<?php endif; ?>

So, I tried the code bellow and did not work with the quantities:

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

            <?php if(!$_product->isGrouped()): ?>

                    <?php echo $this->__('Qty:') ?>
                    <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" />

            <?php endif; ?>
            <button type="button" title="<?php echo $this->__('Check out') ?>" class="button btn-cart" onclick="setcheckoutLocation('<?php echo $this->getAddToCartUrl($_product) ?>','<?php echo Mage::getUrl('onestepcheckout/index/') ?>')"><?php echo $this->__('Buy Now') ?></button>

<?php echo $this->getChildHtml('', true, true) ?>

    <?php endif; ?>


texts: How to remove city as a required field at checkout page in magento 1.9.3.6?

texts: I want to remove required field from city and make it non required field at checkout page. how can i implement this?


texts: Magento 2 Custom remove item from cart button

texts:
I am trying to create a custom button to remove items from the shopping cart.

I've tried the following code <a href="<?php echo $this->getUrl('checkout/cart/delete', array('id' => $this->getProduct()->getId()))?>"> in vendor\magento\module-checkout\view\frontend\templates\cart\item\default.phtml but it doesn't seem to be working.

I must be putting something in the wrong place or not using correct code but I found this on another post.

Just need a point in the right direction


texts: As we know, reindexing will use a lot of resources and make the magento slowdown during the process. So, I was thinking, if there any possibilities to run reindex from different server. For example, I have magento running on server A. So, I have also server B only to execute the reindex. The reindex process only happened in server B. Yes it doesn't make any sense if I think of this way. btw, Is it possible? Is there any other way to avoid low performance of magento during the reindex process?


texts: I have four categories,but i want to display in sidebar only two categories which contains subcategories

texts: I have four categories in my site,but i need to display only two categories which contains subcategories in sidebar.


texts: Adding htmlContent to a listing UiComponent

texts:
If I insert a block into a <form> component using an XML snippet like this:
<htmlContent name="my.block.html">
  <block class="Vendor\Module\Block\MyBlock" name="my.block.block" />
</htmlContent>

It works as expected. However, exactly the same code in a <listing> UiComponent renders the block, but also generates this error:
Type Error occurred when creating object: Magento\Ui\Component\HtmlContent, Argument 2 passed to Magento\Ui\Component\HtmlContent::__construct() must implement interface Magento\Framework\View\Element\BlockInterface, array given

Can htmlComponents not be used in listings, or are there extra steps I need to take?


texts:
I am running a promotion and would like to make it very easy for customers to add three items to their shopping carts.

The research I have done around URL querystrings no longer seems to work on Magento 1.6.2, due to a requirement of a form key value.

Is there any way for me to be able to add one of each of 3 simple products to a customers basket from a link in an email?

Not scamming etc, just want to make life easy for people interested in buying the special offer product(s).


texts: I want to calculate price with formula: price = weight*height*width. How can I do that?


texts:
I load stores with htaacess rules like below:

RewriteCond %{HTTP_HOST} .*domain\.pl [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:storepl]
RewriteCond %{HTTP_HOST} .*domain\.pl [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

How to update above rule to exchange all user http URL's automatically to https ? I added https prefix to unsecure Magento base URL and it works but I'm not pretty sure if its the best option ?

Could somebody help with that rule to force https ?


texts: Magento2 - Buy y get x for x off where y is one simple product and x is another

texts:
How we can set up the following?

Buy y get x for x off where y is one simple product and x is another.

Selling clothing different sizes and want to sell one size for a discount if we buy another.


texts: Import bulk products with custom atributes fail

texts:
I am trying to upload 100 products at once with custom attributes from backend.

First I have downloaded some products I created with custom attributes to know how can I create csv.

Now I have the correct csv and when I check data, all is correct.

The problem is when I import from there, only import 33 products without custom attributes however I have tested with 3 or 4 products and it does function very well.

I have tried with magmi using Custom Options,the magmi problem is my products dont have the same custom atributes, the header ( colum name)  changes according it.

http://wiki.magmi.org/index.php?title=Custom_Options

I have done all csv according magento export file and if i want to use magmi I must to change each row or Does exist another way to do that using magmi without to change my csv files ?

I hope your help. Thank you in advance

PD: My magento version is 1.9.3.6

Update 01/20/2018

I've import one product with magmi like this following this

http://wiki.magmi.org/index.php/Custom_Options

This example is with soccer products, for example Barcelona products have differents custom options.In this case I upload a jersey soccer with custom options like Name, Number and Patchs and it doesnt function

So if I want to upload another product in the same csv like Training jacket, it has another different custom options like: checkBox -> Pants, and it doesnt options like name,number and patchs. This is my problem because I have 2000 products in csv with different custom options per product and I think MAGMI is useful to products that have same custom options because header is same for all.

What do you think about it?


texts: Exception occurred during order load error

texts:
When I am click on order view found: Exception occurred during order load

I am unable to reach order view page.


texts: I found error "call to a member function setData() on a non-object in controllers\IndexController.php on line 11"

texts:
app\code\local\Svi\Form\controllers\IndexController.php

public function postAction()
        {
            $data = $this->getRequest()->getPost();
            $model = Mage::getModel(form/form)->setData($data);

            try {
                $insertId = $model->save()->getId();
                echo "Data successfully inserted. Insert ID: ".$insertId;
            }
            catch (Exception $e){
                echo $e->getMessage();
            }

        }

app/code/local/Svi/Form/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Svi_Form>
            <version>0.1.0</version>
        </Svi_Form>
    </modules>
    <frontend>
        <routers>
            <form>
                <use>standard</use>
                <args>
                    <module>Svi_Form</module>
                    <frontName>form</frontName>
                </args>
            </form>
        </routers>
        <layout>
            <updates>
                <form>
                    <file>form.xml</file>
                </form>
            </updates>
        </layout>
    </frontend>
    <global>
        <models>
            <form>
                <class>Svi_Form_Model</class>
                <resourceModel>form_mysql4</resourceModel>
            </form>
            <form_mysql4>
                <class>Svi_Form_Model_Mysql4</class>
                <entities>
                    <form>

svi_form

                    </form>
                </entities>
            </form_mysql4>
        </models>
        <resources>
            <form_setup>
                <setup>
                    <module>Svi_Form</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </form_setup>
            <form_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </form_write>
            <form_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </form_read>
        </resources>
        <blocks>
            <form>
                <class>Svi_Form_Block</class>
            </form>
        </blocks>
        <helpers>
            <form>
                <class>Svi_Form_Helper</class>
            </form>
        </helpers>
    </global>
</config>


texts: Magento Noob: Need to find the main config files for Magento 1.8

texts:
I am new to Magento.  I'm basically doing archaeology on an old site that was abandoned by a former engineer.  I'm having the following problems:

I can't find the "main" configuration file for Magento.  In particular I'd like to find the database connection string so I can locate the database (both in my dev and prod environments).  Where is the main config located?
I don't have any dev environment that is in sync with the production code.  I would like to copy everything from the production site (everything is still running there, and I'm afraid to touch anything) and create a fresh dev environment.  What settings do I need to make sure I change to ensure the dev environment is isolated from the production environment?  (e.g. I don't want to have the dev environment accidentally pointing to the production database, or anything else it shouldn't).


texts: Parent Category menus are not clickable , How to make them clickable?

texts:
I need to make all the menu links clickable. But my magento site parent menu(which are having sub categories in it!!) are not clickable. How could I make them clickable. They all having their links also. Bit I could not found from which css class it is being not clickable.

Please Help.

I'm beginner in magento.

Thanks


texts: Import Product Dimensions (Length, Width, Height) in Magento 2

texts:
I am trying to import dimension data to a Magento 2.2.6 store.  The Magento attributes are present on the product, but I cannot figure out how to import to these fields.  I have tried length and item_length (and similar for height and width).  Every time, the import completes "successfully", but the dimensions are not added.

Has anybody found the correct column headings to use for these fields?


texts: Using magento 2 accordion widget with href links

texts:
I am trying to build a category accordion in my side bar and I am using magento 2 accordion widget
https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/widgets/widget_accordion.html
<?php
$counter = 0;
foreach ($collection as $index=>$category):

    ?>
    <?php $activeClass = $category->getIsActive() ? 'active' : ''; ?>

                <div class="card-header" id="heading<?= $counter ?>">

                        <button type="button" class="category-button"  data-toggle="collapse" data-target="#collapse<?= $counter ?>">
                            <a class="blog-link"
                               title="<?= $block->escapeHtml($category->getName()); ?>"
                               href="<?= $block->escapeUrl($category->getUrl()); ?>">
                                <?= $block->escapeHtml($category->getName()); ?> (<?= $block->escapeHtml($block->getPostsCount($category->getId())); ?>)

                            <?php if ($category->getLevel() == '1') : ?>

                            <?php endif; ?>
                        </button>

            <?php if ($category->hasActiveChildren()): ?>
                <ul class="blog-categories -level<?= $category->getLevel() + 1; ?>">
                    <?= /* @noEscape */ $block->renderChildrenItems($category->getCategoryId()); ?>

            <?php endif; ?>

    <?php
    $counter++;
endforeach; ?>

The catgeories are rendered and they are fine, but the issue is that the
<a class="blog-link"
    title="<?= $block->escapeHtml($category->getName()); ?>"
    href="<?= $block->escapeUrl($category->getUrl()); ?>">

does not work. So when ever I click on accordion elements or child elements it just opens/closes it. How can I make the links clickable?
I guess it should have something with the data-mage-init but I am not sure how to fix it. Can someone please help me?


texts: Browser unable to load theme.css.php file from magento skin folder

texts:
I am using Godday as hosting. I have used Gala Super Market Responsive Theme

I have tested in localhost it's working fine but when I have to try to install on the live hosting server, one of theme file is not loading.

[domain.com]/skin/frontend/default/galasupermarket/css/theme.css.php

Can anyone have faced this problem or can help me to resolve the issue?


texts: How move add to cart button below product images in product page magento2.2.4

texts:
Try every possibility. it's not working.

<move element="product.info.addtocart" destination="product.info.media" after="product.media"
<move element="product.info.addtocart" destination="product.info.media" after="-"/>


texts: Sort products in ascending order by name on specific category page not working

texts:
I want to sort product for a specific category by name in ascending order but it is still sorting in descending order in the front-end.

For a category under Display Setting, I have set Default Product Listing Sort By to Product Name

<referenceContainer name="content">
  <referenceBlock name="product_list_toolbar">
          <action method="setDefaultDirection">
              <argument name="dir" xsi:type="string">asc</argument>
            </action>
  </referenceBlock>
</referenceContainer>

Here is how it looks.

I have checked the setting in all store view and I have the same setting.

Any help will be highly appreciated.

Thank you


texts:
Over the past week this Superfish crap has appeared all over my Magento website it's literally hijacked it.

What should i do?


texts: Why security permissions 777 on the attachments Magento directory are ( are not ) safe?

texts:
What is preventing a hacker from deleting or even worse uploading a file to the 777 attachments folder ?

Specifically how to ensure that the server host is actually restricting that ?


texts: How to make magento core pagination as ajax pagination in a custom module

texts:
I am using magento 2.2.2 and I want to implement Ajax pagination in my custom module. Magento has a pagination (getPagerHtml), but it's not implemented using Ajax, and I am trying to implement it using Ajax. But I am facing problem .
Any help please will be appreciated.