texts:
I have created db schema and also write the code for upgrade schema.
Also changed the version in module.xml file.

After that i am running this comman "php bin/magento setup:upgrade" and running cache clean command but still my changes not getting update.

Also removed the folder from generated folder.

Is there anything else i have to do so get the changes?


texts: How to get all attributes of a product which Start with 'wdb_' in Magento 2?

texts:
I want to get all attributes of a product which start with "wdb_" in custom tab.

For this, I am getting each attribute manually.

  For example: wdb_carat, wdb_info, wdb_clarity etc...

My Code is:

<?php $product = $block->getProduct(); ?>

        <?php if($product->getWdbMinimumCaratWeight()){?>

Carat:

                        <?php echo $product->getWdbMinimumCaratWeight(); ?>

        <?php } ?>
        <?php if($product->getWdbAverageClarity()){?>

Clarity:

                        <?php echo $product->getWdbAverageClarity(); ?>

        <?php } ?>
        <?php if($product->getWdbAverageColor()){?>

Color:

                        <?php echo $product->getWdbAverageColor(); ?>

        <?php } ?>
        <?php if($product->getWdbCut()){?>

Cut:

                    <?php echo $product->getWdbCut(); ?>

        <?php } ?>
        <?php if($product->getWdbShape()){?>

Shape:

                        <?php echo $product->getWdbShape(); ?>

    <?php } ?>

I don't want to get each attribute manually.

Can anyone help me to do this?


texts: Add multiple language store code in the url ? example:www.domain.com/fr , www.domain.com/en

texts:
I followed couple of answers on this and tried with creating a sub-directory for each store and copying two files index.php and .htacess from the root to the individual sub-directory. Then edit index.php file as:

$mageFilename = '/app/Mage.php';  to
$mageFilename = '../app/Mage.php';

$mageFilename = '/app/Mage.php';        to
$mageFilename = '../app/Mage.php';

require MAGENTO_ROOT . '/app/bootstrap.php';  to
require MAGENTO_ROOT . '/../app/bootstrap.php';

Mage::run('french_de', 'store');

Though i can access each store with with the URL as "domain.com/fr/" and "domain.com/en/", now when i click on any navigation menu, i get directed to the navigation menu of the default store.

I hope you would take you time to help me solve the issue.


texts: Magento2 - After migration product page only displays placeholder image

texts:
I have migrated from Magento 1.9 to Magento 2.3.5.
Media folder copied manually from Magento 1 to Magento 2.
Everything went well but on the product page correct didn't display instead Placeholder image appeared.
However images displays on the category page where list of products are available but when click on product that goes to product details page where the placeholder shows.
I tried with php bin/magento catalog:images:resize, media folder permission to 777 reindex, flush Cache etc.
But no luck.
Any help will be appreciate.
Thanks


texts: How to use Magento 2.3 and Cloudfare CDN?

texts:
I'm currently trying out the Cloudflare CDN (free plan), but I didn't notice much in website performance. My server was having "server load" problems and it did stop, but It seems the website's performance isn't much better.

I believe It's because of my Magento's CDN configuration:

So, which URL's should I use for static files and media files? I can't find information about that on Cloudfare's website and I don't know if I'm really retrieving the static files from there or elsewhere. I use Cloudflare's extension for Magento.


texts: $this->htmlEscape is not working in custom theme Magento 1

texts:
Custom developed Magento 1.x theme $this->htmlEscape function is not working though it's working on frontend/base/default theme.

Please suggest what cause it happening?

Thanks in advanced.

Edit (from deleted answer comments):

  @sv3v, yeah solved the problem. There was another error in the theme
  that was not related with $this->htmlEscape. I guessed wrong BTW
  thanks for your time and support.


texts: Magento 2.0 - Running additional code in a module after Product Save

texts:
I added additional fields to the Product New/Edit form and need to save them onto a new table in the database as well as post the data onto another website store api.  I have created the function to perform all of this but, I am not sure how this should be called.  Should I hardcode the function call inside the Product Save execute() function? or should I use the Productsaveafter observer?  How can I get the post data inside the execute function of Productsaveafter observer?

Thanks.


texts: Assign a template from a place other than local.xml

texts:
I'm creating a custom page for some categories, I'm filtering the different blocks that I need to use in the catalog/category/view.phtml, but in some categories I wanna use a template with 1 column, and others to use 2 columns.

Can I assign or change the template to use from router class? or some other place ?


texts: display special prices in excel sheet which displaying in site using catalog price rules

texts:
we have uploaded about 1000 products in a site.

we used "catalog price rules" to give discount for all products,

so special prices are displaying in site.

we want to get all those special prices in a excel sheet

when i use "export all products", special prices are not displaying in excel sheet in .csv format.

is there any option to display "special prices" in exc el sheet which we gave specail prices by applying

catalog price rules?

thanks in advance


texts: How to edit User Role Permissions in Database in Magento 2?

texts: Is there an alternate way to change the resources available to each user role? The "System" resource has been removed from the admin role, so alas, I can't access the role resource UI in order to restore these permissions. Any suggestions?


texts: Magento2 Create Account with password Webapi not working

texts:
Can anyone let me know how to use Rest webapi to create new customer account with password? i have used following webapi in postman but it won't allow me to add password field,rest fields working fine, Please do let me know if anyone have done this kind of things.please find screenshot of webapi I have used to create account:

rest/V1/customers


texts: How to cache (copy) the catalog database in a third-party app and keep it in sync?

texts:
We have a third party app that allows users to manage their catalog. The app uses the Magento API to fetch catalog data but it is very slow and it offers no pagination.

I want to cache the catalog database in this app's local database to avoid making API calls on every page load. The local database should remain in sync with the magento database but I do not require all of the catalog tables (and certianly not the EAV structure) to be copied. Because of this I'm thinking the sync process should be event-based and not rely on database replication tools. Both apps have APIs that can be called to update info on both sides.

Edit: I would be updating one product at a time and not the entire catalog. When a product changes on one said, I'd make an API call to the other side, sending information of what changed.

These are the events that I think I would need to watch to assure 100% sync:

In Magento (afterward, send update to external app)

Product is created/edited in the Magento Admin Panel.
A purchase is made and inventory is modified.

In external app (afterward, send update to Magento)

Product is created/edited from the app.

I think this should be enough to keep the information synced. Otherwise I'll have to do some cron jobs from both apps to compare against the other app every now and then. Or something of the sort.

Question:
Can anyone see something potentially critical that I've overlooked? Are there more events I should be aware of? Has anyone done something like this?


texts: How I can solve unable to save stock item in magento 2 while saving product

texts:
I deleted all the products and categories via

  SQL queries (i used this answer  https://magento.stackexchange.com/a/283404/73525 )

while saving new product I got the error Unable to save Stock Item

Exception.log

[2019-07-27 07:09:08] main.CRITICAL: Unable to save Stock Item {"exception":"[object] (Magento\\Framework\\Exception\\CouldNotSaveException(code: 0): Unable to save Stock Item at /home/goodma20/project1.com/vendor/magento/module-catalog-inventory/Model/Stock/StockItemRepository.php:183, Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`goodma20_test25072019`.`mg_cataloginventory_stock_item`, CONSTRAINT `MG_CATINV_STOCK_ITEM_STOCK_ID_CATINV_STOCK_STOCK_ID` FOREIGN KEY (`stock_id`) REFERENCES `mg_cataloginventory_stock` (`sto), query was: INSERT INTO `mg_cataloginventory_stock_item` (`product_id`, `stock_id`, `qty`, `min_qty`, `use_config_min_qty`, `is_qty_decimal`, `backorders`, `use_config_backorders`, `min_sale_qty`, `use_config_min_sale_qty`, `max_sale_qty`, `use_config_max_sale_qty`, `is_in_stock`, `low_stock_date`, `notify_stock_qty`, `use_config_notify_stock_qty`, `manage_stock`, `use_config_manage_stock`, `stock_status_changed_auto`, `use_config_qty_increments`, `qty_increments`, `use_config_enable_qty_inc`, `enable_qty_increments`, `is_decimal_divided`, `website_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '2019-07-27 07:09:08', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) at /home/goodma20/project1.com/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`goodma20_test25072019`.`mg_cataloginventory_stock_item`, CONSTRAINT `MG_CATINV_STOCK_ITEM_STOCK_ID_CATINV_STOCK_STOCK_ID` FOREIGN KEY (`stock_id`) REFERENCES `mg_cataloginventory_stock` (`sto) at /home/goodma20/project1.com/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []
[2019-07-27 07:22:56] main.CRITICAL: No such entity with id = 6300 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with id = 6300 at /home/goodma20/project1.com/vendor/magento/framewo


texts:
I'm attempting to send a POST request to a Magento 2 API that my co-worker launched. It's up and working. I've been able to get a response via curl, but because of pre-flight requests from the client I haven't been able to get a response.

Now, I know about the headers. We have 'Access-Control-Allow-Origin': '*' set already. The issue is that the OPTIONS request is being sent to determine the safety of the request (see here). Is there a way to handle this pre-flight OPTIONS request? If so, how?

Here's the other thing: my co-worker is receiving a response via curl, Ajax, and Ember.


texts: Server CPU overloads after trying to Insert Image in Magento

texts:
Basically I am trying to insert an image to the Homepage, and once I do so, server CPU raise and often causes error 500 or 501, and server restarts.

To insert an image I go to CMS--> Home Page--> Content--> Insert Image--> Click on the Folder in Storage Root called: Background.

There are 50 images in Background folder, and trumbnails take 1 minute to load, but while they are loading, server CPU raises and server restarts. This has starter only recently.

What is causing it ?


texts:
I need to set 3 lots of Terms & Conditions for the customer to accept before placing their order, however, I have two customer groups: Retail and Wholesale. I only need 2 of the Terms and Conditions to display when Retail customers make a purchase and I need all 3 of the Terms and Conditions to display when a Wholesale customer makes a purchase.

Is there an easy way to do this if any? I have pretty basic knowledge of html and css so I'm guessing I would need a pretty detailed explanation if modifying magento file is required


texts: Get values of your attribute option text from product

texts:
I want to get value of attribute option text from product based on store id. I want to get admin text for attribute option.

$attribute_option_id = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product_id,'my_attribute', $storeId);
        $product = Mage::getModel('catalog/product')
            ->setStoreId($storeId)
            ->setData('my_attribute', $attribute_option_id);

        $attributeText = $product->getAttributeText('my_attribute');

I am always getting value of default store view.


texts: How to Sort New Products at Home by Product Name

texts:
how to sort New Products at Home by Product Name ?

because I see to put it through CMS page in the Admin:

Admin - CMS Pages - home - Content :

{{widget type="catalog/product_widget_new" display_type="new_products" products_count="4" column_count="4" template="catalog/product/widget/new/content/new_grid.phtml"}}


texts: Associate to admin after registration in front end?

texts:
I have found many questions from people who have had the same problem. But I cannot find a solution.

Problem:
All customers who register on the front end (default Store, Website ID: 1) should be associated to admin.

I´m forced to allow login on all websites, so customers can login on the front end.

Anyone have an idea on how this bug can be solved?

ThanksManuel


texts:
This is my page(My_history)

From this page, I want to display detail of each product by each id

when I click on link View order, not just one Id is array example, I had researched in the folder, but I do not
understand, can anyone help me a hand, please?


texts:
I'm creating a block, and I wish it to have several child blocks that appear prior to the rendering of my main block.

Following the standards set in other, inherited classes, I can see the following:

public function _prepareLayout()
{
    $this->setChild('alias',
        $this->getLayout()->createBlock('modulename/block_name')
    );
    return parent::_prepareLayout();
}

If I follow the path to the parent _prepareLayout() function, it appears in exactly the same format. In addition, if I print out the $this->_children variable after the layout has processed, I get a list of elements that includes mine.

However, it's not rendering to the page and I've not idea what else I need to do output it.

My blocks are loaded programatically, i.e. without a layout or template file.


texts: Website has increased in size - Magento 1.8.1.0

texts:
I have had to just do a double take as I've realised our website is taking up near 46GB.. how can I find out what is taking up most of the space?

It is hosted on Ubuntu 12.04.5 LTS


texts: Magento 2 Custom Page Layout Not Working

texts:
I am trying to create a custom page layout for my theme which is a child of Magento Blank theme. I got the folder structure like this

File: app/design/frontend/Company/themename/Magento_Theme/layouts.xml

  <?xml version="1.0" encoding="UTF-8"?>
    <page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
        <layout id="myfullwidth">
            <label translate="true">Full Width Layout</label>
        </layout>
    </page_layouts>

File: app/design/frontend/Company/themename/Magento_Theme/page_layout/myfullwidth.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
    </referenceContainer>
</layout>

I am able to see and select the layout in admin area.

However, when I come back to view the page, it displays a blank page. When I view source code of the page, there is nothing inside the body tag.

When I move the the file myfullwidth.xml to vendor/magento/module-themne/view/frontend/page_layout/myfullwidth.xml then it works fine.

Look like Magento didn't recognize the file when I place it under the page_layout folder in my theme folder. Anyone knows what have I done wrong? Thank you for your help in advance.

P/S: I have cleared cache and run setup:status-content:deploy but it doesn't make any different.


texts: How to add this to my custom widget at backend?


texts:
I need to export the custom grid to the csv file. I have used the below code in my listing.xml file.

<exportButton class="Magento\Ui\Component\ExportButton">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="options" xsi:type="array">
                    <item name="cvs" xsi:type="array">
                        <item name="value" xsi:type="string">csv</item>
                        <item name="label" xsi:type="string" translate="true">CSV</item>
                        <item name="url" xsi:type="string">catalogreport/export/gridToCsv</item>
                    </item>
                    <item name="xml" xsi:type="array">
                        <item name="value" xsi:type="string">xml</item>
                        <item name="label" xsi:type="string" translate="true">Excel XML</item>
                        <item name="url" xsi:type="string">catalogreport/export/gridToXml</item>
                    </item>
                </item>
            </item>
        </argument>
    </exportButton>

Then in my

  Module/Controller/Adminhtml/Export/gridToCsv.php

class GridToCsv extends Action
{

    public function execute()
    {
      $fileName = "CustomSales_". date('Ymd_His').".csv";
      $dataSource = //The data fetches here;
      $handle = fopen($fileName, 'w');
      // Adding my logic to write the content to the file
      $this->downloadCsv($fileName);

    }

    public function downloadCsv($fileName)
    {
        if (file_exists($fileName)) {
             //set appropriate headers
             header('Content-Description: File Transfer');
             header('Content-Type: application/csv');
             header('Content-Disposition: attachment; filename='.basename($fileName));
             header('Expires: 0');
             header('Cache-Control: must-revalidate');
             header('Pragma: public');
             header('Content-Length: ' . filesize($fileName));
             ob_clean();flush();
             readfile($fileName);
        }
    }
}

This is working fine, The file is downloading successfully, But here my question is the CSV file is storing into the root directory, I need to change to pub/media/import directory.

How this can be done here? I want to store the csv file inside pub/media/import directory.

Can anyone suggest me please. Thanks!!


texts:
I have a module with below details, for some reason layout xml files does not load. I can make this out, because the js and css mentioned in the layout files are not getting loaded.

/var/www/html/ciaot/app/etc/modules/dw_categoryslider.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Dw_Categoryslider>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Mage_Core/>
            </depends>
        </Dw_Categoryslider>
    </modules>
</config>

/var/www/html/ciaot/app/code/community/Dw/Categoryslider/etc/config.xml

<?xml version="1.0"?>
<config>
 <modules>
  <Dw_Categoryslider>
   <version>0.1.0</version>
  </Dw_Categoryslider>
 </modules>
 <frontend>
  <routers>
   <categoryslider>
     <use>standard</use>
      <args>
       <module>Dw_Categoryslider</module>
       <frontName>categoryslider</frontName>
      </args>
    </categoryslider>
  </routers>
 <layout>
    <updates>
     <categoryslider>
      <file>dw_categoryslider.xml</file>
     </categoryslider>
    </updates>
 </layout>
 </frontend>
 <global>
  <models>
    <categoryslider>
     <class>Dw_Categoryslider_Model</class>
     <resourceModel>categoryslider_mysql4</resourceModel>
    </categoryslider>
    <categoryslider_mysql4>
     <class>Company_Web_Model_Mysql4</class>
     <entities>
     <categoryslider>

categoryslider

     </categoryslider>
     </entities>
    </categoryslider_mysql4>
 </models>
 <resources>
   <categoryslider_setup>
    <setup>
     <module>Dw_Categoryslider</module>
    </setup>
    <connection>
     <use>core_setup</use>
    </connection>
   </categoryslider_setup>
 <categoryslider_write>
    <connection>
     <use>core_write</use>
    </connection>
 </categoryslider_write>
 <categoryslider_read>
   <connection>
    <use>core_read</use>
   </connection>
 </categoryslider_read>
 </resources>
 <blocks>
  <categoryslider>
    <class>Dw_Categoryslider_Block</class>
   </categoryslider>
 </blocks>
 <helpers>
  <categoryslider>
   <class>Dw_Categoryslider_Helper</class>
  </categoryslider>
 </helpers>
 </global>

</config>

/var/www/html/ciaot/app/design/frontend/base/default/layout/dw_categoryslider.xml

<?xml version="1.0"?>
<layout version="0.1.0">

  <categoryslider_index_index>

    <reference name="head">

            <action method="addJs"></action>
            <action method="addItem"><type>js_css</type><name>bxslider/jquery.bxslider.css</name></action>
        </reference>

    <reference name="root">
      <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
    <reference name="content">
      <block type="dw_categoryslider/categoryslider" name="categoryslider" template="categoryslider/categoryslider.phtml" />
    </reference>
  </categoryslider_index_index>
</layout>


texts: Auto Select colour Swatch when configurable product page loads

texts:
I have a configurable product with one colour and different sizes, both these are set as required fields.

I've set the colour attribute as not required, but then it wont show up when I create a configurable product and wont show on the product page.

How do I get the colour swatch to be automatically selected when the product page loads?


texts: Magento2: custom javascript not called when using with text/x-magento-init

texts:
In list.phtml (product listing) I am showing requistition lsit for every product using type="text/x-magento-init" in loop as:

<script type="text/x-magento-init">
{
    "*": {
        "Magento_Ui/js/core/app": {
            "components": {
                "requisition_<?= $block->escapeJs($block->getComponentId()) . ' - ' . $_product->getId(); ?>": {
                    "component": "Magento_RequisitionList/js/requisition/action/product/view/add",
                    "editModuleName": "requisition_<?= $block->escapeJs($block->getComponentId()) . ' - ' . $_product->getId(); ?>.edit",
                    "title": "<?= __('Add to Requisition List') ?>",
                    "action": "<?= $block->getUrl('requisition_list/item/add') ?>",
                    "sku": "<?= $block->escapeJs($_product->getSku()) ?>",
                    "productFormSelector": "#product_addtocart_form<?= $_product->getId() ?>"
                }
            }
        }
    }
}
</script>

Below this phtml at the end I created a simple javascript

<script type="text/javascript">
        require([
            'jquery',
            'lazypage'
        ], function($, scrollPagination) {
            $(document).ready(function(){
                $(window).scroll(function() {
                    var totItem = parseInt($('#totalitem').val());
                    var proLoaded = parseInt($('#productdata li').last().attr("rel"));
                    console.log('toitem'+totItem);
                    console.log('proload'+proLoaded);
                    if ((totItem > proLoaded) && (totItem != proLoaded)){
                        console.log('in ifffffff');
                    } else {
                        console.log('in elseeee');
                    }
                });
            });
        });
</script>

The issue is that when I keep both script type="text/x-magento-init" and type="text/javascript" then always getting console.log('in elseeee').

And when I am removing script type="text/x-magento-init" then everything works fine, I am getting console.log('in ifffffff');

Whats wrong I am doing ???


texts: Need to custom attribute in customer info backend programatically for magento 2

texts:
I need to add custom attribute same as image in backend in customer information to individual customer. If admin select category customer able to show only selected category.

namespace Metizsoft\Allowcustomer\Model\Config\Source;

use Magento\Framework\Option\ArrayInterface;

class Category implements ArrayInterface{

    protected $_categoryHelper;
    protected $categoryRepository;
    protected $categoryList;

    public function __construct(
        \Magento\Catalog\Helper\Category $catalogCategory,
        \Magento\Catalog\Model\CategoryRepository $categoryRepository
        )
    {
        $this->_categoryHelper = $catalogCategory;
        $this->categoryRepository = $categoryRepository;
    }

    /*
     * Return categories helper
     */

    public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
    {
        return $this->_categoryHelper->getStoreCategories($sorted , $asCollection, $toLoad);
    }

    /*
     * Option getter
     * @return array
     */
    public function toOptionArray()
    {

        $arr = $this->toArray();
        $ret = [];

        foreach ($arr as $key => $value)
        {

            $ret[] = [
                'value' => $key,
                'label' => $value
            ];
        }

        return $ret;
    }

    /*
     * Get options in "key-value" format
     * @return array
     */
    public function toArray()
    {

        $categories = $this->getStoreCategories(true,false,true);
        $categoryList = $this->renderCategories($categories);
        return $categoryList;
    }

    public function renderCategories($_categories)
    {
        foreach ($_categories as $category){
            $i = 0;
            $this->categoryList[$category->getEntityId()] = __($category->getName());   // Main categories
            $list = $this->renderSubCat($category,$i);
        }

        return $this->categoryList;
    }

    public function renderSubCat($cat,$j){

        $categoryObj = $this->categoryRepository->get($cat->getId());

        $level = $categoryObj->getLevel();
        $arrow = str_repeat("---", $level-1);
        $subcategories = $categoryObj->getChildrenCategories();

        foreach($subcategories as $subcategory) {
            $this->categoryList[$subcategory->getEntityId()] = __($arrow.$subcategory->getName());

            if($subcategory->hasChildren()) {

                $this->renderSubCat($subcategory,$j);

            }
        }

        return $this->categoryList;
    }
}


texts: My toolbar is not relate with my product list

texts:
I have a custom product list page that contains 55 products. But now I have problem. Look at this pictures below :

In page one it shows 55 items, but i've chose the limit is 24.

In page two, it shows 55 items, but look the counters below :

It says items 25 to 79 of 55 total.

Here is my scripts when I call my filtered products :

<?php
$id = $_GET['id'];
if ($id) {
$_productCollection = Mage::getModel('catalog/product')
                        ->getCollection()
                        ->addAttributeToSelect('*')
            ->addAttributeToFilter('n_customer_brand', $id);
            $_collectionSize = $_productCollection->count();
            }

?>

and this is my scripts to call my toolbar :

<?php
           // Custom Way
        $toolbar = $this->getToolbarBlock();
        $toolbar->setCollection($_productCollection );
        $layout = Mage::getSingleton('core/layout');
        $pager = $layout->createBlock('page/html_pager');
        $toolbar->setChild('product_list_toolbar_pager', $pager);
        echo $toolbar->toHtml();

    ?>

NOTE : I've change it to this script below, but it shows a wrong count and pager is not showing.

<?php echo $this->getToolbarHtml() ?>

and my block has an extends Mage_Catalog_Block_Product_List.


texts: Magento 2.3.x Membership / Recurring Billing Solution

texts:
I'm looking for a way to setup a membership based store using magento 2.3.x.  I need to be able to allow the customer to subscribe to a membership on a monthly or yearly billing basis (auth.net ARB) that also changes the user to a new usergroup so that I can display custom pricing etc.

I have found a membership extension (mageplaza) that changes the customer to a new group, but it doesn't natively support automatic rebilling for the membership.   Anyone have any suggestions or know if this is possible?  Payment gateway being used is Authorize.net


texts: Disable product magnification / zoom in Magento 2

texts:
I've added this to default.xml, which partially works to remove the zoom feature

<head>
    <remove src="Magento_Catalog::js/jquery.zoom.min.js" />
</head>

However, a magnifying glass still appears above the product image on the product detail page.

I've noticed sections in view.xml, specifically vendor/magento/theme-frontend-blank/etc/view.xml which parameterize a magnifier, one of these seems to toggle it on or off -

<var name="magnifier">
   <var name="enabled">false</var> <!-- Turn on/off magnifier (true/false) -->
</var>

This is set to false in my theme's view.xml file as well. Any idea what else I need to do to completely remove the magnification / zoom feature in Magento2?


texts: How to override grouped.phtml file in my own module in magento 1.9.1.0?

texts:
I want to overwrite grouped.phtml file located at app\design\frontend\rwd\default\template\catalog\product\view\type\ path in my own module. My magento version is 1.9.1.0.

Please guide me.


texts: How to change register link url in magento?

texts:
I want to change url of register present in top menu but I am unable to find it. Link is rendered in topmenu.phtml which is calling

$this->getHtml('level-top em-menu-link');

I found getHtml method in magento base class but it is calling loadTemplate and rendering it. Where is the link stored actually ?

I even tried adding it to local.xml

    <default>

    <!-- Removes 'Log In' link - Default position: 60 -->
    <reference name="top.links">
        <action method="removeLinkByUrl"><url helper="customer/data/getRegisterUrl"></url></action>
    </reference>

</default>

but nothing happened. I can see a function named getRegisterUrl in customer/helper/data.php but even after making changes there it is still pointing to same url.


texts:
I am facing an issue with deleting rows from table by custom field.

Below my database table

link_id | quote_id  | giftcard_value | giftcard | redeemed_at
--------------------------------------------------------------
10000   | 20000     | 450            | XSERTTY3 | 2015-12-01
10001   | 20000     | 600            | DSFDTTY3 | 2015-12-01

I need to delete all the entries by quote_is.

My code is like this

Mage::getModel('xxxxxxxxxx/xxxxxxxxxx')->load($quote->getId(),'quote_id')->delete();

But its  working for one entry, but not working for may entries. Please help me


texts: How to add Add frontend product url column to admin product grid in magento2

texts:
I'm trying to add a column on the product grid with the product frontend url.. I had added the grid by the below codes,

etc/adminhtml/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\Reporting">
    <plugin name="products_grid_collection"/>
</type>
<type name="ProductGrid">
<arguments>
    <argument name="frontUrlModel" xsi:type="object" shared="false">Magento\Framework\Url</argument>
</arguments>
</type>

etc/adminhtml/module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="SouqTime_ProductViewToProductGrid" setup_version="1.0.0">
</module>

Ui\Component\Columns\ProductGrid.php

<?php
namespace SouqTime\ProductViewToProductGrid\Ui\Component\Columns;

use \Magento\Framework\View\Element\UiComponent\ContextInterface;
use \Magento\Framework\View\Element\UiComponentFactory;
use \Magento\Ui\Component\Listing\Columns\Column;

class ProductGrid extends Column
{
protected $_storeManager;

public function __construct(
    ContextInterface $context,
    UiComponentFactory $uiComponentFactory,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    array $components = [], array $data = []
)
{
    $this->_storeManager  = $storeManager;
    parent::__construct($context, $uiComponentFactory, $components, $data);
}

public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
         $obManager = \Magento\Framework\App\ObjectManager::getInstance();
         $target    = $this->_storeManager->getStore()->getBaseUrl();
         $stManager = $obManager->get('Magento\Catalog\Model\Product');
         $fieldName = $this->getData("name");
         foreach ($dataSource["data"]["items"] as $key => $item)  {

          $product=$stManager->load($item["entity_id"]);
          $url_key = $product->getUrlInStore();

          $dataSource["data"]["items"][$key][$fieldName] = $url_key;

        }

    }

    return $dataSource;
}

}

view/adminhtml/ui_component/product_listing.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="
  urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<columns name="product_columns">
    <column name="preview" class="SouqTime\ProductViewToProductGrid\Ui\Component\Columns\ProductGrid">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">View</item>
            </item>
        </argument>
    </column>
</columns>
</listing>

Now,Above code return the first product's url to all products like below

http://imgur.com/FNFxFKMl.png

Please Anyone help me to fix this.. Thanks in advance.


texts: Is it possible to add condition in admingrid form using ui-component?-solved

texts:
I am using same form for add and edit functionality.
i want to  1 field in add action and 2 field in edit action
like:
in new action i just want to enter fistname but in edit action i want to edit firstname and lastname both.
So is it possible using same form in ui-component?


texts:
I actually have no idea where to begin troubleshooting this, since I haven't really touched anything with Magento's backend. The only sin I've committed is by editing the database directly, but only as it relates to attributes. I use Magmi to import products, and have been for a while, and it was after a recent import that I noticed the Category Design tabs were missing. But I am constantly tinkering with this installation, preparing it for launch so it could have been anything.

Disabling modules has no effect. Any ideas where I can start troubleshooting/fixing this, other than reinstalling Magento?

The only tabs I have when editing a category are "General Information" and "Category Products"


texts: How to get the current category name in an observer in magento 1

texts:
I want to get the name of current category name of a product after add to cart for this I'm using this  $category = Mage::registry('current_category') but it shows null on observer.

so which observer I should call to get this value after add to cart the product.

Please help me thank you.


texts: Add block before content in magento page

texts:
I need to add a block right after the breadcrumbs in one of my pages, my-page

I tried creating a block called my-block in the admin, and adding <?php echo $this->getChildHtml('my-block') ?> in frontend/theme/default/template/page/2columns-left.phtml and it doesn't show the contents of the block my-block.

I also added

<page-name>
    <reference name="root">
        <block type="core/template" name="my-block" as="my-block" before="content" after="breadcrumbs" template="page/html/my-block.phtml"/>
    </reference>
</page-name>

In the local.xml file, but I'm not sure if it was really necessary.

Am I missing something?

thanks


texts: Manage customer newsletter user-roles issue

texts:
Clean install of Magento ver. 1.9.2.4

I created a user
and created a custom role for this user by going to the roles section.

When I've selected the option of "all" in roles it works perfectly. I can go to:

Customers > Manage customers > Select customer > Newletter

and activate the newsletter on this page.

But when I use custom roles, as in, I select "custom" but still select each and every option that's there ( Which to my knowledge, is the same as "all" that has been proven to work, like I mentioned before ) I don't have the same outcome. I can navigate to the exact same section as before, select the checkbox and save and it even gives me the according success message

"The customer has been saved." but the checkbox reverts to it's previous state.

I've looked, but couldn't find a ACL issue like I mention above.

Is this a known issue, and have I not looked good enough. Or is there a bypass that I can use for this to make it possible for not correct ACL roles to still perform this action?


texts: How to get a custom product attribute in the sales order view?

texts:
I am trying to fetch the values from a custom attribute (multiselect attribute) of the ordered products, and display them in the order view in a new section.
In order to do that, my plan was to create a method that fetches the SKUs of the ordered products, and then another method that gets the attribute values from the product with the fetched SKU.

So I tried the following, but it didn't work:
app/code/Vendor/Module/Block/Adminhtml/Order/View/Additional.php

namespace Vendor\Module\Block\Adminhtml\Order\View;

class Attribute extends \Magento\Backend\Block\Template
{
    private $orderItem;

    /**
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Magento\Sales\Model\Order\Item $orderItem
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Sales\Model\Order\Item $orderItem,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->orderItem = $orderItem;
    }

    public function getProductSku()
    {
        return $this->orderItem->getProduct()->getSku();
    }

    public function getAttributeValue()
    {
        return $this->getProductSku()->getData('bundled_products');
    }
}

My custom template should be something like (only a mockup example, not final template):
app/code/Vendor/Module/view/adminhtml/templates/order/view/additional.phtml
<?php

/** @var \Vendor\Module\Block\Adminhtml\Order\View\Additional $block */

?>

        <?= "Bundled Products" ?>

                <?= $block->getAttributeValue ?>

The result should look something like this in Sales > Orders > Order view:

I have a theory myself why it doesn't work, but I also don't know how to fix it.
First of all, I guess the getProductSku() method should (actually be called getProductSkus() and) return an array of all the ordered SKUs. Then, for each SKU, the getAttributeValue() method should return the multiselect values selected for those SKUs.
Finally, I need to implement this in the template, which also needs to include if statements, but that is rather easy, and not what this question is about.
This question is really mostly about getting product attributes of ordered products in the order view.
Maybe there is a much easier method to do all of this? Maybe with product IDs?


texts: Email template - Order items layout - not appearing

texts:
I'm setting up a website running on Magento 2.3.4

I've run into an issue with sending emails to buyers. The email template I created through the admin interface is supposed to show the items bought. However it isn't rendering the section with the layout directive.

This is the line I'm talking about:

{{layout handle="sales_email_order_items" order=$order}}

If i send an email using the default template meant for a new order, then the email contains the itemized list

I'm not quite sure why, but the new strict mode introduced in 2.3.4 seems to have broken how the layout directive works.

Does anyone know how to render the itemized list from the order in the email?


texts:
We have Magento ver. 2.1.7 where I have installed varnish and enabled it from backend after exporting varnish 4 .vcl file. It seems to be working fine and pages which are once loaded do load quickly on the second attempt also shows that under varnish stat in hits and under varnish log.

My question is that once pages are browsed they remain for certain time under varnish cache and then goes away and for any user who is browsing for the very first time it again takes time.

So is there any way through which I can setup kind of cron job or something so my pages are always crawled by Magento 2 varnish so it should always be quicker?

I know TTFB is always slow but there are sites which do load very quickly always on the first attempt so how they are doing it with varnish?


texts: How to resolve "The store that was requested wasn't found. Verify the store and try again."?

texts:
I don't know why it is not accessing my orders page in backend admin, When I navigating to Admin dashboard -> Sales -> Orders. I am having this issue "The store that was requested wasn't found. Verify the store and try again." I cannot able to see my orders list, I can able to see an order from customers view but not in orders.

In logs, I have below text

    main.CRITICAL: The store that was requested wasn't found. Verify the store and try again. [] []
[2019-11-18 23:27:17] main.INFO: Broken reference: the 'global_notices' element cannot be added as child to 'global.notices', because the latter doesn't exist [] []
[2019-11-18 23:27:17] main.INFO: Broken reference: the 'logo' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-11-18 23:27:17] main.INFO: Broken reference: the 'global.search' an element cannot be added as a child to 'header', because the latter doesn't exist [] []
[2019-11-18 23:27:17] main.INFO: Broken reference: the 'user' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-11-18 23:27:17] main.INFO: Broken reference: the 'menu' element cannot be added as a child to

Please help me to fix this issue. I have a project deadline. below is the attachment. Please suggest the best solution for this, I tried a few solutions from StackOverflow but no luck. Thank you.

Issue at Sales-> Orders Grid

My stores table
Please let me know how to fix it


texts:
I have a site with multiple websites in a single magento instance.Each website has a different root catalog.

"Use Category Path for product urls" is enabled and I am trying to generate product urls using this https://github.com/Iazel/magento2-regenurl and Mirasvit SEO Module.

But Not all products are getting SEO Urls Some Product urls are generating like the below: https://new.dcsgrills.com/catalog/product/view/id/20547/s/dcs-30-inch-traditional-built-in-grill-non-rotisserie-bgc-model/category/1743/

Can any one please guide me on this


texts: Magento 2.3.3 Recoverable Error: Object of class Magento\SalesSequence\Model\Profile could not be converted to string

texts:
I'm Getting this Error When creating StoreView on Magento 2.3.3 after upgrade from Magento 2.1

  main.CRITICAL: Recoverable Error: Object of class
  Magento\SalesSequence\Model\Profile could not be converted to string
  in /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on
  line 3105 {"exception":"[object] (Exception(code: 0): Recoverable
  Error: Object of class Magento\SalesSequence\Model\Profile could
  not be converted to string in
  /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on
  line 3105 at
  /var/www/html/vendor/magento/framework/App/ErrorHandler.php:61)"} []


texts: how to display recently viewed products in cms block and call it in details page?

texts:
I wanted to display the recently viewed products in the cms/block and call it in product details page.

This is the line I gave in cms/block:

<p>{{block type="reports/product_viewed"template="reports/product_viewed.phtml"}}</p>

And in view.phtml I included this part:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('product_details_tab')->toHtml() ?>

But nothing is getting displayed. Where have I went wrong?


texts:
I Already have two redirect URL in my payment Gatway for Magento 2 as bellow:
  $requestData['merchant']['redirectConfirmUrl'] = $this->_getUrl(URL, ['_secure' => true, '_nosid' => true, 'mage_order_id' => $orderIncrementId]);
  $requestData['merchant']['redirectCancelUrl'] = $this->_getUrl(URL, ['_secure' => true, '_nosid' => true, 'mage_order_id' => $orderIncrementId]);

However, I want to add a third for a success callback, this should be called to confirm the order with Magento even if the user closed the page, similar to this API for WooCommerce (https://docs.woocommerce.com/document/wc_api-the-woocommerce-api-callback/)
But I cannot find how to implement this on Magento 2, anyone has any idea or a link for a document about it?


texts: What method is needed to get 'info_buyRequest' in Pdf\Items\Invoice\DefaultInvoice

texts:
Trying to get data from 'info_buyRequest' the same way i have in other templates using:

$item->getBuyRequest()

This doesn't work in \Magento\Sales\Model\Order\Pdf\Items\Invoice\DefaultInvoice

When I var_dump($item) i see the string name of 'info_buyRequest':

var_dump($item);

//outputs
...
protected '_origData' =>
    array (size=80)
      'item_id' => string '12823' (length=5)
      'order_id' => string '4003' (length=4)
      'parent_item_id' => null
      'quote_item_id' => string '37733' (length=5)
      'store_id' => string '1' (length=1)
      'created_at' => string '2017-04-26 00:35:14' (length=19)
      'updated_at' => string '2017-04-26 00:52:01' (length=19)
      'product_id' => string '47' (length=2)
      'product_type' => string 'simple' (length=6)
      'product_options' => string 'a:2:{s:15:"info_buyRequest";...

but i haven't able to access the data with the different methods i have tried.


texts: Add to Cart in custom block Homepage Magento 2

texts:
I am trying to add a Add to cart button in a custom block being added to the homepage.

I've looked at many SO / MSE posts and all refer to Object Manager but I know it's not meant to be used, and from the look of what's been said I can see it being removed a few versions down the line, or at least changed in a way where all the code being suggested will break.

The closest thing I've found to get a working button is:

<?php $collection     = $this->getCollection(); ?>
<?php $postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper'); ?>
<?php $postData       = $postDataHelper->getPostData($block->getAddToCartUrl($prod), ['product' => $prod->getEntityId()]) ?>

but it returns a JS error in console:

TypeError: params.data is undefined
    params.data.form_key = formKey;

This makes me think, It expects few things to be in a form?
So I guess my real question is, what is the Magento 2 equivalent of

<?php echo $this->getAddToCartUrl($_product); ?>


texts:
I'm experiencing a rare issue where existing customers completing checkout place the order successfully. However, the following strange behavior occurs:

The order confirmation email is not sent,
The order is assigned to the customer correctly, yet customer_id is set to 0, and
If the customer places the order again, it works correctly (order confirmation email sent and customer ID assigned correctly) however, the increment_id assigned is precicely the same as the first order and as a result there is a duplicate order increment id, with both orders active.

As I mentioned, the issue is quite rare, we receive over 20 to 30 orders a day, and it only seems to happen once a day, if that.

Edit: as per comment, it is useful to note that I am using an extension which allows alphanumeric order increment_ids, Aschroder Set Custom Order Number, our orders follow a trend as follows: OR1000, OR1001, OR1002, OR1003, etc. We have been using this extension for over 10,000 overs without this issue appearing before.

I am also using ASchroder.com SMTP Pro Email - Free and Easy Magento Emailing for SMTP, Gmail or Google Apps email to integrate google mail support for Magento.

Update 1: Looking at exception.log the following entry is notable which occured around the time of the incidents:

 'Zend_Mail_Protocol_Exception' with message 'Unable to connect via TLS' in /html/lib/Zend/Mail/Protocol/Smtp.php:211

It seems like this could cause the order creation process not to reserve the order increment id on the quote model.

Is there a way that I can diagnose what is causing this behavior? All other orders placed seem functionally correct.


texts:
I have created attribute "Bardcode EAN".

Stores --> Attributes --> Product --> BARDCODE (kod ean):

Now should display field during add new product but no display this field.

I see new field in columns:

But when adds a new product, does not have this field to fill it.


texts: Error Call to a member function beginTransaction() on a non-object when saving to database

texts:
I am at a loss, I've tried a lot of stuff but nothing seems to work to get rid of this error.

Fatal error: Call to a member function beginTransaction() on a non-object in /home1/powertg2/public_html/app/code/core/Mage/Core/Model/Abstract.php on line 313

What I am trying to accomplish it to submit an RFQ form with simple data and save results to a database.

Power/Rfq/etc/config.xml

<?xml version="1.0"?>
<config>
<modules>
    <Power_Rfq>
        <version>0.0.1</version>
    </Power_Rfq>
</modules>
<frontend>
    <routers>
        <rfq>
            <use>standard</use>
            <args>
                <module>Power_Rfq</module>
                <frontName>submit-rfq</frontName>
            </args>
        </rfq>
    </routers>
    <layout>
        <updates>
            <submitrfq>
                <file>rfq.xml</file>
            </submitrfq>
        </updates>
    </layout>
</frontend>
<global>
    <models>
        <rfq>
            <class>Power_Rfq_Model</class>
            <ressourceModel>rfq_mysql4</ressourceModel>
        </rfq>
        <rfq_mysql4>
            <class>Power_Rfq_Model_Mysql4</class>
            <entities>
                <submitrfq>

submitrfq

                </submitrfq>
            </entities>
        </rfq_mysql4>
    </models>

    <resources>
        <rfq_setup>
            <setup>
                <module>Power_Rfq</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </rfq_setup>
    </resources>

    <helpers>
        <rfq>
            <class>Power_Rfq_Helper</class>
        </rfq>
    </helpers>
</global>

Power/Rfq/controller/IndexController.php

// Save the customer to the database
$rfq = Mage::getModel('rfq/submitrfq');
$rfq->setData('first_name', $post['first_name']);
// Other set data

$rfq->save();

Power/Rfq/Model/Submitrfq.php

class Power_Rfq_Model_Submitrfq extends Mage_Core_Model_Abstract
{
    public function _construct()
    {
        $this->_init('rfq/submitrfq');
    }
}

Power/Rfq/Model/Mysql4/Submitrfq.php

class Power_Rfq_Model_Mysql4_Submitrfq extends Mage_Core_Model_Mysql4_Abstract
{
    public function _construct()
    {
        $this->_init('rfq/submitrfq', 'submitrfq_id');
    }
}

Power/Rfq/Model/Mysql4/Submitrfq/Collection.php

class Power_Rfq_Model_Mysql4_Submitrfq_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
    public function _construct()
    {
        $this->_init('rfq/submitrfq');
    }
}

This is for Magento 1.9. I am able to call other Model functions like getCollections(); but this one just isn't working.

Any and all help appreciated. Thank you.


texts:
Where can the logic|code that makes the API call to Braintree be found?

I have found the javascript that triggers when the Continue with Paypal Button is clicked .

Magento/Braintree/view/frontend/web/js/view/payment/method-readerer/paypal.js::payWithPayPal method.

Going with the debugger only takes me to minified non-redeable js. Beautifying the js is not of much help either.

I imagine that at a certain point an api call to braintree|paypal is made with information about the order (e.g grand total).

Where is the logic of this call found?
Should I keep looking through js files or should I start looking through php files?

Setting a breakpoint on index.php when the button is clicked does not help as the execution does not arrive at index.php ( The debugger works )


texts: Use joinattribute in observer make search action error "Call to a member function getBackend() on a non-object in"

texts:
This is the observer to add custom column to customer grid, here is the code

public function beforeCollectionLoad(Varien_Event_Observer $observer)
{
    $collection = $observer->getCollection();
    if (!isset($collection)) {
        return;
    }

    /*
    * Mage_Customer_Model_Resource_Customer_Collection
    */
    if ($collection instanceof Mage_Customer_Model_Resource_Customer_Collection) {
        /* @var $collection Mage_Customer_Model_Resource_Customer_Collection */
        $collection->addAttributeToSelect('billing_company');
        $collection->joinAttribute('billing_company', 'customer_address/company', 'default_billing', null, 'left');
    }
}

in config.xml

<eav_collection_abstract_load_before>
    <observers>
        <test_customer_collection_update>
            <type>model</type>
            <class>Test_Admin_Model_Observer</class>
            <method>beforeCollectionLoad</method>
        </test_customer_collection_update>
    </observers>
</eav_collection_abstract_load_before>

when i search the customer grid in company column , it return an error "Call to a member function getBackend() on boolean in D:\xampp\htdocs\m1\app\code\core\Mage\Eav\Model\Entity\Abstract.php"

anyone know how to fix it?


texts: Carts in Magento2 REST API and Front-end

texts: I was able to sign in using /rest/V1/integration/customer/token and add items to cart. How do I view the cart(items I added using REST API) from front-end?


texts: Where is the rest of the Magento backend? Can only see admin panel

texts:
I'm completely new to Magento and I'm trying to change a client's e-commerce site. I can access the admin panel, which lists the products/sales, but where is the rest of it? Where is the place to change the website for example? To see all the analytics?
I'm used to Shopify where you log in and it's all there.
Sorry if this is a stupid question, please help!
Oh, I'm using Magento 1.8.


texts: How to show invoice pdf in iframe on frontend in Magento 2

texts: Can i show invoice pdf on frontend in Magento 2 either after click print invoice or before hit the button?


texts: Deferred stock update in Magento 2.1 CE - Stock not being updated?

texts:
Everything I have read says that deferred stock update is an EE feature, but the option is showing up in CE on the product advanced inventory control page (both for configurable products and the simple products under them). Changing the setting does not work. It is stuck on "Use Config Settings", which I can't find. It's not in the store config->catlog->inventory options.

This may be causing a problem and I'm try to track down where the stock is not being decreased after a purchase.

Does anyone have any ideas on what could be causing the problems?


texts: I want to know how to remove price symbol only Shopping cart total page. I tried but i don't know exactly file location


texts: Error in "Remove a component" plugin tutorial

texts:
I am trying to follow this tutorials "Remove a component" But getting next Error:

"Uncaught Error: Cannot use object of type Magento\Checkout\Block\Checkout\LayoutProcessor\Interceptor as array in".

The plugins code is:

class removeCheckoutComponent {
    public function aroundProcess($jsLayout) {
        unset($jsLayout['components']['checkout']['children']['steps']['%path_to_target_node%']);
        return $jsLayout;
    }
}

Why it is not working? The end result I am trying to achieve is to remove city selection from checkout page.


texts: does Magento 2.3 have wishlist clean up functionality

texts:
I just want to ask if there is a wishlist  clean up functionality because I got a client that complain because his wishlist was deleted systematically.
we are currently using Magento version. 2.3.2.
thanks.


texts: Overwrite magento_theme adminhtml ui_component xml file

texts:
I am trying to overwrite following file: vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml

The changes work when editing the file directly in vendor dir, however, I am having some problems overwriting this file.

I copied the file to following location but it just doesn't work: app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml

I ran:

  rm -rf generated/code

  rm -rf pub/static/* var/view_preprocessed

  php bin/magento setup:upgrade

  php bin/magento setup:di:compile

  php bin/magento cache:clean && php bin/magento cache:flush

Nothing seems to work. What am I doing wrong?


texts: Applied patch SUPEE-6788: nothing changed

texts:
I have Magento 1.9.1.0 and have applied all patches till this last one.
Today I've modified a few files and done a git commit, then I've downloaded SUPEE-6788 and applied it.

AFter applying the patch I've done a git status and... no files were affected a part from app/config of course!

Ive' opened the patch file and checked some of the file affected:

app/code/core/Mage/Admin/Model/Block.php
app/code/core/Mage/Adminhtml/Block/Permissions/Block.php

They don't even exist in my Magento installation. Is this normal or am I missing something Biiiiiiig??

My Magento installation seem to work normally..

Thanks


texts: Magento2: Remove products from wishlist if it is already added to wishlist in Product detail page after clicking wishlist icon?

texts:
I want to remove products from wishlist if it is already added to wishlist in Product detail page after clicking wishlist icon in magento2.3.0?

Any help would be appreciated.


texts: Magento 2.3.2 - Switch Website (store) without going to base URL

texts:
I'm using the following code to switch websites.

  app/design/frontend/[Vendor]/{Child_theme}/Magento_Store/templates/switch/languages.phtml

<?php
/** @var \Magento\Store\Block\Switcher $block */
$viewModel = $block->getData('view_model');
$websites = $viewModel->getWebsites();
$websiteid = $viewModel->getWebsite()->getWebsiteId();
?>

    <?php echo __('Choose your Country') ?>

        <?php foreach ($websites as $website): ?>
            <?php if ($websiteid == $website->getId()): ?>

                        <span class="<?php echo str_replace(' ', '-', $block->escapeHtml($website->getName())) ?>">
                            <?php echo $block->escapeHtml($website->getName()) ?>

            <?php endif; ?>
        <?php endforeach; ?>

            <?php foreach ($websites as $website): ?>
                <?php if (!($websiteid == $website->getId())): ?>

                        <span class="flag-icon <?php echo str_replace(' ', '-', $block->escapeHtml($website->getName())) ?>">
                            <a href='<?php echo $website->getDefaultStore()->getBaseUrl() ?>'>
                            <?php echo $block->escapeHtml($website->getName()) ?>

                <?php endif; ?>
            <?php endforeach; ?>

However, when a product page is accessed on a particular website and then the website is switched it goes back to the base url of the website switched to.

For example

Different websites are

xyz.com/us
xyz.com/uk
xyz.com/eu

URL that is accessed is xyz.com/uk/apple.html and say you switch to the US website, it goes to xyz.com/us instead of xyz.com/us/apple.html

How can I get it to switch to the same page but on the other website.


texts: Techniques for Tracking Layout XML Merges

texts:
Are there any tools or techniques for identifying the overrides/merges/potential conflicts with layout XML in Magento?

I think what I'm looking for is something like n98-magerun's dev:module:rewrite:conflicts command.

I use Alan Storm's Layoutviewer module for ?showLayout=page to debug, but that only gives me the total merged layout. I also know that I can echo the filenames as they are loaded and merged in core, but I don't like to have to hook that up every time.

My question comes from the occasional frustration with tracking down which layout XML file from which package or theme is being loaded, as the handles aren't always logically placed.

UPDATE 2014-11-08:
As an example (not a real situation), let's say I need to find where the block product.view.extra is configured in layout XML. It ends up being defined on the handle extra_product_stuff and called in via update node in the PRODUCT_TYPE_simple handle -- all this is contained in somemodulelayout.xml or other ambiguously named file.

Let's say that, to grind my gears even more, the file is duplicated but changed slightly in another design package and on a couple of themes in between.

I load up a product detail page, and see some "extra" content at the bottom of the page. Where did it come from? I turn on template hints, and find the block and template. There's a start. I use Alan Storm's layout viewer, and see the block name/alias. I start greping for that name on skin/frontend, and see several instances. I check the one I think is relevant to my current design config. Now I'm ready to modify it.

What I want to do is simplify the steps in the above to track this stuff down. So maybe I'd like to see, perhaps in the template hints feature, the layout XML file OUT OF WHICH this block was defined and generated.

And maybe that answers my own question: If there's not a tool for this, I either build it out myself or else keep truckin' with usual sleuthing techniques. I was just looking to hear about OTHER techniques in this arena.

Will close today for #MageStackDay if I don't get a reply :)


texts: Setting Collection using getResourceModel function issue

texts:
This is the content of the Grid.php file
class Mynamespace_Mymodule_Block_Adminhtml_Banner_Grid extends

Mage_Adminhtml_Block_Widget_Grid
{
    protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('mymodule/banner_collection');
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }
}

this is the content of the Mynamespace/Mymodule/Model/Mysql4/Banner/Collection.php

class Mynamespace_Mymodule_Model_Mysql4_Banner_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
    protected function _construct()
    {
        echo 11111; exit();
        $this->_init('mynamespace_mymodule/tablename');
    }
}

The table from db is called mynamespace_mymodule_tablename
This is the content from the config.xml in which I guess smth is wrong

<global>
    <models>
            <mynamespace_mymodule>
                <class>Mynamespace_Mymodule_Model</class>
                <resourceModel>mynamespace_mymodule_mysql4</resourceModel>
            </mynamespace_mymodule>
            <mynamespace_mymodule_mysql4>
                <class>Mynamespace_Mymodule_Model_Mysql4</class>
                <entities>
                    <mynamespace_mymodule_tablename>

mynamespace_mymodule_tablename

                    </mynamespace_mymodule_tablename>
                </entities>
            </mynamespace_mymodule_mysql4>
        </models>
</global>


texts: How to quote the shipping of a bundle product in magento 1x?

texts:
I have this script that works well for simple products. But some products in my store are bundle-type.
How do I quote for shipping these other products?
$_product = Mage::getModel('catalog/product')->load($this->getRequest()->getParam('product_id'));

$quote = Mage::getModel('sales/quote');
$shippingAddress = $quote->getShippingAddress();
$shippingAddress->setCountryId('BR');
$shippingAddress->setPostcode($this->getRequest()->getParam('cep'));
$shippingAddress->setCollectShippingRates(true);

$quote->addProduct($_product);
$quote->getShippingAddress()->collectTotals();
$quote->getShippingAddress()->setCollectShippingRates(true);
$quote->getShippingAddress()->collectShippingRates();

$rates = $quote->getShippingAddress()->getGroupedAllShippingRates();
foreach($rates as $rate){
    foreach($rate as $r){
        $price = Mage::helper('core')->currency($r->getPrice(), true, false);
        $name = $r->getMethodTitle();
    }
}


texts: how to remove compare products from sidebar?

texts:
Actually i am very new to magento
I want to remove "Compare Products" block from side bar, there are some solutions given in google to edit in \app\design\frontend\default\beautyshop\layout\local.xml file but in my case there is no local.xml file exist in the  "layout" folder, although i create an local.xml file and put the code

<layout>
    <default>
        <action method="unsetChild"><name>catalog.compare.sidebar</name></action>
    </default>
</layout>

but still it not works for me i am totally stuck what to do any help is really appreciable.


texts: How to create the Product Grid Serializer Block In Custom module

texts:
I want to create the Grid Serializer functionality same as coming in Manage categories

If Anyone create that type functionality then please guide me.


texts:
When i am submitting the invoice from the admin panel for an order the order status is changed to processing from pending, but when i am submitting the invoice by using the REST API order status is still pending.
Here is my api call url:
http://MYHOST/rest/default/V1/invoices

and payload is:

{
"entity": {
"baseCurrencyCode": "INR",
"baseDiscountAmount": -512.4,
"baseGrandTotal": 2054.6,
"baseDiscountTaxCompensationAmount": 0,
"baseShippingAmount": 5,
"baseShippingDiscountTaxCompensationAmnt": 0,
"baseShippingInclTax": 0,
"baseShippingTaxAmount": 0,
"baseSubtotal": 2562,
"baseSubtotalInclTax": 2562,
"baseTaxAmount": 0,
"baseTotalRefunded": 0,
"baseToGlobalRate": 1,
"baseToOrderRate": 1,
"billingAddressId": 24,
"canVoidFlag": 0,
"createdAt": "2015-12-04 12:07:29",
"discountAmount": -512.4,
"discountDescription": "string",
"emailSent": 1,
"globalCurrencyCode": "INR",
"grandTotal": 2054.6,
"discountTaxCompensationAmount": 0,
"isUsedForRefund": 0,
"orderCurrencyCode": "string",
"orderId": 12,
"shippingAmount": 5,
"shippingDiscountTaxCompensationAmount": 0,
"shippingInclTax": 0,
"shippingTaxAmount": 0,
"state": 2,
"storeCurrencyCode": "INR",
"storeId": 1,
"storeToBaseRate": 0,
"storeToOrderRate": 0,
"subtotal": 2562,
"subtotalInclTax": 2562,
"taxAmount": 0,
"totalQty": 1,
"items": [
{
"additionalData": "string",
"baseCost": 2562,
"baseDiscountAmount": 512.4,
"baseDiscountTaxCompensationAmount": 0,
"basePrice": 512.4,
"basePriceInclTax": 512.4,
"baseRowTotal": 0,
"baseRowTotalInclTax": 0,
"baseTaxAmount": 0,
"description": "string",
"discountAmount": 512.4,
"discountTaxCompensationAmount": 0,
"name": "VNR AG LONG",
"orderItemId": 20,
"price": 2562,
"priceInclTax": 2562,
"productId": 2066,
"qty": 1,
"rowTotal": 2562,
"rowTotalInclTax": 2562,
"sku": "VNR-AG-LONG",
"taxAmount": 0,
"extensionAttributes": {}
}
],
"extensionAttributes": {}
}
}


texts: Magento2 Website showing "nil" value on home page

texts: Magento2 website showing "nil" value when hit URL of website.


texts: How to correctly add my less file to Magento 2?

texts:
Create theme app/design/frontend/Vendorname/default
Try add my.less file for impot, or add code with new class and style to _extends.less to app/design/frontend/Vendorname/default/web/css/sourse.
rm -rf pub/static/*
rm -rf var/view_preprocessed/*
php /var/www/html/bin/magento cache:clean
php /var/www/html/bin/magento setup:static-content:deploy
php /var/www/html/bin/magento cache:clean

But this not work.
I read a lot, but I do not see a particular decision. Please write how to correctly add less file to Magento 2? Please help.


texts: Multiple configurable attributes for products (that may not affect the price)

texts:
I have products that have two(-three) configurable attributes:

Size (3 possible options)
Style (3 possible options)
Colour (~20 possible options)

The price is only affected by the first two options, and not the colour. However, I have to show the style and colour options together like:

Style 1
 - Red
 - Blue
Style 2
 - Red
 - Blue
etc..

So my question is, *is there a way to avoid creating 3*3*20 simple products*, and create only 9 which are the number of different prices for different configurable options?


texts: addAttributeToFilter not filtering on product collection

texts:
i made a custom template for homepage on my magento theme (working on CE 1.8.1.0) in which i get a filtered collection of products :

$selections_products = $modelCatalogProduct->getCollection()
   ->setPageSize(32)
   ->addAttributeToSelect(array('name','selection_moment','selection_rouge','selection_blanc','selection_cdc','selection_champagne','selection_exception'))
   ->addAttributeToFilter(
        array(
          array('attribute'=>'selection_moment', array('eq' => '1')),
          array('attribute'=>'selection_rouge', array('eq' => '1')),
          array('attribute'=>'selection_blanc', array('eq' => '1')),
          array('attribute'=>'selection_cdc', array('eq' => '1')),
          array('attribute'=>'selection_champagne', array('eq' => '1')),
          array('attribute'=>'selection_exception', array('eq' => '1'))
        )
    );

these are custom attributes created in back-office. I managed to get them correctly on the same page with multiple getCollection and single filter, but i'm trying to get all product in one call, because of performance issues.

Flat catalog is enabled for products and categories, and all the custom attributes are configured with "show in product page" and "show in product list" to true

EDIT :

forgot tu put the call loop :

foreach($selections_products as $product){
    $product = mage::getModel('catalog/product')->load($product->getId());
    echo '<pre>';
    var_dump($product->getName());
    var_dump($product->getData('selection_moment'));
    var_dump($product->getData('selection_rouge'));
    var_dump($product->getData('selection_blanc'));
    var_dump($product->getData('selection_cdc'));
    var_dump($product->getData('selection_champagne'));
    echo '</pre>';
}

The followings only return 0


texts: How to check if a product is already in the cart

texts:
I have this block of code which displays product from a certain category in the cart for last minute buys.

<?php
$categoryid = 1103;
$category = new Mage_Catalog_Model_Category();
$category->load($categoryid);
$collection = $category->getProductCollection();
$collection->addAttributeToSelect('*');
$collection->getSelect()->order(new Zend_Db_Expr('RAND()'));?>

<?php $i = 0; ?>
<?php foreach ($collection as $_product){ ?>
<?php $product = Mage::getModel('catalog/product')->load($_product->getId());?>

<a href="<?php echo $_product->getProductUrl() ?>">

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" alt="<?php echo $_product->getName(); ?>" />

<a href="<?php echo $_product->getProductUrl(); ?>">

<?php echo $_product->getName(); ?>

<?php echo Mage::helper('core')->formatPrice($_product->getPrice());?>

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->helper('checkout/cart')->getAddUrl($product)?>')"><?php echo $this->__('Add to Cart') ?></button>

<?php if($i++ == 4) break; ?>
<?php }?>

I want to add in a check so that if one of the "upsell" products are already in the cart then it is not offered to the customer.

If this doesn't make sense or you need me to explain more please just ask

Thank you


texts: Magento 2 Installation on root directory

texts:
Why do we have to install Magento 2 in Magento2 folder. Cannot we install Magento on root. How should i work on the ownership of Magento, if i install Magento 2 on root directory.

PS: If i install my Magento2 (127.0.0.1/Magento2) inside a folder, is it possible to run Magento on 127.0.0.1 instead of 127.0.0.1/magento2


texts: Magento 2.3 - static-content (JS assets ) give 404 some times on production

texts:
I have Magento CE 2.3 on production mode the my store running OK
but some times some JS  & jQuery gives 404 and the website request in-existing assets from pub/static which causes the whole website to stop.

I found many answers suggesting to switch to Production mode which my store is already in Production mode.

and to switch Symlink to COPY
in app/etc/di.xml

 <virtualType name="developerMaterialization" type="Magento\Framework\App\View\Asset\MaterializationStrategy\Factory">
    <arguments>
        <argument name="strategiesList" xsi:type="array">
            <item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\</item>
            <item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>
        </argument>
    </arguments>
</virtualType>

which I already did

the problem goes away if I flush the cache and enable it again after running
bin/magento setup:static-content:deploy -f en_US ar_SA
how can I fix of even debug this issue it is very critical

this is the log in side myProject/var/log/exception.log

main.CRITICAL: Path  var/view_preprocessed/pub/static/ cannot be used with directory  var/view_preprocessed/pub/static
 {"exception":"[object] (Magento\\Framework\\Exception\\ValidatorException(code: 0): Path var/view_preprocessed/pub/static
cannot be used with directory var/view_preprocessed/pub/static at vendor/magento/framework/Filesystem/Directory/PathValidator.php:63)"} []


texts:
I am trying to disable a checkboxes in magento. But It's not working.

        $fieldset->addField(
            'checkstatus', 'checkboxes', array('Select Status')
            'label' => $this->__(',
            'name' => 'checkstatus[]',
            'values' => $options,
            'checked' => $optionselected,
            'disabled'=> true,
            'readonly'=>true
            )
        );

Could you please help me in this


texts: magento 2 state dropdown from custom table in address form

texts:
I want to show state drop-down in checkout address form.
state options will be come from my custom table. not from directory_country_region_name.


texts:
I tried to access my checkout page, but it returns blank page, and when i checked the error log, i got this message:

  [Thu Mar 29 10:30:46.928754 2018] [proxy_fcgi:error] [pid 17712]
  [client x.x.x.x:x] AH01071: Got error 'PHP message: PHP
  Deprecated:  The each() function is deprecated. This message will be
  suppressed on further calls in
  /var/www/vhosts/mydomain.com/httpdocs/vendor/colinmollenhour/cache-backend-file/File.php
  on line 81\nPHP message: PHP Fatal error:  Declaration of
  Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country::getAllOptions()
  must be compatible with
  Magento\Eav\Model\Entity\Attribute\Source\Table::getAllOptions($withEmpty
  = true, $defaultValues = false) in /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/module-customer/Model/ResourceModel/Address/Attribute/Source/Country.php
  on line 17\n', referer: mydomain.com


texts:
On my stores checkout page, I need customers to be able to provide their postcode/zip code and the system to either restrict or apply a small charge for certain postcodes.

is there such a feature built in for magento? And what is the best way to go about implementing this?


texts:
We use UsaEPay payment system for our site (But I think this problem/question persists for other payment methods as well).

The way the system works is, that the "Authorize and Capture" batches the transaction, and every night UsaEPay sends the orders to the bank for final processing.

Now the refund method would not work because prior to batching, only voiding is available.

There's no Void button in the backend only Refund (Which throws a backend error the same day).

Any ideas on voiding A&C orders?


texts: magento Illegal scheme supplied, only alphanumeric characters are permitted

texts:
[![enter image description here][1]][1]please visit this link : http://sitename.com/

i am using full path in core_config_data : http://sitename.com/

I chnaged new domain in core_config_data table , than all this error

i am seeing this : llegal scheme supplied, only alphanumeric characters are permitted

Trace:
#0 /var/www/html/sitename/app/code/core/Mage/Core/Model/Store.php(773): Zend_Uri::factory('??http://videom...')
#1 /var/www/html/sitename/app/code/core/Mage/Core/Controller/Varien/Front.php(332): Mage_Core_Model_Store->isCurrentlySecure()
#2 /var/www/html/sitename/app/code/core/Mage/Core/Controller/Varien/Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#3 /var/www/html/sitename/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#4 /var/www/html/sitename/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#5 /var/www/html/sitename/index.php(89): Mage::run('', 'store')
#6 {main}


texts: \Magento\Backend\Model\Session already exists in context object magento 2

texts:
WARNING :Session object MUST NOT be requested in constructor.It can only be passed as a method argument how to use please advance help

\Magento\Backend\Model\Session  magento 2

<?php

namespace vendor\modulename\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;

class Edit extends \Magento\Backend\App\Action
{
     protected $backendSession;

     public function __construct(
        Action\Context $context,
        \Magento\Backend\Model\Session $backendSession
    ) {
        $this->backendSession = $backendSession;
        parent::__construct($context);
    }

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

        if ($id) {
            $model->load($id);
            if (!$model->getId()) {
                $this->messageManager->addError(__('This slider no longer exists.'));
                /** \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
                $resultRedirect = $this->resultRedirectFactory->create();

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

        $data = $this->backendSession->getFormData(true);
        if (!empty($data)) {
            $model->setData($data);
        }

        $this->coreRegistry->register('tabslider', $model);

        $resultPage = $this->_initAction();
        $resultPage->addBreadcrumb(
            $id ? __('Edit Page') : __('New Slider'),
            $id ? __('Edit Page') : __('New Slider')
        );
        $resultPage->getConfig()->getTitle()->prepend(__('Slider'));
        $resultPage->getConfig()->getTitle()
            ->prepend($model->getId() ? $model->getTitle() : __('New Slider'));

        return $resultPage;
    }

}


texts: Magento 2: making a module using UI component compatible both 2.0 and 2.1?

texts:
As you may know, there are many differences in the way the UI components work on Magento 2.0 and Magento 2.1.

I find it very painful having to manage two different versions of the same module when using UI components (one version for 2.0 and one for 2.1). Cross version compatibility is important IMO specially when you are a module provider so the customer don't have to double check the version to know which module to install.

Thus I would like to make my module compatible with both.

Here is the idea I came up with:

Having two different UI components under the ui_component folders: my_listing_v_2_0.xml and my_listing_v_2_1.xml
Then in my layout file I could do something like this:

<uiComponent ifversion="2.0" name="my_listing_v_2_0" />
<uiComponent ifversion="2.1" name="my_listing_v_2_1" />

That is the theory, and in theory it could work fine.

Now here come the questions:

how do I attack this ?
Any way I can create conditional UI component declaration in my layout file ? I highly doubt that's possible out of the box but I'm willing to write some extra code so the layout can support such thing.
even better (doubt it's possible), can we make a UI component file compatible both 2.0 and 2.1 ?


texts: Which web service does Magento use to update the currency rate

texts:
I know that Magento has the option to convert currency and I can set the cron to update the conversion rate. But what i want to know is, where does Magento get the conversion rate from? What web service is Magento using to update the currency conversion rate?

I need to know because I want to let my sellers know from where I am getting the conversion rate from.


texts: Does the Magento Database Upgrade happen in a "transaction"?

texts:
We have this issue atm:

A client gets his shop upgraded from CE 1.4 to CE 1.8. The file-upgrade went well, and the database upgrade went also well on our development machine.

When we try to upgrade the client's live-db on his live-machine (connect the 1.8-Magento to the database and open it in the browser), the process seems to run for a while and ends in a 500 error.

PHP error log is empty; as it's a shared host, we can not change the apache or mysql settings; the hoster, though "specialized im magento hosting", is unwilling to change the settings and tells me that I could finish the database-upgrade by repeatedly refreshing the browser-window when the 500 error occurs, because magento will then be upgraded in small steps. This might go on for hours.

My question now is:
- Is this true? I thought the sql-statements for database-upgrades would be wrapped in a transaction, so they could be rolled back if anything goes wrong.
- Could the answer provide a hint where I could look in the code to find the answer for this question?

Thanks for your time!


texts: How add Text area field to Cart Page and pass data to checkout pages

texts:
I want to add textarea to collect comment in cart page and then want to pass it data to checkout page and save it with order.
How can I do it and how to add and pass.

thanks,


texts: Magento group prices for simple products associated with configurable products

texts:
I would like to know if it's possible in magento 1.8.0 to show different group prices for a simple product that is part of a configurable product.

I have a configurable product (T-shirt) and i have 5 simple products (for 5 different colors) that are associated with the configurable product.

When i create group prices for the configurable product they do show on the frontend.

But how do i proceed if, for example, the red t-shirt costs more than the blue one?

In the admin panel I can save different group prices for each simple product, but they don't show up on the website.

Can anybody point me in the right direction?


texts: Convert Html theme into Magento 2 Enterprises Edition

texts: I have a theme folder where there are only html, css and js file are contained. I want to convert my current theme using those css files into magento 2.can i do this or will i have to make new theme?


texts: How to disable block/template overrides?

texts:
i am trying to create an adminhtml module. I need to change the adminhtml design heavily for this module. I've overridden some blocks which changed the html of the admin panel. But the problem is most of the default admin action breaks (like the menu, button on click actions).

I'm able to remove the updates by commenting the overrides to block and theme in my config.xml file. Is there any programmatic way to remove the overrides made by my module, so i can continue to use the default admin panel whenever i need.


texts: Check custom attribute value in transactional order email

texts:
I want to display a specific code in the order email, when a product attribute got the value yes.

Therefore I add the following code to my transactional e-mail:

{{block type='core/template' area='frontend' template='email/order/delivery.phtml' order=$order}}

In the specific email/order/delivery.phtml template I added the following code:

<?php $_item = $this->getItem() ?>
<?php $_product = Mage::getModel('catalog/product')->load($_item->getProductId()) ?>
<?php $_order = $this->getItem()->getOrder() ?>

<?php if ($this->escapeHtml($_item->getProduct()->getDates())== "Yes"): ?>

Dates

        Yes

<?php endif; ?>

But sadly that does not work, what am I missing?


texts: Default Add To Wishlist is not appearing in product detail page in magento 2

texts: Move to wishlist option is appearing in cart page but in product detail page Add to wishlist is not appearing. In the backend, it didn't disabled wishlist options but still, it is not displaying in product detail page.


texts: CMS Page Not Loading Automatically on backend

texts:
On our magento backend, we have encountered an unusual issue. When we try to open a CMS page via CMS>>Pages & then select(click) page name. Now as there are two parts Left Side(Menu) & Right Side(Content), but instead of loading both sides only left side menu is shown automatically thus we have to choose desired option from menu then right side gets loaded.

This is not only happening with CMS but with product pages also. Please advise what should i do.

PS: we are using clouflare & our host says the issue is because of cloudflare

Regards


texts: Not Getting Payment Method Custom column in admin > sales > order

texts:
I am tring to add payment method custom column in admin > sales > order
with overriding core file by

Copying

 /app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php

to

 /app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php.

with following code

$collection->getSelect()->join('sales_flat_order_payment', 'main_table.entity_id = sales_flat_order_payment.parent_id',array('method'));

in protected function _prepareCollection()

 $this->addColumn('method', array(
        'header' => Mage::helper('sales')->__('Payment Method'),
        'index' => 'method',
    ));

in protected function _prepareColumns()

with this getting blank column with heading Payment Method like in the image


texts: How to get Order Attributes List without using id in Magento2

texts: I need to get all the attributes from order,quote, invoice, shipment like products and customers.


texts: Magento 1.9 : removeitem action xml , remove css from specific page

texts:
I have an onestepcheckout module for magento and I need to remove all the css from the theme on my checkout page I need to remove this item

<link rel="stylesheet" type="text/css" href="myurl.com/skin/frontend/codazon_fastest/default/css/fontawesome/font-awesome.min.css" media="all" />
<link rel="stylesheet" type="text/css" href="myurl.com/skin/frontend/codazon_fastest/default/codazon/bootstrap/css/bootstrap-theme.min.css" media="all" />

how i remove this? im trying this on onestepcheckout.xml:

<action method="removeItem"><type>skin_css</type><name>css/bootstrap-theme.min.css</name></action>

and is not removing


texts:
Magento->product View Page ->Tier Price apply  into cart

IN product view tier is applied but is not updates cart


texts:
I have installed a new extension (Mageplaza Better pop-up) and after that when i´m trying to go to configuration stores page it gives me this error:

  Notice: Undefined index: id in
  /../../../../magento/module-config/Model/Config/Structure/Element/Iterator.php
  on line 59

I have already tried to use this solution: Admin config error: Undefined index: id in Iterator.php on line 59

But it didn´t work.

Thank you


texts: Magento 2 REST API copy image from another SKU

texts:
I am trying to use an existing image from one SKU and add it to another SKU. For example:

SKU0 -> Image uploaded via Admin
SKU1 -> Copy image details from SKU0 to SKU1 via API

I've tried using a PUT request to endpoint https://www.domain.com/rest/V1/products/SKU1 with input:

"product"=> [
    "sku" => "SKU1,
    "media_gallery_entries" => [
            "id" => "id of image from SKU0",
            "media_type" => "image",
            "label" => "label",
            "position" => 1,
            "disabled" => false,
            "types" => ["image"],
            "file" => "filename_sku0.jpg"
        ]
    ]

The above is also described in another example How to add product image when creating via rest api?

But I keep getting error The image content is invalid. Verify the content and try again." So I've tried adding:

"content" => [
                "base64_encoded_data" => 'encoded string here',
                "type" => "image/jpeg",
                "name" => "name of SKU0.jpg"
            ]

But all this does is duplicates the same image which is what I'm trying to avoid. Does anyone know a way of using the same image for multiple SKUS via API?

Thanks.


texts: Product Attribute value not displaying on frontend or backend

texts:
I have a specific attribute in a specific attribute set that is not saving correctly. Looking in the database tables catalog_product_entity_int and eav_entity_attribute, everything appears normal: catalog_product_entity_int holds the correct value of the problematic attribute.

However after saving the product, even though the value is changed correctly in the database, the value on the backend and frontend remain blank. No errors are logged or displayed.

It appears to be only this specific attribute in this specific attribute set. I have added the suspect attribute to a different attribute set and it saved properly. I am also able to properly save other attributes in the problematic attribute set.

I'm hoping that maybe theres a table that is somehow missing a row that I can just fill in and get things back to normal.

Can anyone point me in the right direction?

EDIT:
Here is a quick overview of the table rows that show all the correct values in the correct places...

eav_attribute

| attribute_id | attribute_code  | backend_type | frontend_input | frontend_label  |
------------------------------------------------------------------------------------
| 175          | connection_type | int          | select         | Connection Type |

eav_attribute_set

| attribute__set_id | attribute_set_name       |
------------------------------------------------
| 68                | Fiber Optic Patch Cables |

eav_attribute_group

| attribute_group_id | attribute_set_id | attribute_group_name       |
----------------------------------------------------------------------
| 1381                | 68              | Singlemode Simplex Jumpers |

eav_entity_attribute

| entity_type_id | attribute_set_id | attribute_group_id | attribute_id |
-------------------------------------------------------------------------
| 4              | 68               | 1381               | 175          |

and a sample product from catalog_product_entity_int

| entity_type_id | attribute_id | store_id | entity_id | value |
----------------------------------------------------------------
| 4              | 175          | 0        | 3723      | 958   |

and for reference, the associated value from eav_attribute_option_value

| value_id | option_id | store_id | value |
-------------------------------------------
| 5371     | 958       | 0        | SC/ST |
| 5372     | 958       | 1        | SC/ST |

EDIT 2:
Updating as I find potentially useful information, since this attribute is related to a project I'm working on. This attribute works as expected in advanced search, and also in layered navigation.

EDIT 3:
I created the bounty on Friday when I left the office; and now I am back in the office on Monday and the issue appears to have resolved itself. All products are correctly displaying their assigned values, and the attribute saves correctly. There are no cron jobs running on the server, and I had refreshed the index and cache many times while trying to troubleshoot the issue. I'll award the bounty to anyone who can give a reasonable explanation to this sorcery.


texts: Extending magento 2 breadcrumbs through XML layout

texts: Is there any method to extending magento 2 breadcrumb through XML layout in cms page in order to add parent page link?


texts: Removing a product from the collection on a category

texts:
I have a Magento site where I need to remove some products from certain customer groups due to them having a zero price on the products.

I have tried catalog_product_collection_load_after event and have successfully managed to remove the products that I want. This however causes a gap on the catagory pages where the products would be. Would there be any way to go about remove products from a collection either before the pagination is set on the collection or to "remake" the collection once you've removed the products.

The code I've tried so far:

 /* Remove all products from the category list where the (group) price is zero */
public function removeZeroPriceProducts($observer) {

    if (! Mage::app()->getStore()->isAdmin())
    {
        $collection = $observer->getEvent()->getCollection();
        //Loop through all products in the collection
        foreach ($collection as $product)
        {

            $origProduct = $product;

            //If it is a configurable we need to get the childrens prices.
            // Since if the customer isn't allowed to see the product all prices on all children will be zero we only need to get any of the children
            if($this->getTypeId() == "configurable") {
                $product = $product->getTypeInstance()->getUsedProductCollection()->addAttributeToSelect('price')->addPriceData()->setPageSize(1)->getFirstItem();
            }

            //Check if the price is zero. If so remove the product from the collection. Note that this --will-- cause a gap in the end of the page before the pagination.
            if($origProduct->getFinalPrice() === 0 || $product->getFinalPrice() === 0)
                $observer->getEvent()->getCollection()->removeItemByKey($origProduct->getId());
        }
    }
}

Edit:
I've tried added it to _getProductCollection in List.php as suggested by Mohit.
This removes the product as expected but unfortunately still leaves a gap. I'll leave the code for that here as well.

protected function _getProductCollection()
{
    if (is_null($this->_productCollection)) {
        $layer = $this->getLayer();
        /* @var $layer Mage_Catalog_Model_Layer */
        if ($this->getShowRootCategory()) {
            $this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
        }

        // if this is a product view page
        if (Mage::registry('product')) {
            // get collection of categories this product is associated with
            $categories = Mage::registry('product')->getCategoryCollection()
                ->setPage(1, 1)
                ->load();
            // if the product is associated with any category
            if ($categories->count()) {
                // show products from this category
                $this->setCategoryId(current($categories->getIterator()));
            }
        }

        $origCategory = null;
        if ($this->getCategoryId()) {
            $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
            if ($category->getId()) {
                $origCategory = $layer->getCurrentCategory();
                $layer->setCurrentCategory($category);
            }
        }
        $this->_productCollection = $layer->getProductCollection();

        $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());

        if ($origCategory) {
            $layer->setCurrentCategory($origCategory);
        }
    }

    //Try and remove a specific ID from the collection
    $collection = $this->_productCollection;
    $collection->removeItemByKey(4146);
    return $collection;
}


texts: How to fetch category products with all attributes in REST api

texts:
There are categories in our store like featured and promotional. I fetch them in frontend by using there category id.Now I have fetch them through REST api.I made all the oauth configuration and set consumer successfully. So I have registered my module and added api2.xml. Added endpoint as /homepage/featured for featured products.

In V1.php

protected function _retrieveCollection() {
    $maincategory = Mage::getModel ( 'catalog/category' )->load ( 192 )->getProductCollection ();
    return $maincategory;
}

It is returning the product's but with less attributes.

How can I fetch all the product's attribute's from any category?


texts: Allow "shipping address" for downloadable products

texts:
For my business model I have a customer group that can buy a software  for its clients. My customer pay for the product and I must to contact the final client for the software installation. For this configuration I need a billing address of my customer and a "shipping address " of the final client but this configuration is not available for this type of products.

Can anyone give me one hint to solve this problem?


texts: Magento 2 - How to open login & Sign up form in POPUP window

texts:
I required to display login / Signup in popup window.

Have created the login module as per this link

Extension installed successfully but onclick of Login/signup button no action is performed.
Only the URl Gets changed http://localhost/domain/#social-login-popup


texts: Remove categories from left side on contact us page

texts: i am using 2 column left layout for contact us page i want to hide categories only from left side ! also i want to change URL of contacts to mycustom contact page URL thanks


texts: Customer billing and shipping address with abbreviated state drop down for USA

texts:
With magento 1.9CE i want to display drop down for states abbreviations instead of full state names on the billing and shipping address on the checkout page

Is there is a quick and easy way i could do this ?


texts: Easiest way to find Which module and layout file assigns a content block to a page?

texts:
After I found out a link or image after inspect element and changing it's css.

I want to find the page and layout block to edit it's action etc, is there anyway to do it?

Since, I'm getting hard to look at every layout and since magento doesn't have php pages.