texts: Magento2 - rest API on custom module "items" object is not populated

texts:
I build a custom module with a stores repository that I query using the following webapi.xml:

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <!-- Store Locator Service-->
    <route url="/V1/storeLocator/stores" method="GET">
        <service class="IOD\StoreLocator\Api\StoreRepositoryInterface" method="getList"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

I configured the di.xml to load the right model in the following way:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="IOD\StoreLocator\Api\StoreRepositoryInterface" type="IOD\StoreLocator\Model\StoreRepository" />
</config>

My getList function is defined in my Model\StoreRepository folder and is correctly called when invoking the API:

public function getList(SearchCriteriaInterface $criteria)
    {
        $searchResults = $this->searchResultsFactory->create();
        $searchResults->setSearchCriteria($criteria);
        $collection = $this->collectionFactory->create();
        foreach ($criteria->getFilterGroups() as $filterGroup) {
            $fields = [];
            $conditions = [];
            foreach ($filterGroup->getFilters() as $filter) {
                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
                $fields[] = $filter->getField();
                $conditions[] = [$condition => $filter->getValue()];
            }
            if ($fields) {
                $collection->addFieldToFilter($fields, $conditions);
            }
        }
        $searchResults->setTotalCount($collection->getSize());
        $sortOrders = $criteria->getSortOrders();
        if ($sortOrders) {
            /** @var SortOrder $sortOrder */
            foreach ($sortOrders as $sortOrder) {
                $collection->addOrder(
                    $sortOrder->getField(),
                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
                );
            }
        }
        $collection->setCurPage($criteria->getCurrentPage());
        $collection->setPageSize($criteria->getPageSize());
        $objects = [];
        foreach ($collection as $objectModel) {
            $objects[] = $objectModel;
        }

        $searchResults->setItems($objects);

        return $searchResults;
    }

Now when I dump the final $objects or $searchResults I correctly see a array of three models with the full data that I want to appear in the API response however when querying the API directly using:

curl http://magento/rest/V1/storeLocator/stores?criteria=all

The response is an array of 3 empty elements. It looks like there is problem in the way magento convert my model objet into a json response. Here is the full response I get:

{"items":[[],[],[]],"search_criteria":{"filter_groups":[]},"total_count":3}


texts:
I'm using Magento's default theme (rwd) as a base for my first work with magento, my client inserted some products but the pagination is not showing!

The products page was done by a CMS page in the admin with the code:
{{block type="catalog/product_list" category_id="4" template="catalog/product/produtos.phtml"}}
in it.

It is calling the toolbar and a "
 1-12 de 68
" in it
But no paging :(

here's the link, it's in Portuguese

http://zoio-magento.jelastic.websolute.net.br/index.php/produtos/


texts: Load products page inside phtml page Magento 2

texts:
I have a custom .phtml page, and i want to insert products page which contain layered navigation like this:

so i already have filtered product collection, is there a chance to do call this products page with layered navigation in my .phtml file with custom product collection?


texts:
I have created new web site for language code with sub-directory and copying two files index.php and .htacess from the root to the individual sub-directory.Then edit index.php file as:

define('MAGENTO_ROOT', getcwd());

$compilerConfig = ‘../includes/config.php’;
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}

$mageFilename = ‘../app/Mage.php’;
$maintenanceFile = 'maintenance.flag';

    /* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

Mage::run($mageRunCode, $mageRunType);
$mageRunCode = 'de';
$mageRunType = 'website';

After I edit getting a following issue;

Parse error: syntax error, unexpected '.' in /home/kaansilv/public_html/de/index.php on line 42

Also I edited .htaccess file on new sub-directory file as;

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

    #RewriteBase/de/

My site structure;

www.mydomain.com/en base directory  * it's fine
www.mydomain.com/de sub-directory *new web site which I created for sub-directory

Also I never forget to edit store base url each store view in Magento admin.

Now I would like ask ;

Am I need make symlink for sub-directory.Because I don't know how to path edit on SSH.

Another issue ;

Fatal error: require(): Failed opening required '/home/kaansilv/public_html/de/app/bootstrap.php' (include_path='.:/usr/local/php55/pear') in /home/kaansilv/public_html/de/index.php on line 64


texts: 1.7 bug - MySQL hanging due to top navigation menu caching bug

texts:
I'm running a Magento store with ~45K products and ~3700 categories. I've noticed that my store/server takes huge performance dips multiple times per day as a result of this query:

SELECT `main_table`.`entity_id`, main_table.`name`, main_table.`path`,
   `main_table`.`is_active`, `main_table`.`is_anchor`, `url_rewrite`.`request_path`
FROM `catalog_category_flat_store_1` AS `main_table`
LEFT JOIN
  `core_url_rewrite` AS `url_rewrite` ON url_rewrite.category_id=main_table.entity_id
   AND url_rewrite.is_system=1
   AND url_rewrite.product_id IS NULL
   AND url_rewrite.store_id=1
   AND url_rewrite.id_path LIKE 'category/%'
WHERE (main_table.is_active = 1)
   AND (main_table.include_in_menu = 1)
   AND (main_table.path like '1/2/%')
ORDER BY `main_table`.`position` ASC;

This problem was also discussed in this question and has been reported as a bug with Magento 1.7.x, but with no real options for solving the problem.

My question is, is it worth it/will it fix the problem by reverting my store to 1.6.2? I don't see how I can overcome this problem otherwise...


texts: How to use rewrite the cart/item/default.phtml template file to my module in Magento2

texts:
I have my cutom module and i need to write my own item/defult.phtml to my custom module template path how to do it ?

i saw one getOverriddenTemplates, how to return the value so that my custom file can take


texts:
I want to transalte several strings in the checkout, however, putting them in a CSV or turining on inline translation doesn't seem to rename them.

How can I rename Shipping, Review & Payments and Please enter a valid email address (Ex: johndoe@domain.com).?


texts: tax not being added to grand total while using extra fee

texts:
I have tried multiple Extra Fee extensions and while they work fine the problem I run into is that they don't allow the tax to be added to the grand total. I have been searching through google and many other places before posting here. I was wondering if anyone had run into this problem and fixed it. I have been going at this for the past two weeks as that was when I noticed this issue.
The site that this issue is running on only charges tax for people in Iowa. If the extra fee is deleted from the site the tax adds to the grand total.
If any further information is needed to assist in this project please let me know.
Thank You
Michael
EDIT I actually found my fix and now this issue has been fixed. I added

$address->setGrandTotal($address->getGrandTotal() + $address->getTaxAmount());
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBaseTaxAmount());

to the collect model and that resolved my issue. I hope this might help anyone in the future.


texts: Magento2 : How to add state options for UAE

texts:
I want to add some specific states options in State drop down on checkout page for UAE country option.

I didn't find any setting for this.

I have to create a custom module or need to change in any file? What should I do?


texts: can I use var folder in Magento to store files containing sensitive data?

texts:
I am using an API that requires a file with customer data as a parameter (customer name, postcode, town..). I have the idea to store the file in var folder because the server has write access to it.
However, I'd like to understand fully the risk for these data to be compromised.


texts: magento admin product grid add category filter to admin grid without adding column

texts:
i am trying to filter grid by category without adding category column, is there a way by which we can do this custom filter to grid.

below is what i did

function prepareCollection()
{
$catIdArray = getRequest()->getParam('cat_id');
//i.e  $catIdArray = array(26, 27, 17);

$collection = Mage::getModel('catalog/product')->getCollection();

$collection->joinField(
    'category_id',
    'catalog/category_product',
    'category_id',
    'product_id=entity_id',
    null,
    'left'
)
->addAttributeToFilter(
    'category_id',
    array('in' => $catIdArray)
)
->addAttributeToSelect('*');
$this->setCollection($collection);

Here filter is working fine, but pagination doesn't work in this case. please suggest me what am i doing wrong????


texts: Clone configurable product with related simple products

texts:
I am trying to clone (duplicate) configurable product with all associated simple products and option prices.

Does anyone have any idea how to do it or where to start?


texts: Fatal Error - Magento update 2.1.2 --> 2.2.2 Manual Update (overwrite files) Fatal error: Uncaught Error: Cannot instantiate interface

texts:
Trying to update Magento 2.1.2 to 2.2.2. Having major issues. Tried updating via the admin area SYSTEM UPGRADE. Just hangs forever. Double checked the memory allocation with the host and it's set to 2GB confirmed by system readiness check.

Tried running composer update via SSH command line. That doesn't work. I get a memory allocation error but have confirmed with host that all is set to 2GB. Checked via php.ini and file that displays the memory allotment. I found that there was a different php.ini file that Magento loads. Asked host (SiteGround) to check and they fixed and updated that file.

Went through the process of downloading Magento 2.2.2 and overwritint the files that way. https://www.goivvy.com/blog/magento-2-upgrade Step 3. But after going through that process I now have a fatal error that displays on the frontend as well as the URL for the admin:

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Serialize\SerializerInterface in /home/####/public_html/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /home/####/public_html/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#1 /home/####/public_html/magento2/vendor/magento/framework/ObjectManager/Config/Config.php(345): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#2 /home/####/public_html/magento2/vendor/magento/framework/ObjectManager/Config/Config.php(276): Magento\Framework\ObjectManager\Config\Config->getSerializer()
#3 /home/####/public_html/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(84): Magento\Framework\ObjectManager\Config\Config->extend(Array)
#4 /home/####/public_html/magento2/vendor/magento/framework/App/ObjectManager/Environment/Developer.php(79): M in /home/####/public_html/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50

There are no files in var/cache
No more directory of var/generation or var/di. (completely gone)

I'm at a loss as how to fix this error. Any help is very much appreciated. I have a backup of the website so I could just revert it back to 2.1.2 but not sure how to proceed with updating.


texts:
trying to delete an order, magento shows blank page. Is there a way to enable error reporting just for backend?
thanks


texts: Sender name in email template is wrong - But only sometimes

texts:
In my build I've made an email template looking like this

Informationer om tilmelding

Lokation/Hotel: {{var hotel}}

Dato: {{var date}}

Navn og titel: {{var custname}}

E-mail: {{var custemail}}

Virksomhed : {{var virksomhed}}

Adresse: {{var adresse}}

Postnr.: {{var postnr}}

By: {{var by}}

Telefon: {{var telefon}}

EAN Nummer: {{var ean}}

Antal tilmeldte: {{var entries}}

Kommentarer: {{var kommentarer}}

The variabels is from a custom form and is transfered to my controller that tells whats variable to use to set sending name like this

$emailTemplate->setTemplateSubject('Ny tilmelding til '.$params['product_name']);
            $from_name = $params['navn_title'];
            $from_email = $params['email'];

$to_name = Mage::getStoreConfig('trans_email/ident_general/name');
                //$to_email=Mage::getStoreConfig('trans_email/ident_general/email');
                $to_email= $recipient['email']; //Mage::getStoreConfig('sales_email/order/copy_to');
                $emailTemplate->setSenderName($from_name);
                $emailTemplate->setSenderEmail('ifp@ifp.dk'); //$from_email
                // Add some custom variables here to pass into the template.
                $emailTemplateVariables['custname']  = $from_name;
                $emailTemplateVariables['custemail']  = $from_email;
                //$emailTemplateVariables['lastname']  = $params['virksomhed'];
                $emailTemplateVariables['hotel']  = $params['hotelval'];
                $emailTemplateVariables['date']  = $params['dateval'];
                $emailTemplateVariables['virksomhed']  = $params['virksomhed'];
                $emailTemplateVariables['adresse']  = $params['adresse'];
                $emailTemplateVariables['postnr']  = $params['postnr'];
                $emailTemplateVariables['by']  = $params['by'];
                $emailTemplateVariables['telefon']  = $params['telefon'];
                $emailTemplateVariables['ean']  = $params['ean'];
                $emailTemplateVariables['entries']  = $params['entries'];
                $emailTemplateVariables['kommentarer']  = $params['kommentarer'];
                $emailTemplate->send($to_email, $to_name, $emailTemplateVariables);

most times the emails look like they should, but sometimes they get this strange tekst string in the middle of the sending name se pic below.

Note the sending name is using the same variable as the name and in the email.

Can some one tell me how to secure that never happen?

Update! I have check the names to be sure i'ts not a problem with wired signs or somthing like that.


texts: Magento 2 : Create and Handle Many to Many Relationship Between Two Table

texts: I have two custom table that is related by many to many relationships. So how to create these two tables: is there a specific syntax? and how to handle this type of relation thanks in advance


texts: jQuery doesn't work after updating to 1.9.1

texts:
Today I updated from 1.9 to 1.9.1.
But now jQuery doesn't work any more.
Could please some one help me to find the reason for the problem?

Thanks


texts: Can't validate Post Code on checkout page

texts:
I tried following this guide but when I test it, it is just triggering regular expression validation I want my to check postcode in API.

  Here is the code in {module_name}/view/web/js/model/postalCode.js

    define(
    [
        'jquery'
    ],
    function ($) {
        'use strict';

        return {

            /**
             * Validate checkout agreements
             *
             * @returns {Boolean}
             */
            validate: function () {
                var zipValidationResult = false;
                var zip = $('form[postcode]').val();
                alert("WORKING" + zip);
                console.log("WORKING");
                return true;
            }
        };
    }
);

  Here us code in {module_name}/view/web/js/view/postalCode.js :

     define(
    [
        'uiComponent',
        'Magento_Checkout/js/model/payment/additional-validators',
        'Sdu_CheckPostalCode/js/model/postalCode'
    ],
    function (Component, additionalValidators, postalCode) {
        'use strict';
        additionalValidators.registerValidator(postalCode);
        return Component.extend({});
    }
);

  And here is code in {module_name}/view/frontend/layout/checkout_index_index.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="checkout.root">
        <arguments>
            <argument name="jsLayout" xsi:type="array">
                <item name="components" xsi:type="array">
                    <item name="checkout" xsi:type="array">
                        <item name="children" xsi:type="array">
                            <item name="steps" xsi:type="array">
                                <item name="children" xsi:type="array">
                                    <item name="billing-step" xsi:type="array">
                                        <item name="children" xsi:type="array">
                                            <item name="payment" xsi:type="array">
                                                <item name="children" xsi:type="array">
                                                    <item name="additional-payment-validators" xsi:type="array">
                                                        <item name="children" xsi:type="array">
                                                            <!-- Declare your validation. START -->
                                                            <item name="postalCode" xsi:type="array">
                                                                <item name="component" xsi:type="string">Sdu_CheckPostalCode/js/view/postalCode</item>
                                                            </item>
                                                            <!-- Declare your validation. END -->
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</body>


texts: How delete not selection Base image, Small etc

texts:
$product1 = Mage::getModel('catalog/product')->loadByAttribute('sku', 'FN244403');
$product2 = Mage::getModel('catalog/product')->loadByAttribute('sku', 'FN229437');
$product1ID = $product1->getId();
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
$sql = "SELECT * FROM `catalog_product_entity_media_gallery` WHERE `entity_id` = '$product1ID'

LIMIT 1";
$rows       = $connection->fetchAll($sql);
echo $path = $rows[0]['value'];
   echo "Edited sku is ".$product1->getSku()." ".$product1->getImage()." ".$product1-

>getThumbnail()." ".$product2->getImage();
echo " asdasd ".Mage::getBaseDir('media') . DS . 'catalog/product' .trim($rows[0]['value']);
Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID);
$product1->addImageToMediaGallery(Mage::getBaseDir('media') . DS . 'catalog/product' .trim

($rows[0]['value']), array('image', 'small_image', 'thumbnail'), false, false);
$product1->save();

I am add for product image such as Small image, Base image, Thumbnail. How i can delete second lost image wich not select as Small image, Base image, Thumbnail
Thanks


texts:
I'm new to magento. I want to change email invoice template like below image

Please help me to do like this, i dont know where to modify.


texts: Magento 2: persistent cart continues working even after deactivated

texts:
I am trying to disable the persistent cart function in Magento 2.3.4
In the administration panel I disabled the option in Stores> Configuration> Customers> Persistent Shopping Cart
Enable Persistence = No
I cleared the cache, but even so when using the store as a customer, when adding a product to the cart it remains saved after logging out.
What else should I do?


texts: The module doesn't work and just redirect me 404

texts:
The module allows me to export the orders according to the grid I assigned, but here's the thing everything works fine but the moment I click submit to export the orders it just gives me 404, so I believe the issue is related to the router somehow, and I'm having lack of knowledge in this regard, I would appreciate any hint or guidance in this regard.

=> config.xml

<?xml version="1.0"?>

<config>
    <modules>
        <newmodule_ExportOrders>
            <version>0.0.2</version>
        </newmodule_ExportOrders>
    </modules>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <exportorders before="Mage_Adminhtml">newmodule_ExportOrders_Adminhtml</exportorders>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
    <global>
        <helpers>
            <exportorders>
                <class>>newmodule_ExportOrders_Helper</class>
            </exportorders>
        </helpers>
        <blocks>
            <exportorders>
                <class>>newmodule_ExportOrders_Block</class>
            </exportorders>
        </blocks>
    </global>
    <adminhtml>
            <events>
                <core_block_abstract_prepare_layout_before>
                        <observers>
                            <newmodule_ExportOrders_Model_Observer>
                                <type>singleton</type>
                                <class>newmodule_ExportOrders_Model_Observer</class>
                                <method>addMassAction</method>
                            </newmodule_ExportOrders_Model_Observer>
                        </observers>
                </core_block_abstract_prepare_layout_before>
            </events>
    </adminhtml>
</config>

=> controllers :

<?php

class newmodule_ExportOrders_Adminhtml_ExportOrders_ExporterController extends Mage_Adminhtml_Controller_Action
{

    public function exportshipmentAction(){
        $fileName = 'orders_shipments.csv';
        $grid = $this->getLayout()->createBlock('exportorders/adminhtml_sales_order_gridsda');
        $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());

    public function exportsdashipmentsAction()
    {
        $fileName = 'orders_sda_shipments.csv';
        $grid = $this->getLayout()->createBlock('exportorders/adminhtml_sales_order_gridnew');
        $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
    }
}

=> observer :

    <?php
class newmodule_ExportOrders_Model_Observer
{
    public function addMassAction($observer)
    {
        $block = $observer->getEvent()->getBlock();
        if(get_class($block) =='Mage_Adminhtml_Block_Widget_Grid_Massaction'
            && $block->getRequest()->getControllerName() == 'sales_order')
        {
            $block->addItem('exportorders_bartolini', array(
                'label' => 'Export Shipment Bartolini',
                'url' => Mage::app()->getStore()->getUrl('adminhtml/exportorders_exporter/exportshipment'),
            ));
            $block->addItem('exportorders_sda', array(
                'label' => 'Sda Shipment Bartolini',
                'url' => Mage::app()->getStore()->getUrl('adminhtml/exportorders_exporter/exportsdashipment'),
            ));
        }
    }
}


texts: Magento 2: Override radio.phtml for bundle

texts:
I would like to override the output of a radio button rendering for a bundle in Magento 2.

In catalog_product_view_type_bundle.xml I found the following code:

<referenceBlock name="product.info.options.wrapper">
    <block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle" name="product.info.bundle.options" as="type_bundle_options" template="catalog/product/view/type/bundle/options.phtml" before="-">
        <block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio"/>
    </block>
</referenceBlock>

I tried to override the template with

<block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option\Radio" name="product.info.bundle.options.radio" as="radio" template="Magento_Bundle::templates/catalog/product/view/type/bundle/option/radio-alternative.phtml"/>

But the new template is not used for rendering. Is there any idea around what could be wrong? Thanks!


texts: Magento 2 fresh install, admin panel UI issue

texts:
I am new to Mangento. I just finished setting up Magento. Home page works fine however when I login to admin panel, it does not look good. Please check these screenshots. How can I fix this? Notice that the main body in all section is not displaying properly.
Here are acreenshots https://imgur.com/a/b06BQHd


texts: How to rewrite the method of a class in my module when another method of the same class is rewritten in another?

texts:
In  Magento\Sales\Model\Order\Pdf\Invoice.php , there is  protected function _drawHeader() , which I want to rewrite in my module. I have tried both Model Class rewrite and Plugin rewrite. Plugin does not work because it is a protected method.

The other module  app\code\Fooman\PrintOrderPdf\Model\Pdf\Order.php  is rewriting public function getPdf().

Please advise what I should do, copy-paste the Fooman\PrintOrderPdf code in my module and add my rewrite, or is there a way to do it without touching the Fooman\PrintOrderPdf.

Thanks a lot!


texts: Mobile Exception design with different store view

texts:
I´m running 1.7.0.2
I have different store views I´m creating right now, and already have the design exception for the mobile version, now I need to create template exception for the mobile in different store views, how to do that without recreating the entire folder, let´s say in iphone_norwegian so it fall back to the iphone folder and not the default as it does right now?
There is an excpetion hyerarchy?


texts: How to make grid to load faster even though the table contains more than 100K records?

texts:
I'm facing a issue with a Magento site, Its on 1.7 version and We are having good server configurations.

We are using AheadWorks FollowUp extension, The email log table contains 100K records, The admin grid is taking 10minutes of time to load.

How to make the grid to load faster? Is there any way out.

We don't want to delete the records.

Everything is fine except that.

The table structure is :

mysql> desc aw_followup_queue;

+-----------------+-----------------------+------+-----+---------+----------------+
| Field           | Type                  | Null | Key | Default | Extra          |
+-----------------+-----------------------+------+-----+---------+----------------+
| id              | int(11) unsigned      | NO   | PRI | NULL    | auto_increment |
| code            | varchar(128)          | NO   |     | NULL    |                |
| created_at      | datetime              | NO   |     | NULL    |                |
| scheduled_at    | datetime              | NO   |     | NULL    |                |
| sent_at         | datetime              | YES  |     | NULL    |                |
| sequence_number | smallint(5) unsigned  | NO   |     | 1       |                |
| sender_email    | varchar(255)          | YES  |     | NULL    |                |
| sender_name     | varchar(255)          | YES  |     | NULL    |                |
| recipient_name  | varchar(255)          | NO   |     | NULL    |                |
| recipient_email | varchar(255)          | NO   |     | NULL    |                |
| subject         | varchar(255)          | YES  |     |         |                |
| content         | mediumtext            | YES  |     | NULL    |                |
| status          | enum('R','S','F','C') | NO   |     | R       |                |
| rule_id         | int(11) unsigned      | NO   | MUL | 0       |                |
| object_id       | int(11)               | NO   |     | 0       |                |
| params          | text                  | YES  |     | NULL    |                |
+-----------------+-----------------------+------+-----+---------+----------------+

Is there any mysql optimization will help to resolve this issue?

Thanks in advance.


texts: How to add custom dropdown button to Admin Sales Order View in Magento 2

texts:
I've followed this link to add custom button in Admin Sales Order View in Magento 2, and it works great. Now I want to replace this button with 3 dropdown options button. Something like changing store scope in Admin Panel. I want this 3 buttons to run same controller method with different parameters.
How can i achieve this?
Thanks in advance.


texts: Is it possible to include a phtml file from another module in my template in Magento 2?

texts: I'm making a Megamenu Module, where I want to include the phtml of a file in my MailChimp module (Signup Form). Is there a way I can call on this template from within another module?


texts: How to add tracking number programmatically for shipments in magento 2.3?

texts:
I want to add the tracking numbers only for created shipment.
I tried below approach and getting an error.

  We cannot create an empty shipment.

How can i add only the tracking number programmatically.

$orderNumber = '000000001';
$order = $this->orderFactory->loadByIncrementId($orderNumber);
if($order->hasInvoices()){

$shipment = $this->orderModel->toShipment($order);

foreach ($order->getAllItems() AS $orderItem) {

if (!$orderItem->getQtyToShip() || $orderItem->getIsVirtual()) {
                    continue;
                }
    $qtyShipped = $orderItem->getQtyToShip();

    $shipmentItem = $this->orderModel->itemToShipmentItem($orderItem)->setQty($qtyShipped);

    $shipment->addItem($shipmentItem);

  }

$shipment->register();
            $shipment->getOrder()->setIsInProcess(true);
try {

      $trackingIds = array(
         '0'=>array('carrier_code'=>'fedex','title' => 'Federal Express','number'=>'3131331230'),
         '1'=>array('carrier_code'=>'ups','title' => 'UPS Ground','number'=>'1312312')
                );
foreach ($trackingIds as $trackingId) {
       $data = array(
            'carrier_code' => $trackingId['carrier_code'],
             'title' => $trackingId['title'],
             'number' => $trackingId['number'],
         );
         $track = $this->trackFactory->create()->addData($data);
         $shipment->addTrack($track)->save();

         $shipment->addTrack($track);
         $this->shipmentRepository->save($shipment);

     }
$shipment->save();
$shipment->getOrder()->save();

// Send email
$this->_shipmentNotifier->notify($shipment);
$shipment->save();
enter code here


texts: Magento 2 : Unable to Run Integration Tests

texts:
I have a fresh installation of magento2 enterprise on my server, and just to get a feel for how unit tests work. I attempted to run these tests by executing following command. But before I executed this command, I did update dev/tests/integration/etc/install-config-mysql.php.dist with correct database credentials.

php vendor/bin/phpunit -c dev/tests/integration/phpunit.xml.dist

After running command, All I was given in response is unable to read dev/tests/integration/phpunit.xml.dist file. Event I change permission using chmod to 777 and tried again, but same result happened.

What am I doing wrong?


texts: Custom email template with PDF attachment

texts:
I have implemented "full product lising" page with all the products in all categories (With approximately 200 products, varies on adding new products). This is in a tabular format which has only two columns:

Project Name
Price

And I have implemented dynamic generation of pdf with all these 200 products.

Now my requirement is to send this pdf in an email to the specified email address. How can i do with magento? Do i need to create new email template with pdf attachment?

Please suggest a best solution.


texts: Problem with Magento Connect to upgrade (1.9.2.2 to 1.9.3)

texts:
Two days ago, I realized Magento 1.9.2.2 update to version 1.9.3 using Magento Connect (Mage_All_Latest). The process was all right until labeled in a certain way and now do not know how to continue it, because when I enter Magento Connect returns the error

  Unable to read the configuration file

. I have backup of the database but not the system.

The site works perfectly, front-end and back-end.

Any solution to return to the previous version updating or how to enter Magento Connect solving that problem?

Thank you very much.


texts: How can I have different catalog image sizes for different categories

texts:
I am building the website cuff and collar - www.cuffandcollar.com.au.

There are two different categories, one being tailor made shirts, the other being bow ties.

The tailor made shirts look great with the image thumbnails being the size they are, but the bow ties look terrible - there is far too much white space between the images.

My question is: Is there a way to have a different template for different categories, with different sized thumbnail images?

Any help is greatly appreciated.

Thank you.


texts: Magento : How to hide the default Store View code from the url

texts:
The site has 2 languages: English and French, represented by 2 store views. French is the default one. For our SEO efforts we need to have the following urls:

French - http://www.domain.com/category/product
English - http://www.domain.com/en/category/product

System -> Configuration -> Web -> Add Store Codes to URL is the all or nothing setting. i turn it off for the default store only. I’ve done a lot of searching through the forums and wiki but there’s nothing on the subject.

Please any sugestions?


texts: Magento2 Addtocart is not working after transfer site from one server to another

texts:
can you please suggest me I have transferred my site from one server to
another, all Magento functionality works except add to cart.
And checkout cart add controller return 500 error
I am getting below error in debug.log

Request validation failed for action
"Magento\Framework\App\Action\Forward\Interceptor"
{"exception":"[object]
(Magento\Framework\App\Request\InvalidRequestException(code: 0):
Invalid request received at
/home/simplecity/public_html/vendor/magento/framework/App/Request/CsrfValidator.php:105)"}
[]


texts: Magento 2 GIF Animation is not working on frontend -- no solutions for previous questions

texts:
I am trying to upload .gif image for few products , image is uploading from csv  successfully

and animation also working in admin panel.

But issue here is when i am checking this product on frontend - image is displayed but Animation is not working on frontend

But unable to find any solution.

please help me out on this.

Thanks...............


texts: Magento 2: How to call helper of other module if that module exists?

texts:
I want to call Helper of add-on module if that module is installed. I accomplish this by using ObjectManager, but as per Magento standards, ObjectManager should not be used.

namespace Vendor\Module\Block\System\Config;

use Magento\Mtf\Client\BrowserInterface;

class CustomClass extends \Magento\Config\Block\System\Config\Form\Field
{
    const TEMPLATE = 'system/config/custom.phtml';
    private $objectManager;

    /**
     * @param \Magento\Framework\ObjectManagerInterface $objectmanager
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\ObjectManagerInterface $objectmanager,
        array $data = []
    ) {
        $this->objectManager    = $objectmanager;
        parent::__construct($context, $data);
    }

    public function checkClassData()
    {
        // This checks weather this "Module1" installed or not
        if ($this->moduleManager->isEnabled('Vendor1_Module1')) {
            // As "Module1" is installed so i want to use Helper of this module.
            $dataHelper = $this->objectManager->get("Vendor1\Module1\Helper\Data");
            $this->firstData      = $dataHelper->getFirstFunctionData();
        }
    }
}

What should i do to fulfill my requirements without ObjectManager.

Please help.


texts: Sales order view custom tab and grid - Ajax problem

texts:
I have added a custom tab using xml layout updates to the order view in Magento. I have then added a custom grid to the new tab and enabled Ajax on the grid. I have set setUseAjax(true) and setSaveParametersInSession(true). I have overridden the gridUrl method to return the controller method that should be used. In the controller method, I call loadLayout and create the grid block in the response body.

What now happens is that when I try to sort or filter on the grid, the grid data is returned, but the Please wait... loading element from Ajax does not disappear once the data is returned. I have made other custom grids with the same setup and it has worked fine, but some reason or another, it is not working here.

Does anyone have any comments or suggestions as to what could be going wrong here?

I have viewed the following posts about this:

Grid action with ajax not working
http://www.webspeaks.in/2014/10/how-to-enable-ajax-in-magento-admin-grid.html
Grid in a Edit Form (backend) : Ajax is not working


texts: How I change the modal of adding address at checkout magento 2?

texts:
Currently the modal that I want to change is as in the image.
And where Line 1, Line 2 etc. is written, this is where I want to change, but this modal is done through the knockout and I can't find a way to change these labels and make the fields mandatory, how can I do that?


texts:
Magento 2 changed js file.

After change js file run following command.

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

php bin/magento setup:static-content:deploy zh_Hans_CN

In pub folder file has been change.

When I am trying to access .js file using url it does not show my changes.

Same things working in localhost. but not in live store zh_Hans_CN.


texts: Order summary messed up in Magento 2 checkout page

texts:
On my magento 2 store, order summary is messed up in checkout page, please give me a solution for this, please check the picture for example.

Thanks


texts:
After I have switch to PHP7 my customer data is not working see screenshot https://gyazo.com/e469216e2970fc3c1f55f354a22a46f7 Can somebody tell me how I can fix it ?

The only error I see is :

  Uncaught TypeError: Cannot read property 'select' of null(…)


texts: Magento 2 : Uncheck My billing and shipping address are the same checkbox in checkout payment page based on shipping method

texts:
I am working on magento 2.1.3.
I want to uncheck My billing and shipping address are the same checkbox in checkout payment page based on shipping method.

If shipping method is Store Pickup i want to uncheck checkbox by default.


texts: Magento2 migration data between dev site and live site

texts:
After I did data migration on magento2. We implement the new function on the Magento dev website. The current Magento 1 site is, the live site and running.

So, I would like to know: " How to migration data again on dev site from the live site after finished work on dev site?"

Do we need to do the migration again with null database or something?


texts: Download section no longer available for shared EE account on magento.com

texts:
Trying to download SUPEE-8788, we recognized that we don't have access to the EE download section anymore. The only thing we can see after switching to the shared account is the corresponding EE license info. Our client, owner of the license, told us they didn't change anything, and we had download access before.

Has anything changed on Magento's side regarding this?


texts: Flat Rate shipping price is not being applied at OnePageCheckout

texts:
I have set up flat rate shipping as such:

Enabled: Yes
Title: International Shipping
Method Name: International Shipping
Type: Per Order
Price: 14.99
Calculate Handling Fee: Fixed
Handling Fee: 0
Display Error Message: Default
Ship to Applicable Countries: Specific Countries
Ship to Specific Countries: Canada
Show Method if not applicable: Yes

However, when i get to the shipping method step, it displays
International Shipping: $0.00

and yes, I am using a proper Canadian address.

I have not modified OnePage.php at all, so it should be grabbing the price I set on the back end, but it is not. Can anyone offer some insight as to whats going on?

UPDATE:

I've discovered that the shipping price will only be applied to customers that are logged in. If you check out as a guest, the shipping price will not be applied. Since there is no way to set user groups for shipping options, there is no way to resolve this as of yet.


texts: Uncaught TypeError: Argument 2 passed to... must be an instance of - Magento 2.2.1

texts:
I'm trying to create a tab within the customer section of admin by following this tutorial: http://www.ibnab.com/en/blog/magento-2/magento-2-backend-create-custom-tab-in-customer-view-and-load-grid-inside-admin.

When i try to reach my controller:

PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Magento\\Customer\\Controller\\Adminhtml\\Index::__construct() must be an instance of Magento\\Framework\\Registry, none given, called in /var/www/mage2/public_html/generated/code/Vendor/Module/Controller/Adminhtml/Index/Index/Interceptor.php on line 14

I have a basic controller working however using the above tutorials controller i get that error when extending the controller to use the \Magento\Customer\Controller\Adminhtml\Index class. I have tried clearing di and generation folders but the error persists.

  Basic Working Controller:

namespace Vendor\Module\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;
use Magento\TestFramework\ErrorLog\Logger;

class Index extends \Magento\Backend\App\Action
{
    public function execute()
    {

        $this->_view->loadLayout();
        $this->_view->getLayout()->initMessages();
        $this->_view->renderLayout();
    }
}

  This controller doesn't work:

namespace Vendor\Module\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;
use Magento\TestFramework\ErrorLog\Logger;

class Index extends \Magento\Customer\Controller\Adminhtml\Index
{

     * Customer compare grid
     *
     * @return \Magento\Framework\View\Result\Layout

    public function execute()
    {
        $this->initCurrentCustomer();
        $resultLayout = $this->resultLayoutFactory->create();
        return $resultLayout;
    }
}

As previously stated it seems to break when changing the class that the controller is extending.


texts: Specifying an existing address for a user's billing / shipping?

texts:
I'm using the following:

  POST /V1/carts/{cartId}/shipping-information

  POST /V1/carts/{cartId}/billing-address

My idea is to have a form that allows people to select one of the addresses already associated with their account. In one example I have a customer with two addresses that have IDs of 31 and 32.

Rather then populate all the address details on the above fields, I was just wanting to pass an ID to say "use address 32" for Billing e.g.

[
    'address' => [
                    'id' => 32
                ]
]

I've played around with a few different arguments but no luck - is it even possible? Or, do I just need to use the address book to pre-populate all the standard fields?


texts: Magento 2 System Configuration Custom setting for Module not working

texts:
I have followed below link and created both "system.xml" and "acl.xml" at their respective locations.

https://stackoverflow.com/questions/32614392/magento-2-system-xml-in-custom-module

But instead of creating a custom system config tab and setting for this module, it gives error as following in a report generated:

a:4:{i:0;s:138:"Notice: Undefined index: id in /var/www/html/magento-2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 59";i:1;s:6805:"#0 /var/www/html/magento-2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php(59): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/var/www/html/m...', 59, Array)

Anyone can clarify what could be the issue?

/Darsh/Banner/etc/adminhtml/system.xml:

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

        <tab id="darsh" translate="label" sortOrder="300">
            Darsh Banner
        </tab>

            Helloworld
            <tab>darsh_banner</tab>

            <resource>Darsh_Banner::config_darsh_banner</resource>

        <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            General Options
            <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                Enabled
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>
    </system>
</config>

and /Darsh/Banner/etc/acl.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">

                            <resource id="Darsh_Banner::config_darsh_banner" title="Helloworld Section" sortOrder="80" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>


texts: magento 2.3 in live site css changes not taking it always taking old css which not exits

texts:
I am using magento 2.3.2 after development I have upload it in the live site and every thing was working perfectly then i hav installed mirasvit cache warmer in live then when ever i try to upload new css in live it not taking the the new changes.

I have tried by cleaning those file

var/cache
var/page_cache
var/view_processed
pub/static
generated

then i have run setup upgrade,compile,deploy,reindex,cache flush
but nothing work

even if i delete pub static still old css working.in page view source it shows it coming from pub static but pub static is already blank

And another thing is that in page view source it shows css in minify from but in admin it is not set as minify css.

Please can any one suggest me what i should i do now.


texts: Magento 2: Get attribute at which coupon condition fails and show it in a message

texts:
I need to show custom coupon error messages on frontend based on conditions.Where does the validation of coupon occurs when customer applies a coupon on the checkout page?
As far as I know, Magento\Quote\Model\CouponManagement::set is called.
In this function the following code applies the coupon code and recollects the quote totals:
$quote->setCouponCode($couponCode);
$this->quoteRepository->save($quote->collectTotals());

But after this I am not able to find where the validation occurs.
Edit: I am able to show custom error message for some validations by adding a plugin for Magento\Quote\Model\CouponManagement::set() method, but I need to show custom message to the customer for each cart condition also. For example, if the item does not belong to a certain category, or the subtotal of the cart is below the required amount, I need to show specific custom message to the customer.
Edit 2: I found that the validation of attributes is done in Magento\Rule\Model\Condition\AbstractCondition::validateAttribute(). This method is only returning true/false boolean value. I also need the attribute at which the coupon code fails and show it in the error message.
I need to get the attribute at which the coupon fails to apply and show it in a message to customer.


texts: How to retain exact Product Image Quality

texts:
I have modified view.xml to increase the Large image dimensions.

<image id="product_page_image_large" type="image"/>
        <image id="product_page_image_medium" type="image">
            <width>864</width>
            <height>864</height>
        </image>

So, my original product image & Lightbox Large Image have same dimensions.
However, there is visible degrading in quality of image.
If I remove the cache/hash..  & view/compare the uploaded image, the image appears degraded.

So, it appears file upload is processing my image even though it doesnt need to do anything, as dimensions are within limits.

Additionally, I have switched from GD to IMAGICK.

And via AminPanel I have set JPG quality to  100% & disabled Javascript Image processing while file upload.

Pl. help me understand how to stop Magento from re-processing my product images(large). I want it to take the image, as is.(if it fits within its dimension limit)


texts: Disabling HTML Escaping in Magento Backend

texts:
I'm using some Magento module and the option title is in HTML. I upgraded from Magento 2.2.3 to 2.2.10 and they obviously introduced escaping here, which wasn't there before.

Is there a way to stop this behavior in the backend?
Way to disable XSS protection in the backend?


texts: What files do I need to update after moving magento from "127.0.0.1" on one PC to another running on "localhost"

texts:
My friend and I are developing a magento theme together. His Magento installation was running on 127.0.0.1 and mine on localhost. After we've moved the files from his to mines the theme only renders the partially the header and no new CSS, or javascript seems to be rendered on my laptop.

I'm guessing the problem is because his server was different from mines being "127.0.0.1" and mines being "localhost" therefore the images, css, and javascript won't load on my PC.

What files do I need to update to fix this?


texts:
I would like to know how does Magento blocks pass data to its child blocks. Example:

<reference name="content">
    <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
        <block type="page/html_pager" name="product_list_toolbar_pager"/>
    </block>
</reference>

Here, if I take the block product_list_toolbar_pager out from product_list_toolbar_pager and create a block of type page/html_pager as a child block for the block catalog.view, it will not receive the data from the current collection I am visiting.


texts: How to create an order without paying for it

texts:
I've done some development work for an existing site and I want to test the Checkout process but I can't get passed the Payment step without actually paying. I want to bypass this for testing purposes. I'm using Onepage Checkout

Is there any way to do this?


texts: All language package not available in magento connect

texts:
I want to add a new language in my site frontend Nepali (Country Nepal). There will be two languages Nepali & English options in frontend. So as i explored about adding i can find the simple steps,

- Go to System > Magento Connect > Magento Connect Manager
- Install your desired language package

The problem is there isn't a language package available for this particular language so, how can i make one or overwrite existing one ? How is it possible ?


texts: want to show values in shopping cart page from custom table

texts:
Want to show values in the shopping cart page from the custom table.

So I need any tutorials or extension or any code please help me anyone.


texts: Magento 1.9 add coupon code to payment page

texts:
I want to add the coupon code to the payment page.

That works perfect, but when a coupon code is applied, it redirects back to the cart.

Is there a way to add the coupon code, without redirect to the cart? So maybe a way to use Ajax in the coupon.phtml template or change the redirect to the payment method?


texts: When i want to checkout sometimes then error will be show i am using (Elavon Payment Method)

texts:
[2020-08-18 09:43:25] main.CRITICAL: SQLSTATE[42S02]: Base table or
view not found: 1146 Table 'eshoppy_porto.installments' doesn't
exist, query was: SELECT main_table.* FROM installments AS
main_table WHERE (order_item_id = '89') {"exception":"[object]
(Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S02]: Base table
or view not found: 1146 Table 'eshoppy_porto.installments' doesn't
exist, query was: SELECT main_table.* FROM installments AS
main_table WHERE (order_item_id = '89') at
/var/www/html/eshoppy_porto/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110,
PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not
found: 1146 Table 'eshoppy_porto.installments' doesn't exist at
/var/www/html/eshoppy_porto/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"}
[]

that is error in my expection.log file please answer me as soon as possible


texts: How to Recieve array in request in Custom REST API in Magento 2

texts:
I am working on a custom API in which user will pass the request like below in JSON.
{
"cartItem": [
{
"sku": "11223344",
"qty": 1
},
{
"sku": "55667788",
"qty": 1
}
]
}
I tried to get it done like this.
interface CartItemInterface extends CustomAttributesDataInterface
{
    const CART_ITEM = 'cartItem';

    /**
    * Return list of Cart Items
    * @return \Test\TestApi\Api\Data\CartItemListInterface[]
    */
    public function getCartItem();

    /**
    * @param array $cartItemList
    */
    public function setCartItem(array $cartItemList);

}

But it gives me this error every time, after so many changes in the logic.
"message": "Property "0" does not have accessor method "get0" in class Test\TestApi\Api\Data\CartItemInterface,
Please help me with code how to fix this problem and receive this request in which multiple array of key value pairs.


texts: How we can list collections from two different tables into single admin grid in Magento 2.3.4?

texts: I want to show datas form two different tables in a single Magento admin grid. There is no foreign key relation between these two tables.


texts: Magento 2 : How to Override vendor files in my custom theme

texts:
How to override below admin file in my custom admin theme ?

/vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml


texts: Magento 2 integration with AWS Elasticsearch service

texts:
I'm trying to connect my Magento to AWS elasticsearch service but I can't get a successfull connection.

Magento is running on an AWS EC2 instance which the IP address is allowed on Elasticsearch access policy. ES is version 6.8, and Magento 2.3.1.

In

  stores configuration > Catalog > Catalog > Catalog Search

I've tryed to configure it with the given endpoint in ES service admin panel on AWS, with ports 9200, 9300, 443, 80 and could not connect

My Elasticsearch doesn't have an user and pass to set HTTP auth.

Does anyone have made this integration and can help me out?

Thanks!


texts: Indices Missing from index_process table

texts:
Having recently installed the Algoliasearch module on a client's site, I've found that its indices are missing from the index_process table. This was not an issue we had on any QA environments nor dev.

Following the module installation, we ran all install and upgrade scripts, cleared cache, and reindexed. Updating all indices (n98-magerun.phar index:reindex:all) does reindex the Algolia ones, but getting a list of indices and viewing them on admin doesn't show them.

It seems pretty clear that some standard action that adds these didn't run, but I'm not sure what should. It's also possible to take the rows from a different environment that correspond to Algolia indices and add them to the table (the indexer_code is really the most important and a known value)

Has this happened to anyone else? How can I resolve it?


texts: What happens to mage-cache-storage (local storage) when the browser window is closed?

texts:
Magento uses mage-cache-storage (local storage) for local storage of visitor-specific content that enables ecommerce functions. The Expiration policy is session.
Suppose customer is using the website after logging in and went to checkout. Now this local storage object has the customer's information including the address.
What is going to happen if customer closes the browser window and then never opens the website on the same browser.
Does the browser will have this information and if no then how it is clearing it?
It would be great if someone can points me in the right direction,
thanks in advance


texts: Magento 2: Product page price label ($10.10-$70.0)

texts: Magneto 2 product page price labels this type as soon as($10.0-70.0) https://prnt.sc/olzchv


texts: some category image not showing magento 2

texts:
My Code is

$_obj = \Magento\Framework\App\ObjectManager::getInstance();
$category = $_obj->create('Magento\Catalog\Model\Category')->load($cat_id);
$fullCategoryPath = $category->getImageUrl();
echo $fullCategoryPath;

It is working for some categories and not working for some categories. But both have category image.


texts: Magento2.1.0 Order Grid not displaying Search and Filter option in Admin

texts: I recently have upgraded the Magento2.0.7 to Magento2.1.0, once after upgrade, i couldn't able to see the Filter and search section in admin order grids other modules like products are having filters. Anyone came across this issue.


texts: How apply multiple discounts to cart/quote in Magento 1?

texts:
I have situation where I need to apply two discounts at the same time in magento 1 cart.

One of them is Subscription product discount - catalog price rule
Second one is discount coupon - shopping cart price rule

As far I know that shopping cart rule overrides catalog price rule. I have come to app/code/core/Mage/SalesRule/Model/Quote/Discount.php file but I don't really know how to prevent this catalog price rule overriding.
What is data that is responsible for discount? I see only one discount

And which file/class is really need to be override to change discounts logic?
Thank you.


texts:
I work on the Magento CE 2.0.7 and now I have a problem with the quicksearch.

My SKU'S like 00.00.00 and i have set SKU attribute is searchable in the backend.
In the DB table 'catalogsearch_fulltext_scope1' you can find the entries for the SKUs.

There is no mods belong searching installed.

I searched by '01.00.00' or 01.00.00, returns no search results.

Could you help me or some ideas?


texts:
I am working on magento 2.3.0 and checkout is working fine with discount.

I have created discount code named 95TEST which discount 95% on order total.

Now, Every time when customer redirect to checkout page, above discount code 95TEST automatically applied. No need to do customer to enter discount code.

How to apply discount code automatically?

Regards
Hiren SHah


texts: How to add my phtml in admin create order page?

texts:
My code:

xml code:

<?xml version="1.0"?>
<layout version="0.1.0">
<adminhtml_sales_order_create_index>
    <reference name="root">
        <block type="clientpo/adminhtml_sales_order_create_client" template="clientpo/client.phtml" name="client" after="form_account" />
 </reference>
</adminhtml_sales_order_create_index>
</layout>

Block code:

<?php

class Module_Clientpo_Block_Adminhtml_Sales_Order_Create_Client extends    Mage_Adminhtml_Block_Sales_Order_Create_Abstract
{
}
?>

Phtml code:

<?php echo "Hii";?>

But its not working where i am wrong?


texts: How Change Shopping Cart Page Title programmatically

texts:
I follow this  link Change Shopping Cart Title   to change  Shopping cart to some text via language package.

I need to change Programmaticly Shopping cart Page title to MyCart

I try this

app/design/vendor/theme/Magento_Checkout/layout/checkout_cart_index.xml

    <?xml version="1.0" ?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
       <head><title> My Cart</title></head>

    </page>

Its not Working for me, Suggest me How to Do this...


texts: is there such a thing as a partial backup tool?

texts:
I am seriously struggling to get a decent backup to restore to my dev environment.

is there such a thing as a script which backs up a part of the database for this purpose?

for instance, I know i need the products and the variants, but i don't need to get any of the visitor logs tables.

Is there a script that gets say the first 30 required items from the tables that are absolutely required and skips the stuff that isnt?


texts: How to remove ?___from_store=de on the url? in Magento 2.2.3

texts:
how to remove ?___from_store=de on the url?

http://exsample.com/en/?___from_store=de

Please post genuine ans!

Updated after @Andreas von Studnitz Suggestion. (See File Structure)

In Custom Module di.xml

<type name="Magento\Store\Model\Store">
        <plugin name="cremove_query_string" type="Custom\Module\Plugin\Store\Model\Store" sortOrder="1" />
    </type>

In Custom\Module\Plugin\Store\Model\Store.php

namespace Custom\Module\Plugin\Store\Model;

public function beforeGetCurrentUrl(\Magento\Store\Model\Store $store, $fromStore=true)
{
    return [false];
}


texts: Search suggestion works, but search itself does not

texts:
When I use the quicksearch in my webshop, it shows the products that match (part of) what I type and even includes how many products match.

However, when I hit enter (basically loading catalogsearch/result/?q=SEARCHTHIS, I always get

  Your search returned no results.

How can I fix that?


texts: Magento 2.1.8 pdf href opening in a new tab

texts:
I am new in Magento and trying to modify an extension. I would like the href to open in a new tab. The code is as follows:

if ($itemRule['file_action'] == \Mageplaza\ProductAttachments\Model\Config\Source\FileAction::VIEWONLINE) {
    $href = $block->getUrl('mpattachments/file/viewonline', ['id' => $itemRule['file_id'], 'product_id' => $block->getProduct()->getId()]);
} else {
    $href = $block->getUrl('mpattachments/file/download', ['id' => $itemRule['file_id'], 'product_id' => $block->getProduct()->getId()]);
}

I Would highly appreciate some help.


texts: Hide Price for a particular customer group

texts:
How can i hide the price of products for a particular customer group?
I want to hide the price everywhere for this customer including checkout,cart pages.


texts: Magento2 override block from theme level without custom module

texts:
I currently have a Magento_Shipping folder in my theme which is overriding the frontend files from magento/module-shipping

Is it possible for me to override the block files from theme level without having to create a new custom module?


texts: How to use FIND_IN_SET on a multiselect attribute filter with an AND condition?

texts:
I have a product collection which is being filtered on a custom multiselect attribute called 'apartment_includes'. This is used on a site for people looking to rent a room for a short period of time. The idea is to allow the user to specify the things that they want in a room, and select from the returned items. However, the query being generated at the moment uses

 AND (((FIND_IN_SET('34', e.apartment_includes)) OR (FIND_IN_SET('33', e.apartment_includes))))

meaning that it will return rooms that have air conditioning OR a balcony, instead of only returning rooms that have both, which is somewhat counter-intuitive for a user.

The filter is being set as follows:

foreach ($filters as $key => $filter) {
    $_productCollection->addFieldToFilter($key, $filter);
}

I have done a lot of searching and can find plenty of information on how to force the use of OR, but nobody mentions how to do the opposite.
Can anyone suggest how I can achieve this please?


texts:
I'm looking to change the size of the default swatch thumb in the layered navigation.

I've tried changing the view.xml from the theme and running:

php bin/magento catalog:images:resize

The command is successful but no image sizes change.

This is the main post I've looked at.

In view.xml I have:

    <image id="swatch_image" type="swatch_image">
         <width>120</width>
         <height>90</height>
    </image>


texts: Magento 2.1.1 An error occured on the server please try again at checkout

texts:
for a while we've been getting an error when checking out with Braintree using a sandbox account. we simply get the error

'An error has occurred on the server, please try again"

The error occurs when hitting the checkout button

I've tried removing the table prefix and running the SQL fix but the error still persists. There is nothing incorrect in the Braintree configuration as the dummy payments are being sent and verified in the sandbox account & our host confirms there are no server errors causing it so it must be a Mage issue.

We're at a point now where we are totally flumuxed on the issue...


texts: Magento2 website showing all blank pages

texts:
I am  new in magento2. I have created one new custom module. I have installed custom module. after installing website showing all pages blank.

after installing i run following commands.

  php bin/magento module:enable module name
  php bin/magento setup:upgrade
  php bin/magento cache:clean

when i run this command then website showing all pages blank.


texts: CSS is not loading on the frontend in Magento

texts:
We are facing an issue with the css styling in Magento store. I tried refreshing the cache in admin but that didn´tt fix the issue.

Use

Varnish as external cache
NGINX
Magento 1.7.0.2
Ultimo as the theme

I assume that the theme files are not loading but we are unable to find a correct solution for this.

What steps should we take to resolve this issue?


texts: Shipping rates not displaying correctly - using Matrixrate from WebshopApps

texts:
Using Free version of Matrixrate for shipping rates outside of UK. Rates are calculated based on Country and Weight (with 7 weight bands). For example...

shipping a 150g item to the France should cost £3.50
...and so on up to 12kg
shipping a 12kg item to the France should cost £43.50
shipping a 150g item to US should cost £3.75
...and so on up to 12kg
shipping a 12kg item to US should cost £47.50

However, shipping rates for all countries are returned as per the lowest weight item. So the 12kg item going to the US is £3.75 instead of £30.

My spreadsheet is set up as per the image below. Am I missing any columns?


texts: Magento 2 custom style sheet for my custom theme

texts:
i created a file called breakpoint.less in pub\static\frontend\vendor\themename\en_US\css\source and it produces the output as breakpoint.css in pub\static\frontend\vendor\themename\en_US\css\source is it a correct way to create a custom less file in Magento 2.

can anyone help me and please explain the correct way to override the theme stylesheet


texts: I have a shop in magento and I need my products appear on Amazon. I do not know how to start looking on the subject and would like your help. I already have an account with Amazon AWS but I unaware of the next steps. Another thing I'd like to know is if there is a free extension to make this integration.


texts:
In my shopping cart there is an edit button for each product!
I would like to know how do I get to that phtml page for edit?
I don't seem to see an edit.phtml or such

I'm passing in a parameter from the shopping cart and would like to see if it got there okay :)


texts: Magento2 : You don't have permission to access js on shared hosting

texts:
When I open the console, I find many errors related to js files not being accessed and when I click on any file I get

  You don't have permission to access /pub/static/frontend/Magento/luma/fr_FR/underscore.js on this server

I tried to change files/folders permissions to check, I even set permissions to 777 on everything but still the same problem. On my local machine, everything is working fine but on the shared server I still have issues only with js files and icons in the backend. css files are loaded.

Any help would be really appreciated as I'm struggling with this for a week now.


texts: How to decrypt cart id for guest customer through a plugin

texts: I have this aroundSavePaymentInformationAndPlaceOrder method in my plugin and my goal is to get the quote information during payment. For some reason the quote id for guest customer is encrypted. Does anyone know how can I decrypt it?


texts:
Keypress is not working in field input in Magento 2

This is my form:

My jquery

$("input[name$='general[stocktaking]']").keypress(function(event){
    var keycode = (event.keyCode ? event.keyCode : event.which);
    if(keycode == '13') {
        //code here
    }
    event.stopPropagation();
});

I tried $(".admin__control-text") but it not work


texts: Magento 2 overriding core js file not working

texts:
I have a core js file that I want to override, but everything I have tried has failed, including essentially copying the method used by another core file being overridden that does work. Here is what I have in my requirejs.config.js so far:

var config = {
    map: {
        "*": {
            'Magento_Checkout/js/view/minicart':'js/view/minicart', //This one is overriden properly
            'Magento_Checkout/js/action/place-order':'js/action/place-order' //This one won't override
        }
    }
};

Here are the paths to both files that won't override:

core file: vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js

override file: app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/action/place-order.js

And for reference, here are the paths to the one that IS being overridden:

core file: vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js

override file:

app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/view/minicart.js

I am using Magento 2.2.6 as well.

I have cleared the cache multiple times and because I am in a dev environment, I don't need to deploy static content, but I tried it anyway, still didn't work. I can't figure out why one would override and the other doesn't.

Any help is appreciated.


texts: Product image uploading issue from external path magento 2?

texts:
I am uploading images from an external URL. Image uploaded in the dir but getting an error message:

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


texts: Simple way for a store view distribution page

texts:
We have an international store and the option to include the store view URL, i.e. URLs like

http://www.example.com/de
http://www.example.com/us
http://www.example.com/et

When the user opens, http://www.example.com/ we want to show an entry page with links to the different countries.

How to accomplish that?

My current approaches:

Create an additional store view "landing", edit the CMS page "home" (I think I would need some tweaks to show this store view under the / URL)
Or set the setting web/default/cms_home_page globally to a CMS page, lets say "landingpage". Overwrite it in the real stores.
???

Edit - additional: In our case we also use the "default" site as a template (for CMS pages) which we copy to the different countries - so this site is kind of impossible to use in production.

Edit - see @kalenjordan commeting on my Answer


texts: How to debug broken cache in Enterprise 1.14.2.0 with FPC enabled?

texts:
I have a strange problem on one Magento Enterprise project (v. 1.14.2.0). Few hours after cache cleaning customers saw white page while customer trying to login for guest user it's working

Fatal error: Uncaught Error: Call to a member function setSkipRenderTag() on boolean in /var/www/project/app/code/core/Enterprise/PageCache/Model/Container/Minicart.php on line 41 Call Stack: 0.0002 645808
1. {main}() /var/www/project/index.php:0 0.0006 786880
2. Mage::run() /var/www/project/index.php:91 0.0015 1151072
3. Mage_Core_Model_App->run() /var/www/project/app/Mage.php:684 0.0811 5079848
4. Mage_Core_Controller_Varien_Front->dispatch() /var/www/project/app/code/core/Mage/Core/Model/App.php:354 0.0845 5538080
5. Mage_Core_Controller_Varien_Router_Standard->match() /var/www/project/app/code/core/Mage/Core/Controller/Varien/Front.php:172 0.0855 5590776
6. Mage_Core_Controller_Varien_Action->dispatch() /var/www/project/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php:254 0.1336 8047848
7. Enterprise_PageCache_RequestController->processAction() /var/www/project/app/code/core/Mage/Core/Controller/Varien/Action.php:418 0.1604 8722832
8. Enterprise_PageCache_Model_Container_Abstract->applyInApp() /var/www/project/app/code/core/Enterprise/PageCache/controllers/RequestController.php:38 0.1604 8722832
9. Enterprise_PageCache_Model_Container_Minicart->_renderBlock() /var/www/project/app/code/core/Enterprise/PageCache/Model/Container/Abstract.php:109

Method form Enterprise_PageCache_Model_Container_Minicart class.

protected function _renderBlock()
{
    $layout = $this->_getLayout('default');
    $block = $layout->getBlock('minicart_head');
    $block->setSkipRenderTag(true);        // this line throws exception
    return $block->toHtml();
}


texts: Using Soap the get product details is very slow

texts:
I'm working on an offline cash register application.
I write this in C# and use the SOAPv2 API to get the products.
These products I save in a local SQLite database.
So far this is working well, but it is very slow.
Using catalogProductList() I can get all products in one call, this is great. But the returned product had very limited details, only Name and ProductId are useful.
So I need to call catalogProductInfo() for every product to get the needed attributes like Price, Barcode and Stock.

Every call takes about 25s so it takes 16 hours to get the details of all 2300 products.

I've been looking for a method that combines catalogProductList() and catalogProductInfo() to get my attributes in one call for all products, but so far I haven't found it.

Any advice to increase the performance?


texts:
I've got a Magento CE store that sits behind a proxy and doesn't have outgoing internet access.  Obviously this causes problems with Connect Manager and trying to grab updates.  To get round this, I have access to a web proxy but there's no way of setting Connect Manager to use a proxy unless I directly edit downloader/lib/Mage/HTTP/Client/Curl.php. This causes problems as each update replaces the file and removes my proxy edits.

What I want to know is if it's possible to extend/override Magento Connect classes like you can for Magento itself.


texts: How set custom Row Total in Checkout page(Order Summery Block) in Magento2?

texts: Checkout Shipping address page I need set custom item row total..how can i do???


texts:
I am new in magento and a little confused to how to start work in it.
I studied the basics of magento and found its structure really complex.

I never worked on a CMS before and I have a little knowledge of php and html but I am not good in css.

Should I learn the css before start working in magento or it will not be a big problem.

What are the easiest steps for learning magento. Please give me some ideas.

Thanks.


texts: Setup version for module is not specified in magento2

texts:
I was trying to create a new module in magento2. I followed all the steps to create the module but I am still getting the below error :

"Setup version for module 'TW_Newmodule' is not specified. "

Please help me. What am I doing wrong in my module ?

Path of the code is app/code

You can download the code from here http://184.107.158.214/TW.zip .

Thanks in Advance


texts: How to create a category in Magento using SQL

texts:
My attempts at creating a category with PHP fails while flat_categories are enabled in the system. Reference here.

So, I want to create a new category in Magento 2 using SQL. How would I do that?


texts: Check for duplicate customer address in magento?

texts:
I am going to add some addresses in my customer account via CSV but at that time I want to check any of the addresses i.e. in CSV is exist in my address book?
I Know, I need to compare whole row, Is there any way rather than custom query?
Please Suggest.


texts:
I am creating a module and right now I have created only the config.xml:

<config>
    <modules>
        <Namespace_moduleName>
            <version>1.1.0</version>
        </Namespace_moduleName>
    </modules>
</config>

And Namespace_modulename.xml:

<config>
    <modules>
        <Namespace_moduleName>
            <active>true</active>
            <codePool>local</codePool>
        </Namespace_moduleName>
    </modules>
</config>

What is the best practice to include a javascript file?
Also where should I put the javascript?


texts: So confused. Where to edit ACCOUNT / CART

texts:
I checked .csv files under languages folder. Couldn't find where to change this section(EDIT THE TEXT):

Thanks!


texts: https://www.stormboy.com.au/ Check Website Console There is Jquery Conflict Error. Can anyone help me to solve the same


texts: How to get currently selected product id of configurable product on view page?

texts:
I need to change name, price, SKU and more when options are clicked.
So I need the product ID of the selected option in the product view page.
I have a Custom phtml file to write my own alteration in the product view page.
 How to get productId in this file on clicking the options?


texts: The SEO company wants me to put in h1 tags - where do I do that in the Magento shopping cart?

texts:
My SEO company wants me to put in the h1 tags to help with the Search engine rankings. Where can I put these in? Can I put them in using the admin panel or do I have to put them into the actual code?

Thank you so much for any suggestions.


texts: Magento EE 2.1.5 Deactivate Campaign manually

texts:
I need to deactivate a campaign manually from database in Magento EE 2.1.5 . I searched a lot, but I did  not found any way to do that.

What are the tables which store the campaign's data? Any help?


texts: Slidesjs pagination image is always hidden but can on the function if mouse hovers over

texts:
Using Magento Go due to other users lack of developer knowledge.

Slidesjs has been added relatively simply and works except for the pagination, the image has been stored in the media storage system, but I cant access it from the css code added to the theme in the customise section.

code is below:

.pagination li a {
display:block;
width:12px;
height:0;
padding-top:12px;
/*background-image: url(’../HomePage/Icons/pagination.png');*/
background-position:0 0;
float:left;
overflow:hidden;
}

The code is currently edited out simply due when its enabled the slider itself stops working, however the pagination image doesnt appear anyway.

But enough digressing, from the css code in the theme customise section, can a media storage image be accessed and if so how is it done? I have tried various permutations all result in no image, almost as if it is hidden behind something, however I can access the background.png from the same CSS snippet placed into theme editor > customiser > CSS.

Also has anyone solved the pagination hidden issue with Magento Go and Slidesjs?

After reviewing more documentation I noticed this in the user guide:

background:url(../css_editor_images/imageName.gif) no-repeat }

which means the above should work but doesnt for some reason... will keep trying the workaround.


texts: I am trying to google it but I only get irrelevant results... How I can translate store view names in this language-switcher dropdown? I also tried "Translate Inline" but it doesnt give me more info. Check screenshot:


texts: Update quantity showing error in Magento 2.1

texts:
I update my shopping cart but it showing me fatal error:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Exception\InputException::__construct() must be an instance of Magento\Framework\Phrase, string given,
called in /home/uscvuy8bk5zu/public_html/domain.name/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121
and defined in /home/uscvuy8bk5zu/public_html/domain.name/vendor/magento/framework/Exception/InputException.php:51
Stack trace:
#0 /home/uscvuy8bk5zu/public_html/domain.name/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): Magento\Framework\Exception\InputException->__construct('Please note tha...')
#1 /home/uscvuy8bk5zu/public_html/domain.name/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): Magento\Quote\Model\ShippingAddressManagement->assign('15', Object(Magento\Quote\Model\Quote\Address))
#2 /home/uscvuy8bk5zu/public_html/domain.name/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentPro in /home/uscvuy8bk5zu/public_html/domain.name/vendor/magento/framework/Exception/InputException.php on line 51


texts: Magento 2 Join with ProductRepositoryInterface

texts:
I want to add join query with productRepository. Here is my class. Can anyone help with this.

I have used \Magento\Catalog\Api\ProductRepositoryInterface::getList() method to get product list and now i want to add join with other table.

I am getting products data.

<?php

namespace Example\Product\Model;

use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Api\SortOrder;
use Magento\Framework\Api\SortOrderBuilder;

/**
 * Class Productlist
 *
 * @package Example\Product\Model
 */
class Productlist implements \Example\Product\Api\ProductlistInterface
{

    /**
     * Product repository
     * @var ProductRepositoryInterface
     */
    private $productRepository;

    /**
     * SearchCriteria builder
     * @var SearchCriteriaBuilder
     */
    private $searchCriteriaBuilder;

    /**
     * SortOrder builder
     * @var SortOrderBuilder
     */
    private $sortOrderBuilder;

    /**
     * ListProduct constructor
     *
     * @param ProductRepositoryInterface $productRepository
     * @param SearchCriteriaBuilder $searchCriteriaBuilder
     * @param SortOrderBuilder $sortOrderBuilder
     */
    public function __construct(
        ProductRepositoryInterface $productRepository,
        SearchCriteriaBuilder $searchCriteriaBuilder,
        SortOrderBuilder $sortOrderBuilder
    ) {
        $this->productRepository = $productRepository;
        $this->searchCriteriaBuilder = $searchCriteriaBuilder;
        $this->sortOrderBuilder = $sortOrderBuilder;
    }

    /**
     * Get list of products
     *
     * @return ProductInterface[]
     */
    public function getProductList($params)
    {
        // Create the SearchCriteria
        $searchCriteria = $this->searchCriteriaBuilder->create();

        // Load the products
        $products = $this->productRepository
            ->getList($searchCriteria)->setSearchCriteria();

        foreach ($products->getItems() as $product){
            echo $product->getName();
        }
        exit;
    }

}


texts: How to add javascript/jquery to product custom attribute?

texts:
I have created two attributes from magento catalog attributes. I want to hide and show attribute on basis of second attribute value. I added a js file to the main.xml file like this :

<action method="addJs"><script>mage/adminhtml/custom.js</script></action>

Now i want to alert a value of attribute for that i added alert($('#is_product_returnable').val()); to the custom.js file.

But its not working. How can i achieve this using my custom.js file or is there any other way i can hide/show attribute?


texts:
Magento version: 2.0.0

I have added some products into cart and checked it in the session. but there is empty when open the checkout/cart page.
I used the Magento_Checkout Module to test.
PS: there has a table to store the product of cart in database? just only in the session?


texts: How to show the all products by using REST API in magento1.9?


texts: Setting up simple configurable product for bikini sets

texts:
I’m setting up an online store selling swimwear. I have a number of products (bikinis) and need to allow customers to select either the set, or the top and bottom separately with different size bikini tops and bottoms.

Customers can purchase the bikini as a whole (top & bottom) and still choose separate sizes for the top and bottom. This option will be R1050. Alternatively, customers can opt to select a bikini top and not the bottom and vice-versa. With the separate option they will still be able to choose their size depending on which half they chose. The top half will have its own price (R550) and the bottom half will also have its own price (R500).

When customers make their selection (both; top only; bottom only) only the specific prices for the options they chose need to come up.

As you can see in the link I provided, (http://www.heidiklein.com/abaco-beach-eyelet-rope-padded-bkini), they have integrated exactly what I am looking for.

Are you able to help me find a solution?


texts: How to get Magento logo link without index.php

texts:
Clicking on logo will redirects to the Homepage.

Ie.  www.example.com/index.php through getUrl('') from the header.phtml page.

Is it possible to get only www.example.com without index.php?


texts:
I created a custom block on the category page to show category title full width after the menu. For that, I created one XML code on local.xml of the theme layout file.

<catalog_category_default>
      <reference name="content">
        <block type="catalog/category_view" name="categpry_page_info" as="topCategoriInfo"
                           template="page/category_info.phtml" before="category.products"/>
    </reference>
     </catalog_category_default>
     <catalog_category_layered>
       <reference name="content">
        <block type="core/template" name="categpry_page_info" as="topCategoriInfo"
                           template="page/category_info.phtml" before="category.products"/>
     </reference>
     </catalog_category_layered>

and created one file category_info.phtml in page folder.

Now whatever I write in this file comes out but it stays inside the container, while I want it to be full width. Is there a way to move the block immediately after the menu so it can come out of that fixed-width container?


texts: Can't make overwrite of system_store_edit_form to work

texts:
I need to add extra fields in multi store edit view, but currently I'm stuck with extension code, and seems that extension is not loaded?

My xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Lso_Adminhtml>
            <version>0.1.0</version>
        </Lso_Adminhtml>
    </modules>
    <global>
        <blocks>
            <adminhtml>
                <rewrite>
                    <system_store_edit_form>Lso_Adminhtml_Block_System_Store_Edit_Form</system_store_edit_form>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>
</config>

As far as I understand my class Lso_Adminhtml_Block_System_Store_Edit_Form

should be called for rendering and die()?

/app/code/local/Lso/Adminhtml/Block/System/Store/Edit/Form.php

<?php class Lso_Adminhtml_Block_System_Store_Edit_Form extends Mage_Adminhtml_Block_System_Store_Edit_Form{

    public function __construct()
    {
        die(123);
    }
}

?>

What I am missing here?

Thanks in advance!

Update: one more file /app/etc/modules/Lso_Adminhtml.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Lso_Adminhtml>
            <active>true</active>
            <codePool>local</codePool>
        </Lso_Adminhtml>
    </modules>
</config>

Update: mangento version 1.9.1.1


texts: Is it possible to reduce the default varchar size in catalog_product_flat? (M2)

texts:
I have a seemingly common problem. With too many custom attributes that are necessary and no way to change them in a way that would make the use of the default flat catalog possible I am searching for another solution.

Magento by default sets the size of attributes stored as varchar in flat tables to 255, which in my case is unnecessarily long. I could totally live with a size of 65, which would also bypass the MySQL limitation problem.

I have found hints on how to adjust Magento 1 in that way but not a single clue on how to do that with Magento 2. What I would like to know is:

Wether or not this is possible at all, e.g. where to find the sizing in the code,
And if it is, what kind of problems could emerge doing it.

UPDATE:
I have found a way to do it, which seems really convenient. I added

if ($fieldName != "description" && $columnLength > 200){
   $columnLength = 65;
}

right before

$table->addColumn($fieldName, $fieldProp['type'], $columnLength, $columnDefinition, $columnComment);

in Magento/Catalog/Model/Indexer/Product/Flat/FlatTableBuilder

Creating the flat table now works like a charm, but my second question remains: What kind of implications could this have?


texts: Store view for CMS->Pages grid preview link

texts:
Is there any way to change store view for CMS->Pages without code modification?

I am asking this because I built a custom modul CMS->My module which has similar grid as Pages (this is why I gave Pages as example). My module grid has preview link inside. For preview link I took default store view. By my customer says that he wants to be link for selected store view. I am confused because for CMS->Pages there is no select store view selection. It is only for System->Configuration. How he can change store view for CMS->Pages grid. Am I missing anything?


texts:
I noticed if we type /magento_version along with site url then it displays our magento version. So anyone with bad intention can check my version and exploit it.

to prevent this I can disable the magento_version module from command line but not sure disabling this module will impact on any other feature. In code I noticed they are only using controller to display the info.  But i am not sure it's used elsewhere or not. Also, possible magento use it for API or something or for composer based upgrades?

Will there be any negative impact if we disable? Should i hide my version number publicly? Is it good to hide it?

Any help would be appreciated.


texts: Magento 2.3.2 : How to clear magento database after testing

texts:
I am currently doing a lot of tests in Magento so I can get familiar with it. Unfortunately the database is extremely cluttered with my tests. I wish to clear up the database so I can start over again. This means doing the following:

Clearing all products
Clearing all attributes
Clearing all attribute sets
Clearing all categories
Clearing all orders, shipments, transactions etc.

I have found solution here : Clearing Magento after testing but its for Magento 2.1

Can anyone help for Magento 2.3.2?


texts:
After the customer completed the checkout I would like to send him a custom invoice as email, not only the HTML version. I found pages about custom PDFs but not how to add those PDFs to the order mail.

I found an module for this but it's not for current versions.


texts: Multistore setup how to use all allowed languages

texts:
I have a module which uses the customerformfactory to create a customer_address entity.
    $addressForm = $this->_customerFormFactory->create('customer_address', 'adminhtml_customer_address');

In this entity there are the allowed countries for the default store (austria, france, germany ...). However i want to allow all the countries that are enabled in all stores. The store for uk allows united kingdom, and the us store alows united states.
Is it possible to get all these countries in this module?


texts: Magento 2 Generate static files without gulp

texts:
Has anyone tried to generate static sass files without gulp?
I want to do the same as when I execute the following commands...

gulp deploy --theme Namespace/Theme
gulp sass --theme Namespace/Theme

Also, I've tried with...

cd pub/static && find . -depth -name .htaccess -prune -o -delete
rm -rf var/cache/ var/generation/* var/page_cache/* var/view_preprocessed/*
bin/magento setup:static-content:deploy -f

... but my css and js files are not generated.

Greetings


texts: check all check boxes with just one click

texts:
I have one check box on the top of the page.
scenario: I want to check all checkboxes on each line by just clicking that top check box and uncheck all the checkboxes on each line by unchecking that top check box.
I have pagination so I want to work the above scenario only for the current page, not other pages.


texts: Why does new api module needs composer.json?

texts:
I followed alanstorm's magento 2 guides and now I am
in Magento world for a little more than a month.
https://alanstorm.com/category/magento-2/#magento-2-mvc

I've come across this tutorial about creating rest-api
https://webkul.com/blog/magento2-custom-rest-api/
it says to make a composer.json and I don't actually know why
I need this or where to use this.

I didn't make composer.json file to make
non-api modules and it worked fine.


texts: Magento2: Installing stack on windows subsystem

texts:
I am unable to access website on my system
I also whitelist domain in hosts file
I followed steps to install magento stack using installation
Please guide


texts: Avoiding the select a store option when placing orders

texts:
I have a Magento EE site with two store views, the default store and a mobile store. When creating orders in the admin I would like to skip the step that asks the user to select a store, e.g. all orders would be placed under the default store.

Mage_Adminhtml_Block_Sales_Order_Create_Form::getStoreSelectorDisplay():

     $storeId    = $this->getStoreId();
     $customerId = $this->getCustomerId();
     if (!is_null($customerId) && !$storeId) {
         return 'block';
     }
     return 'none';

It looks like if I add $this->setStoreId(1) in the constructor (or somewhere) then the store selector will never be displayed and the order will be created under the store of my choosing. My question is, is there a better way to do this?


texts: Try to upgrade Magento 1.6 -> 1.7 via Connect

texts:
I try to upgrade Magento 1.6.2 to 1.7 via Connect.

In the field "extension key to install" i paste: connect20.magentocommerce.com/community/Mage_All_Latest but it nothing happens. Here's a screenshot: http://pbrd.co/16L4iw0

It looks like it want to upgrade to 1.6.2, but as it already is 1.6.2 so nothing change.

Do I use the wrong extension key? Where is my mistake?

The HowTo upgrade I use: http://www.expertmagentodevelopers.com/blog/how-to-upgrade-from-magento-1-6-1-to-1-7-0-using-connect-manager/


texts: I'm creating a PDF file with a link and I need to open the link in a new window. How can I do that?


texts: How to change the thumbnail images along with the base image of configurable products?

texts:
When I click on color swatches in product details page only the respective base image is changing . I want to the related set of thumbnail images also to change with respective to the selected swatch.

  Note: I do not want to use any extension.

Please help.


texts:
I am using a Magento 1.9.1 installation with Ultimo Theme. It is running two websites at the same time. This has been working for two years.

Recently, I decided to create a whole new website on the same installation. Unfortunately, all special characters and icons appear as blank squares (similar to     ❏) on the new website. I think these characters and icons are provided by Font Awesome.

While the new website looks broken this way, the two old ones don't have the error.

Is there anything I have done wrong to get this result? Is there any quick solution for that?

If not, is there any way to copy entirely a website into another website to avoid the problem?

Thanks.

Cg


texts: Product view page: Error on Display Product Images per Selected color

texts:
Beginner on Magento 2, i'm creating a Product view Page, and i'm having Problems to DISPLAY the Product Images, i just want to Display the images of the SELECTED COLOR, but it ONLY SHOWS the Configurable Product Images.
[
When i click in the color options, nothing happens.

Magento_Catalog/templates/product/view/gallery.phtml

<?php

/**
 * Product media data template
 *
 * @var $block \Magento\Catalog\Block\Product\View\Gallery
 */
?>

<?php

    $images = $block->getGalleryImages()->getItems();
    foreach($images as $key => $image){

        $mainImage = current(array_filter($images, function ($img) use ($block) {
            return $block->isMainImage($img);
        }));

        $helper = $block->getData('imageHelper');
        $mainImageData = $mainImage ?
            $helper->getDefaultPlaceholderUrl('image'):
            $mainImage->getData('medium_image_url');

        ?>

        <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder">
            <img
                alt="main product photo"
                class="gallery-placeholder__image"
                src="<?= /* @noEscape */ $image->getUrl() ?>"
            />
        </div>

    <?php  } ?>


texts: How to add addition order item info in Order email in Magento

texts:
I want to add addition info of order item, Please check below image

I have added below code in config.xml but it is not working.

<sales_email_order_items>
    <reference name="items">
        <action method="setTemplate">
            <template>yourdirectory/order/items.phtml</template>
        </action>
    </reference>
</sales_email_order_items>