texts: Magento - Create an attribute to config path

texts: I have created a personalized attribute for my clients and I would like to be able to call it directly on the editor of my CMS on Magento. I wanted to do like the system variables available on magento and I thought to create one directly on my database in the config path but I do not see how to proceed ... I had also thought of creating a template, by directly calling my attribute, and even though it works I was told it was not the best method. Are there other ways to proceed? thank you in advance, have a nice day.


texts: Is it possible to edit a block with low privileges

texts:
My Magento account is not as administrator.

I'm trying to edit an element.

The code I have found in home page in the admin panel for that element is this below

{{block type="brands/brands" template="infortis/brands/brand_slider.phtml" breakpoints="[0, 1], [320, 4], [480, 5], [768, 6], [960, 7], [1280, 7]" timeout="6000" move="1" pagination="1" block_name="I NOSTRI BRAND"}}

The element I would like to edit is one link. But you can see that this code is calling a page (brand_slider.phtml).

With my account, I can't see that page in CMS between the other pages.

How is it possible to edit that page?


texts: Copy Reviews from website_id 1 to website_id 2

texts:
This is more of an SQL question. I have very little knowledge in MySQL

In the review_store table, there are two columns: review_id and store_id

If I had to replace 1 with 2 I would do this:

UPDATE review_store
SET store_id = '2'
WHERE store_id = '1'

What would be the SQL query if I wanted to copy/duplicate all values of 1 in store_id to a new row with a value of 2

Thanks a lot!


texts: Download link is not showing for the programmatically added downloadable product to the order

texts:
I have been tasked for creating a order for a downloadable product and placing a order via Paypal and fortunately I've done the task pretty well.

But when the customer get his order email the download link for the product is not showing.

Below in my code that I've used :

<?php
if(!isset($_GET['p'])){
    $msg = '
Wrong data passed!!
';
}
else{
$product = Mage::getModel('catalog/product')->load($_GET['p']);
$cancel_url = Mage::getURL('').'paypal/standard/cancel/';
$return_url = Mage::getURL('').'paypal/standard/success/';
$notify_url = Mage::getURL('').'paypal/ipn/';

if(Mage::getStoreConfig('payment/paypal_standard/sandbox_flag')=='1'){
    $paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?';
}
else{
    $paypal_url = 'https://www.paypal.com/cgi-bin/webscr?';
}
$price = number_format((float)$product->getPrice(),2,'.','');
$quote = Mage::getModel('sales/quote');

$quote->setCustomerEmail('magegurusit@gmail.com');

$quote->setStore(Mage::app()->getStore());

$quoteItem = Mage::getModel('sales/quote_item')->setProduct($product);
$quoteItem->setQuote($quote);
$quoteItem->setQty(1);
$quote->addItem($quoteItem);

$addressData = array(
'firstname' => 'Guest',
'lastname' => 'Customer',
'street' => 'Some address on the earth',
'city' => 'Somewhere',
'postcode' => '123456',
'telephone' => '123456',
'country_id' => 'US',
'region_id' => 12, // id from directory_country_region table,
'use_for_shipping'=>1
);

$billingAddress = $quote->getBillingAddress()->addData($addressData);
/*$shippingAddress = $quote->getShippingAddress()->addData($addressData);
$shippingAddress->setCollectShippingRates(true)->collectShippingRates()
->setShippingMethod('flatrate_flatrate')
->setPaymentMethod('paypal_standard');*/

$quote->getPayment()->importData(array('method'=>'paypal_standard'));
$quote->collectTotals()->save();
$service = Mage::getModel('sales/service_quote', $quote);
try {
    $service->submitAll();
    $order = $service->getOrder();
    $invoice = $order->getIncrementId();
} catch (Exception $e){
    Mage::log($e->getMessage());
}

Order is creating properly.
Don't know what little extra I'm missing in the above.
Please help me on this.
Thanks


texts: Source Model Radio Button in system.xml custom module

texts:
I am developing a custom module in Magento 2.0.9 and writing the system.xml file to allow users to make some settings from backend.

Now I need to show a Radio button in custom module backend settings section.
This is what I wrote in system.xml

<field id="box_small_left_h_alignment" translate="label" type="radio" sortOrder="31" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Horizontal Alignment</label>
    <source_model>SG\Slider\Model\Backend\Options\HorizontalAlignment</source_model>
</field>

And this is the source model:

<?php

namespace SG\Slider\Model\Backend\Options;

class HorizontalAlignment implements \Magento\Framework\Option\ArrayInterface {

    public function toOptionArray()
    {
        return [['value' => 'left', 'label' => __('Left')], ['value' => 'right', 'label' => __('Right')],];
    }

}

Doing in this way no error are thrown in the backend but my radio field has no options. What am I missing?


texts: Hi is it possible to create custom catalog prices for example by the manufacturer?


texts:
Whenever I try to import my products (with about 15000-16000 configurations) and try to open it in the backend, I get an error saying:

  Cdata section too big

Frontend works just fine after caching is refreshed(which takes about 3 minutes).
I know that is a lot of configurations, but what can I do to make it work?

I have 30 products of this kind and need to have a stable and smooth experience in front and backend. Is there maybe a better way to organize the products?


texts: Magento 2 Multiselect Store View - Can't save multiple values

texts:
I want to add a Multiselect under Stores -> Settings -> All Stores -> Store View

I've added a new Field:
\Test\StoreSwitcher\Block\Store.php
<?php

namespace Test\StoreSwitcher\Block;

class Store extends \Magento\Backend\Block\System\Store\Edit\Form\Store
{
    protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form) {
        .....
        $storeSwitcherIds = $storeModel->getSwitcherIds();
        $fieldset->addField(
            'store_switcher_ids',
            'multiselect',
            [
                'name' => 'switcher_ids',
                'label' => __('Store Switcher'),
                'value' => $storeSwitcherIds,
                'values' => $this->getStores(),
                'required' => false,
                'disabled' => $storeModel->isReadOnly()
            ]
        );
        .....

My Problem is, if I select multiple values, switcher_ids has only one value.
I've checked Post Request and the error is already here. switcher_ids[] should have two values.

Does somebody know what is wrong?


texts:
I'm getting following error when I try to open the search result page.

I've tried to debug this error a lot but not getting any clue.

I've elasticsearch enabled & configured 6.5.4

PHP Fatal error:  Uncaught Error: Call to a member function getAggregations() on null in
 vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php:645
 Stack trace:
 #0 vendor/magento/framework/Interception/Interceptor.php(58): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection->getFacetedData('category')
 #1 vendor/magento/framework/Interception/Interceptor.php(138): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->___callParent('getFacetedData', Array)
 #2 vendor/magento/framework/Interception/Interceptor.php(153): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->Magento\\Framework\\Interception\\{closure}('category')
 #3 generated/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/Interceptor.php(26): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor- in vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php on line 645


texts:
In my store, CE 1.9.2.2, I would like to round prices after tax application.
Example:
I have a product with a price 160.50 without taxes applied. For some customers the store applies a tax rule which increases the price of its 22%. So, after the tax calculation, the price for that particular product becomes 195.81. For those customers I would like to have the product priced 196.00 while leaving 160.50 for customers which do not have the tax calculation applied.

Is it possible to achieve this in some way in Magento?


texts: How to create soap api method to sign up in magento website from facebook account?

texts: I want to create a soap api method for sign up from facebook login details. In which I will use user facebook id and password from user and create magento website sign up from this detail


texts: Can anyone tell me in brief what is the difference between one page checkout and normal checkout in magento 2.3.2


texts: C# can access Magento 2 SOAP API without OAuth token

texts:
I'm trying to connect a PC client application written in C# to a Magento 2 demo shop I'm hosting in a Linux VM.

I added a new integration in Magento and activated it, so I got the OAuth tokens the documentation says is required. Then I added a new service reference in Visual Studio to my Magento API with service catalogProductRepositoryV1.

I put some effort into adding the required header to the WCF communication and testet the catalogProductRepositoryV1GetList call, which returned all of my demo products alright. I then commented out the block that adds the authorization header: It still works! I even revoked all access rights for the integration in Magento - no change. I can still list all items.

How can that be? Or is authorization only required upon setting things? Or is it only required upon retrieving information that is otherwise not publicly visible?

The following code is used to demonstrate this:

using (client = new Magento.catalogProductRepositoryV1PortTypeClient())
{
    /*using (new OperationContextScope(client.InnerChannel))
    {
        MessageHeader head = MessageHeader.CreateHeader("Authorization", "", String.Format("Bearer {0}", "..."));
        OperationContext.Current.OutgoingMessageHeaders.Add(head);
    }*/

    Magento.CatalogProductRepositoryV1GetListRequest r = new Magento.CatalogProductRepositoryV1GetListRequest();
    r.searchCriteria = new Magento.FrameworkSearchCriteriaInterface();
    r.searchCriteria.pageSize = 50;

    Magento.CatalogProductRepositoryV1GetListResponse response = client.catalogProductRepositoryV1GetList(r);
}

EDIT

By browsing the REST API documentation I noticed that some GET calls on APIs for public data (such as categories, items, etc.) don't return an unauthorized error, while other calls on sensitive data like order items do also return errors for GET calls.

Maybe my suspicion is correct and data that's public anyway is not protected by authorization.


texts:
It seems too cumbersome for the user to have to wait for a page reload everytime they click on "add to compare" to add a product to a compare list and I wanted to change thelink with a checkbox and then add a button that will submit the list of products to compare and then send you to that page.
What is the best way to do this?
Edit:
I will post the code I used so that someone else can use it in the future!
In each product I have a checkbox like this:
<input class="idcompare" type="checkbox" name="idcompare<?php echo $_product->getId();?>" value="<?php echo $_product->getId();?>">Compare

Then I have my form with the button that will send me to the compare page:
<form id="comparelist">
    <button type="button" title="<?php echo $this->__('Compare') ?>" class="button"><?php echo $this->__('Compare') ?></button>
</form>

And my js that will change the action and submit the form! (not very elegant I know but it works):
jQuery(document).ready(function() {
        jQuery('#comparelist .button').click(function(){

            var i=0;
            var prdString="";

            var prdString = jQuery.map(jQuery(':checkbox:checked'), function(n, i){
                  return n.value;
            }).join(',');

            var url='<?php echo Mage::getUrl('catalog/product_compare/index').'items/'; ?>'+ prdString + '/uenc/';
            jQuery('#comparelist').attr('action', url);
            jQuery('#comparelist').submit();
        });
    });


texts: How can i send an Confirmation email when Registered email id Was changed by customer?

texts: In My account after login, the customer can change the registered email id.I want to send a confirmation mail to the customer whenever the email id is changed. Please let me know how I can achieve it. I am using Magento 1.9.2.


texts: Order emails not sending following upgrade to 1.9.1

texts:
We upgraded to CE 1.9.1.0 from 1.9.0.0 and now the new order confirmation emails have stopped sending.

I have checked the cronjob (.php) on our server and changed it to run every minute instead of five but the emails are still not sending.

I have set up a .sh cronjob and this has not solved the problem either.

www.edgesportsuk.com


texts: Skip main image in "more views" without using exclude

texts:
I want to skip the base image from "More Views" - I know this can be done by exclding the image, but I have 20k+ products, alot of them with multiple pictures. I've tried to skip the first product from the media.phtml but that didn't work since some of the images are not in the correct order.

Could I somehow check for the main image, and skip this?


texts: Enable or Disable products for specific store in magento

texts:
I am creating website in magento 2.3 and i am new in magento. I have products and I have created multi stores. I want to enable/disable specific products for specific stores. I have googled it but didn't find any solution. I am trying to find that option to enable/disable but I am unable to find.
Here is the screenshot:

Please help me


texts: Customisable products rule/restiction based

texts:
So I know how to create customisable products but what I want to do is create a customisable product with rules.

It's for an electrical website so for example the customer can create a 12 gang pdu with 6 UK sockets and 6 European sockets with a 16 Amp Fuse for example.

However I want there to be rules so customers cannot decide they want a 24 gang pdu with a 2 amp fuse in it.

How would I go about setting rules in place?


texts: redirect to same page after changing store front+ magento2

texts: When I go a product page and change the store(english,danish) etc , it if redirecting to homepage of that store. I need to be in the same page. Could anyone help me in this.


texts: How to get cms content via magento1.9 soap api v1

texts:
I need cms page content which has a short code in it, so it returns shortcode. It should return HTML instead of that. I need to solve this via soap API v1.Below is the output I got.

              page title
              {{block type="imagegallery/imagegallery" name="imagegallery" category_id="13" template="imagegallery/main_category_01.phtml" }}
              {{block type="imagegallery/imagegallery" name="imagegallery" category_id="15" template="imagegallery/main_category_01.phtml" }}

<?php

require_once('../app/Mage.php');
Mage::app();

$client     = new SoapClient('http://localhost/project/api/soap/?wsdl');

$user_name  = $_POST["user_name"];
$password   = $_POST["password"];
$session    = $client->login($user_name, $password);

$response = array();
$pageId   = "41";
$page_sub_contain   = Mage::getModel('cms/page')->load($pageId);
$page_main_contain  = $page_sub_contain->getContent();

$result   = $page_main_contain;
$response = array(
    "status" => "1",
    "message" => "suceess",
    "contain" => $result
);

ob_start();
header('Content-type: application/json');
header('Pragma: public');
header('Cache-control: private');
header('Expires: -1');

echo json_encode($response);
exit;

?>


texts: How can I fix my backend dashboard buttons?

texts:
I've recently taken over a website with an older version of Magento (1.6).  I upgraded (since the site was never built and the owner wanted a new theme) and now the buttons in the backend dashboard are a little zonky.  Each button shows three of the button image, like this:

 no luck. Does anyone know how to fix this?


texts:
I made a custom module and I'm trying to save data into the module table so I wrote this code :

$model = Mage::getModel("modulepackage/name");
$model->setPostCode("XXXXX");
...
$model->setCity();
$model->save();

Everything is working perfectly in some file of my website but as soon as I place this code in my payment module (the module is supposed to track the credit card failed) it doesn't work anymore (no error thrown by Magento) but the data is not in the table.
Do you have any idea ?

Thanks a lot !


texts: Magento 2.3.1: Billing / Shipping Address Zip Code Automatically Removes Leading 0's

texts:
We have an issue where the Billing / Shipping addresses on an order will automatically remove the leading 0 from a zip code. For example:

Danbury, Connecticut, 06811 becomes Danbury, Connecticut, 6811

This causes some validation errors with UPS and other shipping API's as it is trying to validate 6811 as a zip code.

So how can we make it so billing / shipping saves the full zip code with a leading zero?


texts: add attribute to set when creating during upgrade script

texts:
When creating an attribute inside an upgrade script (using class Mage_Catalog_Model_Resource_Setup)

Is it possible to also assign the attribute to a specific attribute set only?

My code is:

$installer->addAttribute('catalog_product', 'my_attribute', array(
    'type' => 'varchar',
    'input' => 'text',
    'label' => 'My Attribute',
    'visible' => true,
    'required' => false,
    'attribute_set' => 'My Attribute Set'
));

But the attribute only goes in default set


texts:
I am getting Error in my model
 Fatal error: Class Abhi_Test_Model_Mysql4_Test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods

I have implemented saving form data from front end in controller file as follows

<?php
class Abhi_Test_User_ViewController extends Mage_Core_Controller_Front_Action {
        public function historyAction() {
            echo "Hello it is abhilash";
            $this->loadLayout();    /*This function read all layout files and loads                               them in memory */
            $this->renderLayout();  /* This function processes and displays all layout                             phtml and php files */

        }

        public function savetestAction() {
            $title = $_REQUEST['title'];
            $filename = $_REQUEST['filename'];
            $content = $_REQUEST['content'];
            $status = $_REQUEST['status'];
            try{
                $model = Mage::getModel('test/test');
                $model->setTitle($title);
                $model->setFilename($filename);
                $model->setContent($content);
                $model->setStatus($status);
                $model->setCreatedTime(strtotime(‘now’));
                $model->setUpdatedTime(strtotime(‘now’));
                $model->save();
            } catch(Exception $e) {

            }
            $this->_redirectSuccess('test/user_view/table');
        return $this;
        }

        public function tableAction() {
            $this->loadLayout();    /*This function read all layout files and loads                               them in memory */
            $this->renderLayout();  /* This function processes and displays all layout                             phtml and php files */
        }

    }
?>

This my model class file where i am getting error

<?php
class Abhi_Test_Model_Mysql4_Test extends Mage_Core_Model_Mysql4_Abstract {
    public function _contruct() {
        $this->_init('test/test', 'test_id');   /*here test_id is the primary of the table test. And test/test, is the magento table name as mentioned in the config.xml */
        parent::__construct();
    }

    public function loadByField($field, $value) {
        $table = $this->getMainTable();
        $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
        $select = $this->_getReadAdapter()->select()->from($table, array('test_id'))->where($where);
        $id = $this->_getReadAdapter()->fetchOne($sql);
        return $id;
    }

}
?>

Please tell me if I am doing this correct. My from I have put in template.


texts: How to disable report viewed products in magento

texts:
Our magento store is writing about 50 rows per second to the report_viewed_product_index table.

How can I disable this event?

I have log cleaning cron enabled but that doesn't prevent the unnecessary DB writes.

Are there any downside to disabling this?


texts: auto select shipping method from paypal review information page

texts:
please anyone suggest me how to auto select shipping method from paypal review page to review order page

In detail:

Basically, as customer order some product then he click on paypal checkout then after customer give paypal details and after that it redirects to paypal review Information page then after it redirects to my website www.example.com/paypal/express/review page where customer again select shipping method if he didn't select he is unable to place order as place order button was disabled


texts: Update custom attribute value for all products - Magento1.9

texts:
I have a Magento store with products count 70,000 approx. I want to update 5 custom attribute's value for all products.

I have a CSV file which contains SKU and value of custom attributes for all products. Is there any option available to update/set value for all text types attribute either using MySQL query or programmatically?

Thank you.


texts: Extension produces Error 404 after applying patch 5994

texts:
After applying the patch 5994 in my magento version 1.9.1 one of my extensions began to take a 404 error message when trying to access it

See my config.xml Pastebin Quote


texts: Display all categories and all subcategories

texts:
I have following code to show all categories and all subcategories that is included in menu which works fine.

 namespace Categories\Display\Block\Adminhtml\Index;

class Index extends \Magento\Backend\Block\Widget\Container
{

    protected $_categoryHelper;
     protected $categoryFlatConfig;
     protected $topMenu;
    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Catalog\Helper\Category $categoryHelper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Widget\Context $context,
        \Magento\Catalog\Helper\Category $categoryHelper,
        \Magento\Catalog\Model\Indexer\Category\Flat\State $categoryFlatState,
        \Magento\Theme\Block\Html\Topmenu $topMenu
    ) {
        $this->_categoryHelper = $categoryHelper;
        $this->categoryFlatConfig = $categoryFlatState;
        $this->topMenu = $topMenu;
        parent::__construct($context);
    }
    /**
     * Return categories helper
     */
    public function getCategoryHelper()
    {
        return $this->_categoryHelper;
    }
    /**
     * Return top menu html
     * getHtml($outermostClass = '', $childrenWrapClass = '', $limit = 0)
     * example getHtml('level-top', 'submenu', 0)
     */
    public function getHtml()
    {
        return $this->topMenu->getHtml();
    }
    /**
     * Retrieve current store categories
     *
     * @param bool|string $sorted
     * @param bool $asCollection
     * @param bool $toLoad
     * @return \Magento\Framework\Data\Tree\Node\Collection|\Magento\Catalog\Model\Resource\Category\Collection|array
     */
   public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
    {
        return $this->_categoryHelper->getStoreCategories($sorted , $asCollection, $toLoad);
    }
    /**
     * Retrieve child store categories
     *
     */
    public function getChildCategories($category)
    {
           if ($this->categoryFlatConfig->isFlatEnabled() && $category->getUseFlatResource()) {
                $subcategories = (array)$category->getChildrenNodes();
            } else {
                $subcategories = $category->getChildren();
            }
            return $subcategories;
    }

}

Now I need all categories and subcategories including not enabled for menu.

Could you please help?


texts: Magento2 : Area code not set: Area code must be set before starting a session

texts:
Old Version : 2.2.2
Upgraded Version : 2.2.4

i'm getting error while run command php bin/magento setup:upgrade

Module 'Magento_Store':
Module 'Magento_Directory':
Module 'Magento_Eav':
Module 'Magento_Theme':
Module 'Magento_Customer':
Upgrading data.. Area code not set: Area code must be set before starting a session.

I have tried with  php bin/magento sampledata:reset but still not solved


texts:
I have form grid with selectbox in grid. so i would like to make row unclickable because when i try to click on select box it trigger checkbox too.

Screencast

any help would be very appreciate.


texts: Remove duplicate sitemap.xml from admin 1.9.2.4 ce

texts:
Sorry if this is covered elsewhere or glaringly simple.
In error, my client has ended up with three entries under Admin/CatalogGoogle Sitemap

3 /sitemap/sitemap.xml
2 /sitemap.xml
1 /sitemap.xml

1 & 2 are as you can see both the same and attempting to write to sitemap.xml in the root which has insufficient permissions.
We want to use just the first (/sitemap/sitemap.xml) file but can't find how to delete the other 2 as there's no delete option in Admin/Catalog/Google Sitemap.
It's causing cronjob issues as the jobs for the 2 in the root are running infinitely.

Thanks in advance


texts: Working with multiple tables in Magento 2 Custom Module

texts:
I am writing a videos module which I have a table called videos.

I would also like to use a table called techniques that I want to populate a drop-down box.

From what I have been googling there was an example that I think was from Magento 1 and an answer that said it takes 6 hours to do and you should have a professional do it. Any help would be greatly appreciated on how to use multiple tables in my module.


texts:
lets say there's the following hierarchy of blocks:

<block name="parent">
    <block name="child" />
</block>

and I want to push a block of my own inside "parent", and put the original "child" as a child of my new block, eg:

<block name="parent">
    <block name="my_block">
        <block name="child" />
    </block>
</block>

how can I do it via layout xml?

I tried something like:

<reference name="parent">
     <block name="my_block">
           <action method="setChild"><name>child</name><block>child</block></action>
     </block>
</reference>

but it didn't work (I tried calling getChildHtml('child'); ?> inside my template, and got an error.

am I doing it right? how do I update an existing block, add a block of my own, and turn one of the siblings (that were originally in parent) to be a child of my new block?

thanks!


texts: Magento 2.4.2 - on CMS page save "Unique constraint violation found" issue when using hierarchy

texts:
I am facing issue while saving CMS page when page hierarchy assigned to it. When I create a new page and save, it works fine but when I save it again it throws Unique constraint violation found error.
Preconditions

Magento EE 2.4.2
PHP 7.4.14
MySQL 8.0.23

Steps to reproduce

Create a Hierarchy by assigning existing CMS page to it (Ex. Helpful Links)
Create a Page (Ex. Contact)
Check off desired Hierarchy (Ex. Make Contact a child of Helpful Links)
Save Page
Edit Contact page and save again

It saves as expected when I won't select anything in Hierarchy section on CMS edit page.


texts:
I'm wondering if someone could help.

We have a website and MOZ is reporting over 4K duplicate pages and more than 11K temporary redirects. mostly are the sorting options, How could this be fixed?

Thanks


texts: Magento 2 : Adding Custom Attribute "color" to Order Items in Backend

texts:
How do I add custom attribute "color". I have made to order items in backend.

I have tried:

$_item->getColor()
$_item->getAttributes()
$_item->getAttribute('color')

And a bunch of other stuff:

vendor\magento\module-sales\view\adminhtml\templates\items\column\name.phtml

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

// @codingStandardsIgnoreFile

?>
<?php
/**
 * @see \Magento\Sales\Block\Adminhtml\Items\Column\Name
 */
?>

<?php if ($_item = $block->getItem()): ?>
    <div id="order_item_<?php /* @escapeNotVerified */ echo $_item->getId() ?>_title"
         class="product-title">
        <?php echo $block->escapeHtml($_item->getName()) ?>

        <?php /* @escapeNotVerified */ echo __('SKU') ?>: <?php echo implode('
', $this->helper('Magento\Catalog\Helper\Data')->splitSku($block->escapeHtml($block->getSku()))); ?>

    <?php if ($block->getOrderOptions()): ?>

            <?php foreach ($block->getOrderOptions() as $_option): ?>

<?php /* @escapeNotVerified */ echo $_option['label'] ?>:

                    <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                        <?php /* @escapeNotVerified */ echo $block->getCustomizedOptionValue($_option); ?>
                    <?php else: ?>
                        <?php $_option = $block->getFormattedOption($_option['value']); ?>
                        <?php /* @escapeNotVerified */ echo $_option['value']; ?><?php if (isset($_option['remainder']) && $_option['remainder']): ?><span id="<?php /* @escapeNotVerified */ echo $_dots = 'dots' . uniqid()?>"> ...<span id="<?php /* @escapeNotVerified */ echo $_id = 'id' . uniqid()?>"><?php /* @escapeNotVerified */ echo $_option['remainder'] ?>

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

            <?php endforeach; ?>

    <?php endif; ?>
    <?php echo $block->escapeHtml($_item->getDescription()) ?>
<?php endif; ?>


texts:
I have created a new web API module, this API should execute a direct SQL query.

This is the code:

namespace Mymodule\ProductByEbayItemid\Model\ProductByEbayItemidQuery;

class ProductByEbayItemidQuery {
    protected $_resourceConnection;
    protected $_connection;
    public function __construct(
        \Magento\Framework\App\ResourceConnection $resourceConnection
    ) {
        $this->_resourceConnection = $resourceConnection;
    }
    public function getProductid($ebayitemid)
    {
        $this->_connection = $this->_resourceConnection->getConnection();
        //Your custom sql query
        $query = "SELECT product_id FROM etbrm2epro_ebay_item WHERE item_id=:item_id";
        $binds = array ( 'item_id' =>  $ebayitemid );
        $collection = $this->_connection->fetchOne( $query,$binds );
        return $collection;
    }
}

I don't know how to instance this class in the API class.

namespace EternalParquet\ProductByEbayItemid\Model;
use EternalParquet\ProductByEbayItemid\Api\ProductByEbayItemidInterface;

class ProductByEbayItemid implements ProductByEbayItemidInterface
{
    /**
     * Returns product data by ebay item id,
     * if m2epro is not installed it return null.
     * @ebayitemid ebay item id
     * @api
     * @return product data.
     */
    public function get($ebayitemid) {
             //?????
    }
}

  acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="EternalParquet_ProductByEbayItemid::productid" title="GetProductByEbayItemid" translate="title" sortOrder="110" />
            </resource>
        </resources>
    </acl>
</config>

  di.xml

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

  webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/productByEbayItemid/productid/:ebayitemid" method="GET">
        <service class="EternalParquet\ProductByEbayItemid\Api\ProductByEbayItemidInterface" method="productid"/>
        <resources>
            <resource ref="EternalParquet_ProductByEbayItemid::productid"/>
        </resources>
    </route>
</routes>


texts: Magento 2 API cart item does not show price for single product

texts:
I am trying to get the item after adding it in my cart. But the response always shows price ZERO. This is only happening for single product in cart.

Endpoint: carts/mine/items


texts: Why do child categories incorrectly inherit custom design from their parent when "Use Flat Catalog Category" is enabled?

texts:
On Magento 1.9.2.4, when "Use Flat Catalog Category" is set to "Yes", a child category will sometimes inherit the settings from its parent category, even if the dropdown for "Use Parent Category Settings" under "Custom Design" says "No".

This only happens in some categories, even though all categories appear to have the same setting for "Use Parent Category Settings".

Further investigation reveals that these categories that were incorrectly inheriting their parents' design actually did NOT have a row for their custom_use_parent_settings attribute in the catalog_category_entity_int table. This causes the value in the catalog_category_flat_store_1 to be NULL.

Even though this value is missing, when "Use Flat Catalog Category" is set to No, the categories behave on the front-end as the admin settings would indicate, and do not inherit the parents' design settings.

I tried setting the default_value of the custom_use_parent_settings attribute in the eav_attribute table to 0, and re-indexed, however, the catalog_category_flat_store_1 table still shows a NULL for this field.

Note: These categories were imported with a script, and not created manually. Because the default_value of this attribute is NULL in the eav_attribute table, it makes sense that there is no record for them in the catalog_category_entity_int table. Had they been created through the admin panel, the value would be 0, as this is the default for the select element. Re-saving a category from admin fixes the issue because the default of the dropdown is "No" or 0, but this isn't an option when you have 1000+ categories.


texts: Add custom field (checkbox) in Products Create/Edit page in General Tab in Admin

texts:
I want to add a new checkbox labeled as "Featured" in create/edit products page in Magento Admin. This determines if a product is a featured product or not.

These are my requirements :

Add "is_featured" column in products table in database
In create/edit products page in General Tab in Admin, add a checkbox with label "Featured"
When saving the product and the "Featured" checkbox is checked, save the value 1 to "is_featured" column in products table, else save the value 0.

On the front-end side, when querying products via magento collection query, i want to sort products and make Featured product as first on the list.
Adding is_featured column in db will allow me to sort(descending order) the products easily via is_featured column, sample code :

$_productCollection = Mage::getResourceModel('catalog/product_collection')
                ->setStoreId(0)
                ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left')
                ->addAttributeToFilter('category_id', array('in' => $category_ids))
                ->addAttributeToSelect('*')
                ->addAttributeToFilter('visibility', 4) // Only catalog, search visiblity
                ->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED))
                ->addAttributeToSort('is_featured', 'DESC')

How do i get started or what's the best way to achieve the requirements mentioned above?

UPDATE :

The purpose of the requirements above is to sort easily the products via is_featured column

Thanks


texts: Is there a white label plan I can purchase from Magento so I re-sell Magento Community sites under my own company name?


texts: Magento 1.9 EAV constraints, bug or mysql bug?

texts:
I am trying to remove a catalog_product custom attribute the Magento way by using Mage_Eav_Model_Entity_Setup::removeAttribute() but it results in bad data integrity: the attribute gets deleted from eav_attribute table but not from catalog_eav_attribute.

When doing

show create table catalog_eav_attribute

I see the the attribute_id FK to eav_attribute defined correctly with on delete cascade in place

Is this a known bug of Magento or rather a mysql bug?

Magento version is 1.9.2.2, mysql version is 5.5.46 running on ubuntu 14.04.2

Edit: I tried to reproduce the error by mocking a custom relationship between two custom tables using a foreign key constraint with on delete cascade enabled and it worked: when I deleted a row in the parent table, all related rows in child table were deleted accordingly. Why won't the same work for the eav_attribute and catalog_eav_attribute tables?

Edit2: the same happens with other tables referencing the eav_attribute table: eav_attribute_option, eav_attribute_option_value, customer_eav_attribute, etc, leaving Magento with lots of orphaned child rows in aforementioned tables.


texts: Magento 2 - Create invoice for existing order to increase quantities

texts:
Main Scenario:
Customer places an order for a specific quantity of something, let's say 10. This customer will then call up and go "I actually needed 12".
I'm looking for a way to be able to create an invoice for this existing order for an additional 2 of this product, and then ideally have that show up on the front-end for the customer to pay for.
This must add the invoice to the existing order and update quantities, so that everything is contained in the correct order and a shipping label can be printed with the full quantity.
Other scenario (acceptable alternative for above):
We have some customers who phone up with a specific request who get specific-to-order prices, doing this through discount codes or price groups would be very cumbersome as the discounts vary based on quantity cut-offs and other, regularly changing factors.
I'm looking for a way to create an entire order and have them pay for it on the front-end. In this scenario, the customer always has an account, and would be logging in and looking in their account for the order that was made for them. I would prefer to avoid editing the basket as it needs to prevent modifying quantities.
This is an acceptable alternative for the above as I can track order pairs as needed.


texts: Default sorting option not working in magento 2.2.7?

texts: I am using the default sorting option as product name but when the page loads for first time it is not working. It's only working when selecting an option from the sorting dropdown.


texts:
Can anyone guide me for installing Optimizely for Magento2?

The client has installed it for Magento1 but can anyone tell it supports Magento2 as he wants Optimizely only(not any other similar one).


texts: Sort categories in layered navigation alphabitically

texts:
We are trying to sort the categories in the layered navigation alphabetically but it is not getting sort.

Tried the following modifications directly in core file at line number 122 for testing purpose.

app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php
asort($this->_items);

Any help in this regard is highly appreciated.

Thanks in Advance.


texts:
I keep on getting an invalid callback error for my homemade Magento module. I'm using Magento 1.9.2.1 on an Ubuntu web server. My module is stored in: app/code/community/Foggyline/HappyHour/. The specific script is stored in: app/code/community/FoggyLine/HappyHour/Model/Observer.php

Config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Foggyline_HappyHour>
            <version>1.0.0.0</version>
        </Foggyline_HappyHour>
    </modules>

     <frontend>
         <routers>
            <foggyline_happyhour>
                <use>standard</use>
                <args>
                    <module>Foggyline_HappyHour</module>
                    <frontName>happyhour</frontName>
                </args>
            </foggyline_happyhour>
        </routers>
    </frontend>

    <crontab>
      <jobs>
        <happyhour_refresh_cache>
          <schedule><cron_expr>* * * * *</cron_expr></schedule>
          <run><model>happyHour/observer::refreshCache</model></run>
        </happyhour_refresh_cache>
      </jobs>
    </crontab>

</config>

Model/Oberserver.php :

<?php
/**
 * Checks for invalidated caches and refreshes them
 */
class Foggyline_HappyHour_Model_Observer {
    public static function refresh() {
      try {
        $allTypes = Mage::app()->useCache();
        foreach($allTypes as $type => $blah) {
          Mage::app()->getCacheInstance()->cleanType($type);
        }
      } catch (Exception $e) {
        // do something
        error_log($e->getMessage());
      }
    }}

Any thoughts on how to fix this?


texts: Magento 2.2? How to create customer in admin side programmatically?

texts:
I need to create new customer in admin side programmatically? How to do that in Magento 2?

I have used below coding for creating customer programmatically, I am getting new customerId but customer is not saved in customer_entity table? why?

$websiteId = $this->_storeManager->getWebsite()->getId();
               $store = $this->_storeManager->getStore();

                $customer->setWebsiteId($websiteId)
                        ->setStore($store)
                        ->setFirstname($firstname)
                        ->setLastname($lastname)
                        ->setMobile($mobile)
                        ->setEmail($email)
                        ->setPassword(uniqid());
    $customer->save();

After saved new customer, I am getting below error No such entity with customerId =


texts: add to cart not working for a store behind authentication

texts:
I have a store which is protected behind a login. So when a customer receives a wishlist email from other customer, when the customer clicks on "Add to cart" from email, since the store is protected behind authentication, the items are not being added to cart and after login the cart remains empty.

how to save this url/parameters and do the operation after login(auth).

I am using bubble require login to mandate authentication.

https://github.com/jreinke/magento-require-login

this is actually the code which I tried for capturing the url and trying to do the same operation after authentication using setAfterAuthUrl and setBeforeAuthUrl

class Bubble_RequireLogin_Model_Customer_Observer
{
    public function requireLogin($observer)
    {
        $helper = Mage::helper('bubble_requirelogin');
        $session = Mage::getSingleton('customer/session');

        if (!$session->isLoggedIn() && $helper->isLoginRequired()) {
            $controllerAction = $observer->getEvent()->getControllerAction();
            /* @var $controllerAction Mage_Core_Controller_Front_Action */
            $requestString = $controllerAction->getRequest()->getRequestString();

            if (!preg_match($helper->getWhitelist(), $requestString)) {
                /*$session->setBeforeAuthUrl($requestString); */
                $session->setAfterAuthUrl(Mage::helper('core/url')->getCurrentUrl());
                $session->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl());
                $controllerAction->getResponse()->setRedirect(Mage::getUrl('customer/account/login'));
                $controllerAction->getResponse()->sendResponse();
                exit;
            }
        }
    }
}


texts:
https://github.com/magento/magento2/tree/develop/app/code/Magento

i downnloaded Magento-CE-2.1.1_sample_data-2016-08-29-06-45-34.tar.gz

and it doesnot have also app/code inside

also directory under apache is same

/var/www/html/magento2/app$ ls
autoload.php  bootstrap.php  design  etc  functions.php

here

https://community.magento.com/t5/Building-Extensions/Display-template-in-Admin-Module-of-Magento/td-p/28525

he says he puts his code under app/code  but i cant put? i try to create an admin entry.

How can i do?


texts: Where do I add this Ticket Reservation step during Checkout?

texts:
I am implementing a Cruise Ship reservation website on Magento 2.3.
I'm unsure in which modules or files I have to implement steps 3 and 5 below?

(User flow through website)

Guest browses through Cruises available. Picks one by Adding to Cart. Clicks "Checkout"
Guest gives passenger names and addresses, captured on the Review & Payments checkout page. Clicks "Place Order"
System has to connect to the Cruise Provider via API and place a "hold" reservation
On successful "hold" reservation, System has to process the payment through payment gateway
On successful payment, System has to connect to the Cruise Provider and ask for "hold" reservation to be converted to "confirmed" reservation.

I have the Cruise Provider API (which is in SOAP) - so no problem here.

Which modules should I override, or in which files do I write my code to do Steps 3 & 5?


texts: Where magento stores custom options for the products added to cart?

texts:
Assume that you are going to add a product which has custom options. So when you add that product to the shopping cart, where will the magento save those custom option's values persistently?

Any suggestions will be appreciated.


texts: How to add multiple products to cart from outside magento directory using ajax

texts:
I am using ajax to add multiple products to cart. I am correctly getting required products ids, but couldnot add them to cart.

<?php
    include_once '../app/Mage.php';
    Mage::app();
    $basePath = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
    Mage::getSingleton('core/session', array('name'=>'frontend'));
    $id_str = $_REQUEST['id_str'];

    $Ids    = explode(',',$id_str);

    $cart = Mage::getSingleton('checkout/cart');
    $cart->init();

    foreach ($Ids as $productId)
    {
        //$product = Mage::getModel('catalog/product')->load($productId);

        $cart->addProduct($productId,1);
    }
    $cart->save();
    echo "1";

    ?>


texts: Magento 2 Update data with custom module

texts:
How we can update Magento2 default table record with a custom module schema

like :

UPDATE sales_sequence_profile SET `prefix` = "US" WHERE `meta_id` = 5;


texts: Magento2 Multi website : Website 2 opens but with all the links and Theme of Website 1

texts:
I am posting here after 2 days trying different methods for the Multiwebsite Setup. I am upgrading my website from Magento 1.9 to 2.3. Since my previous Magento 1.9 had some structural issues, I decided to start with a fresh install and adding the products again (30 - 40).

Since my current Magento 1.9 website is still live and using PHP5.5, I created a separate subdomain using Cpanel WHM and the same uses PHP7.2

There are 3 websites in picture
www.kkeautocare.com (default)
www.kkeautocare.ca
www.kkeautocare.in

The test location is shop.kkeautocare.com

Since www.kkeautocare.ca is not much advertised one, I thought of linking it to shop.kkeautocare.com for testing.

when I access www.kkeautocare.ca it gives a broken theme (without CSS) while if i access www.kkeautocare.ca/?1 , the theme looks okay but with following in the head tag. All the URLs are of shop.kkeautocare.com which is the default website.

<script>
    var BASE_URL = 'http://shop.kkeautocare.com/';
    var require = {
        "baseUrl": "http://shop.kkeautocare.com/pub/static/version1550965856/frontend/Smartwave/porto/en_US"
    };
</script>

It is worthwhile mentioning here that just to check if it is going to the right website, I changed the www.kkeautocare.ca Theme to default Luma instead of Porto on shop.kkeautocare.com .

I Have added the following code in index.php :

$params = $_SERVER;
$domain2store = array(
    'shop.kkeautocare.com'=>'base', // Replace your Website, Store or Storeview code with this.
    'kkeautocare.ca'=>'CA',      // Replace your Website, Store or Storeview code with this.
    'www.kkeautocare.ca'=>'CA',      // Replace your Website, Store or Storeview code with this.
    );

if(isset($domain2store[$_SERVER['HTTP_HOST']]))
$storecode = $domain2store[$_SERVER['HTTP_HOST']];
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = isset($storecode) ? $storecode : '';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';

Can somebody help? Comment me if you need any clarification.


texts: Bundle Product - Add to Cart is not working

texts:
i am facing strange issue.. i have created bundle product with three item.. problem is when i click add to cart, its not working.. i try hard but cant figure out.. where and what is the issue, because there is no java-script error in button add to cart action.. i check code someone suggest this below code in some post.. so i add this code but still not succeed yet.

<?php echo $this->getBlockHtml('formkey') ?>

my bundle product link

Thanks


texts:
I added a checkbox and i want to make the company required if that checkbox is checked, how can i do that? this is my js code

define([
   'ko',
   'uiComponent',
   'jquery'
], function (ko, Component, $) {
   "use strict";

   return Component.extend({
       initialize: function () {
           this._super();

           $(document).on("click", "#require-company-vat", function () {
             $('input[name="company"]').eq(0).closest('div.field').toggleClass('_required');

               if ($('input[name*="require-company-vat"]:checked')) {
                   $('input[name*="company"]').attr('aria-required', true);
               } else {
                   $('input[name*="company"]').removeAttr('aria-required');
               }

           });
           // component initialization logic
           return this;
       },
       defaults: {
           template: 'Chanz_CheckoutFields/require-company-vat'
       }

   });
});

aria-required is not working even if its already true


texts: Website design collapse in android mobiles

texts:
We have written media query for android mobile devices which have the resolution (360x640) as below:

For portrait:

@media screen and (device-width: 360px) and (device-height: 640px)  and (-webkit-device-pixel-ratio: 4) and (orientation: portrait){

// Our code goes here

}

For Landscape:

@media screen and (device-width: 360px) and (device-height: 640px)  and (-webkit-device-pixel-ratio: 4) and (orientation: landscape) {

// Our code goes here

}

After we have written the media query as above, we have tested the output on a real mobile device. While we have checked it, we noticed that it looks good at first but when we open the keypad in mobile to type text in the HTML input-textbox, the website design is collapsing.

Is this because of media query syntax?

Below is the screenshot of the site in normal view:

Below is the screenshot of the site while opening keypad:

Please help me to resolve this issue.


texts:
I'm trying to add a new function to the \Magento\GroupedProduct\Model\Product\Type\Grouped class

in \USR\GroupedByCore\etc\di.xml I have

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <preference for="\Magento\GroupedProduct\Model\Product\Type\Grouped"
            type="\USR\GroupedByCore\Model\Product\Type\Grouped" />
</config>

in \USR\GroupedByCore\Model\Product\Type\Grouped.php

<?php
namespace USR\GroupedByCore\Model\Product\Type;

class Grouped extends \Magento\GroupedProduct\Model\Product\Type\Grouped
{

    public function getAssociatedProductsByCore($product,$core)
    {

        return "Something";
    }

 }
?>

I'm calling it this way in Magento_GroupedProdcut\templates\product\view\type\grouped.phtml

<?php echo "This should be something: " . $this->getAssociatedProductsByCore($_product,'6'); ?>

Its not returning anything at all.  The results is merely "This should be something:".


texts: How to build Magento 2 Mega Menu with Custom CSS?

texts:
I'm trying to figure out how to create a mega menu with custom css only / no extensions ?

I copied over the Magento/Catalog/Plugin/Block/Topmenu block to begin. But not sure what to do next or where to find the HTML.


texts: Prevent custom option from being added to tax calculation

texts:
I'd like to exclude the added price of custom options from tax calculations. For example, if a custom option adds $10 to the total price, that $10 should not factor into tax calculation.
What would be the best way to approach this?
I've looked into creating an observer for sales_quote_collect_totals_before but I'm not sure of how go about altering the tax in this specific way at that event.


texts: How can I use a custom css file in a custom module?

texts:
I successfully created a custom theme and a custom module. Right now the module just outputs "Hello World" in the header panel of my shop. Now, I want to apply some styling to my block inside my module. The default_head_blocks.xmlof my theme (located at myTheme/Magento_Theme/layout/default_head_blocks.xml) looks like this:

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
    <css src="css/navbar-style.css"/>

</page>

The default.xml inside my module (located at Test/Navbar/view/frontend/layout/default.xml looks like this:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

<css src="css/navbar-style.css"/>

<referenceContainer name="header.panel">
<block class="Test\Navbar\Block\Navbar" name="test.navbar" template="Test_Navigation::default/navbar.phtml"/>
</referenceContainer>
<referenceBlock name="register-link" remove="true"/>
<referenceBlock name="authorization-link" remove="true"/>
<referenceBlock name="wish-list-link" remove="true"/>
<referenceBlock name="my-account-link" remove="true"/>

</page>

My navbar.phtml (located at Test/Navbar/view/frontend/templates/default/navbar.phtml) looks like this:

<?php
/**
* Test navbar template
*
* @var $block TestNavbarBlockNavbar
*/
?>

Hello World

and finally the .css located at app/design/frontend/test/testtheme/web/css/navbar-style.css

looks like this:

@charset "UTF-8";
/* CSS Document */

.r23-header {
margin: 0 auto;
width: 100px;
color: red;
}

body {
background-color: green;
}

The result is, that the body color of my whole Magento site is green. So the css is working. But how can I apply styling to my navbar.phtml? Because nothing happens there when I reload my site. I always clear the var and pub/static folder (except for the .htaccess file). What am I doing wrong?


texts: Error to change the position of Short Description in Front End?

texts:
In my magento 2.4.1, I'm trying to move the short description element.
The parent theme I use is Luma.
Using the following code:
    <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" as="description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
        <arguments>
            <argument name="at_call" xsi:type="string">getDescription</argument>
            <argument name="at_code" xsi:type="string">description</argument>
            <argument name="css_class" xsi:type="string">description</argument>
            <argument name="at_label" xsi:type="string">none</argument>
            <argument name="title" translate="true" xsi:type="string">Details</argument>
            <argument name="sort_order" xsi:type="string">10</argument>
        </arguments>
    </block>

moved after block:
<block class = "Magento \ Catalog \ Block \ Product \ View" name = "product.info.review" template = "Magento_Catalog :: product / view / review.phtml" after = "product.info.stock.sku" / >

the description is moved.
All tabs except details, compare are no longer visible.
Also disappears "ADD TO WISHLIST"
I attach an image.

How can I do?
Where am I doing wrong?
Thanks


texts: curl and json approve conversion Rest API

texts:
i'm currently coding a little api for extole approve conversion api. It's only suppose to send data on declined orders which is equal to cancelled in the magento admin.

Here is what i have written so far:

$data = array(
   'partner_conversion_id' => Mage::getSingleton('checkout/session')->getLastOrderId(),
   'event_status' => 'approve',
   );

$data = '{"partner_conversion_id":"'.Mage::getSingleton('checkout/session')->getLastOrderId().'", "event_status":"approve"}';
$data_string = json_encode($data);

$ch = curl_init('https://api.website.com/v3/events/approve?event_id='.Mage::getSingleton('checkout/session')->getLastOrderId());
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_USERPWD, "11111-1:111111111111111111111");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string))
    );
$result = curl_exec($ch);
$result = ($result);

When i var_dump($result) on my success.phtml page i get most of what i'm looking for..

string(115) "{"code":"BAD REQUEST","message":"Missing mandatary field value for approval_status","uniqueId":6289418511505278727}"

The uniqueId is the partner_conversion_id which seems to be firing correctly.

So the approval status and the message field which is optional i'm not currently able to get.

Why am i getting BAD REQUEST and how do I get my approval_status to fire?


texts: Import product CSV to magento using cronjob

texts:
I want to update my products csv to Magento 1.9.0 using cronjob.

so someone can please tell me appropriate code script, please.

because I want to set it using the cronjob

Thanks in advanced.


texts: How can I add category IDs as a class on the top menu?

texts:
I'm trying to add classes such as cat-1, cat-2, ...,  cat-n to the <li> elements in the top menu, where the number is the category ID. I would also like to add cat-0 to the "Home" link.

At first I thought this would be fairly simple - just edit a theme phtml file or something, then I dug a little deeper and found app/code/core/Mage/Page/Block/Html/Topmenu.php which seems to be where the action is.

This seems like I file I shouldn't be messing with, and all of a sudden, I'm way out of my depth.

So what's the best way to add category ID-based class names to <li> tags in the top menu? Some kind of module that overrides a function in the aforementioned file?


texts: Magento 2: Data migration tool installation

texts:
I am going to migrate data from M1(CE) to M2(EE). I have a module of data migration tool. I placed it in vendor/magento directory.

Module does not install when i run magento upgrade command as i do not find its entry in setup_module table.

Am i installing it in a wrong way?

I do not want to install using composer.

Any help?


texts: Customer selection popup from Magento Custom Admin form

texts:
I am creating a Magento admin html page. Generated module template using Module Generator. I could modify the page and add multi select and select boxes. Next I need to select one or more customer from customer list using a separate popup. Did research and found that I need to add modal classes. But, the examples I found was for xml based view and not for phtml and php based views.
Here is the portion of the code to which I want to add a button to pick one or more customers. Any suggestions ?
vendor/module/Block/Adminhtml/Items/Edit/Tab/Main.php
class Main extends Generic implements TabInterface
{
    protected function _prepareForm()
    {
        $model = $this->_coreRegistry->registry('current_custom_items');
        /** @var \Magento\Framework\Data\Form $form */
        $form = $this->_formFactory->create();
        $form->setHtmlIdPrefix('item_');
        $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Item Information')]);
        if ($model->getId()) {
            $fieldset->addField('custom_id', 'hidden', ['name' => 'custom_id']);
        }
        $fieldset->addField(
            'category',
            'text',
            ['name' => 'category', 'label' => __('Category'), 'title' => __('Category'), 'required' => true]
        );
        $fieldset->addField(
            'title',
            'text',
            ['name' => 'title', 'label' => __('Title'), 'title' => __('Title'), 'required' => true]
        );
        $form->setValues($model->getData());
        $this->setForm($form);
        return parent::_prepareForm();
    }
}

vendor/module/view/frontend/templates/custom.phtml
<form class="" action="<?php echo $block->getBaseUrl().'custom/index/save'; ?>" id="custom-form" method="post" data-mage-
    <fieldset class="fieldset">
        <legend class="legend">Form  <a href="<?php echo $block->getBaseUrl().'custom/index/list';

Fill all the fields.

            Category

                <input name="category" id="category" title="Category" value="" class="input-text" type="text" data-validate="{required:true}">

            Title

                <input name="title" id="title" title="Title" value="" class="input-text" type="text" data-validate="{required:true}">

    .........
</form>


texts: Magento 2 TypeError Undefined products images not displaying / js not loading

texts:
At home page, product category view and product detailed view page images are not loading / displaying at firefox and less frequently at chrome.

I am using magento 2.2.6 upgraded from 2.2.2 and porto theme upgrade to 3.1.5.

Inspect shows after clean cache:

1.- TypeError: src is undefined

2.- TypeError: $.ui is undefined

3.- TypeError: $.widget is not a function

4.- TypeError: $.widget is not a function (twice)

5.- TypeError: $.ui is undefined

Inspect shows after reload home page a few less:

1.- TypeError: src is undefined

2.- TypeError: $.ui is undefined

3.- TypeError: $.ui is undefined

exception.log shows from 2 days ago (not today):

  [2018-09-26 16:02:26] main.CRITICAL: Cannot gather stats!
  Warning!stat(): stat failed for
  /home/xxx/public_html/pub/static/frontend/Smartwave/porto/es_AR/mage/requirejs/mixins.js
  {"exception":"[object]
  (Magento\Framework\Exception\FileSystemException(code: 0): Cannot
  gather stats! Warning!stat(): stat failed for
  /home/xxx/public_html/pub/static/frontend/Smartwave/porto/es_AR/mage/requirejs/mixins.js
  at
  /home/xxx/public_html/vendor/magento/framework/Filesystem/Driver/File.php:71)"}
  []

any help will be great !

my site: https://www.calzadosyoyito.cl


texts: Magento - upgrade a store that was installed without authentication key

texts:
I have a magento 2.1.9 and i want to upgrade it to magento 2.2.0 (or if possible straight to magento 2.3.0 even tho i think that that's not possible because of php version). But when the store was installed there was no authentication public/private key used. How do i upgrade my magento in this scenario?

P.S: My store has around 900 products, ~2000 orders and customers,and i would like to keep them. :(


texts: Tapping into the Magento module loading sequence?

texts:
Is there a hack-free customization point in Magento 1.X that allows us to listen to when modules are loaded (or other parts of the initialization sequence)?

I define 'hack-free' above as not modifying and/or rewriting the core.

Thanks


texts: Get current locale programmatically in magento2

texts:
I want to get current language of store. When I switch store as per store vise I want to get store language.

How can i get it?


texts: setStatus update sales_order's status but sales_order_grid's status in 2.2.6

texts:
I have the following script in custom module to change an order from processing to a custom order's status

$order->setStatus(\MyNamespace\Mymodule\Model\Order::STATUS_PRINTED);
$this->orderRepository->save($order);

i found that the status field in sales_order is updated, but the status field in sales_order_grid is not updated (occur in magento 2.2.6 commerce edition, but ok in 2.3 ce edition).

Anyone has idea what is the possible problem.


texts:
I am using magento 1.9 version. Created the custom module. I tried to save details. I got this error.

  A block identifier with the same properties already exists in the selected store.

how to solve this.


texts: How to copy a product's attributes value to another attribute in Magento?

texts:
Is there a way in Magento where I can assign Attribute X's value to Attribute Y programmatically ?

So far I have tried this. I created the Y attribute with following settings:

$setup->addAttribute('catalog_product','myAttribute',array(
                   'group'=>'General',
                   'input'=>'label',
                   'type'=>'varchar',
                   'label'=>'Value of Attribute X',
                   'visible'=>1,
                   'backend'=>'beta/entity_attribute_backend_myattribute',
                   'global'=>Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE
               ));

In my backend model, I have done this:

class Namespace_Module_Model_Entity_Attribute_Backend_Myattribute extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
    public function beforeSave($object){
        $attrCode = $this->getAttribute()->getAttributeCode();
        $object->setData($attrCode,'HAHAHA');
        parent::beforeSave($object);
        return $this;
    }
}

I am able to see "HAHAHA" as the attribute value in the Product Edit page. I want to change this to value of another attribute. How do I do it ? How do I access another attribute's value of the same product from this class ?

PS: What I am actually trying to achieve is this. The attribute X is of type multi select with 100s of options. So the attribute Y must keep track of the options selected of X, and Y shows the value in product page in read-only format.


texts: What is the difference in the persistent shopping cart between community and enterprise?

texts:
We are using Magento enterprise and I see persistent shopping cart code in a separate enterprise section. I wanted to know if there is a difference in the persistent shopping cart between magento enterprise and community editions?

Is there a difference in functionality or is the enterprise code there to make it work with full page cache?


texts: Integrity constraint violation on setup:upgrade Magento 2.3.3

texts:
After updating to 2.3.3. I get the following error for the Temando_Shipping module. I disabled the module but that gives errors when editing products. When I try to enable and run 'magento setup:upgrade' again get this error.

Upgrading data.. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'origin.address.countryCode' for key 'PRIMARY', query was: INSERT  INTO `temando_product_attribute_mapping` (`node_path_id`,`label`,`description`,`mapping_attribute_id`,`is_default`) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?)


texts: magento 2 "Header already sent " issue when there is large data in array and json_encode function using in ajax controller

texts:
I am developing functionality in Magento 2.3 version and calling controller function by using Ajax.

Controller function return product data and everything is working fine when customer is not login.

While when we try to login and return product data then it throw the error

"Exception: Warning: Cannot modify header information - headers already sent by (output started at app/code/Magento2/CustomProduct/Controller/Index/Index.php:74) in vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php on line 148 in vendor/magento/framework/App/ErrorHandler.php:61"

Below is the array and json_encode

public function execute() {

    foreach ($collection as $singleProduct):

        $imageUrl = $imageUrl;
        $html.='
';
        $html.='
getProductUrl().'">getName() . '">
';
        $html.='
getProductUrl().'">' . $singleProduct->getName() . '
';
        $html.='
getProductUrl().'" title="View">View
';
        $html.='
';

    endforeach;
    echo json_encode(array('html_data' => $html,'page_index' => $page));
}

and Ajax function is:

function load_product(category_id, page, current_obj) {
                setTimeout(function () {
                    $.ajax({
                        method: "POST",
                        url: controller_url,
                        async: true,
                        data: {cat_id: category_id, p: page},
                        success: function (data) {
                            //alert(data);
                            var result = JSON.parse(data);
                            $("#insert_div" + category_id).html(result.html_data);
                            if (current_obj != 'default_val') {
                                setActivePageing(current_obj);
                            } else {
                                setActivePageing('default_val');
                            }
                            $("#wait").hide();

                        }
                    })
                }, 2000);
            }

Please help anybody this is the strange issue.


texts: How to create a price slider without using extension on Magento 2?

texts: I want to create a price slider without using any third party extension and would like to create it on my own in Magento 2. Could anyone please help me with that?


texts: Hide price and popup form in selected product in category product list page

texts:
I need to hide price in selected product in category list page. [PFA]

I know, there are many extensions for it.

I have used 2-3 extensions for the same but it changes my theme. Because they override list.phtml file.

I need to change only Price div and add my custom code but I can't figure out how to achieve this?

Edit

Before Extension

After Extension

Does anyone know block name for that Price div ?


texts: Print sql query responsible for generating reports in Admin > Reports > Sales > Orders

texts:
I need to do exactly I asked in the question.

I have overrided the reports generation file app/code/core/Mage/Adminhtml/Adminhtml/Block/Report/Sales/Sales/Grid.php to app/code/local/Mage/Adminhtml/Adminhtml/Block/Report/Sales/Sales/Grid.php.

Now I want to print the query that is being generated but I am clueless when I see the ResourceModel is set dynamically like below:

public function getResourceCollectionName()
    {
        return ($this->getFilterData()->getData('report_type') == 'updated_at_order')
            ? 'sales/report_order_updatedat_collection'
            : 'sales/report_order_collection';
    }

I modified this function like below but in vain:

public function getResourceCollectionName()
    {
        $resCollName = ($this->getFilterData()->getData('report_type') == 'updated_at_order')
            ? 'sales/report_order_updatedat_collection'
            : 'sales/report_order_collection';
        echo Mage::getResourceModel($resCollName)->getSelect();die;
        return $resCollName;
    }

How to print query generated in this function so I don't have to override the Abstract.php file ?


texts:
I have a js file. Everytime I change something I need to execute the following commands:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:static-content:deploy nl_NL

nl_NL it's my case. Is there a way to avoid this ? cuz it is very frustrating :).


texts: Magento 2 : How to get best seller product collection using object manager in home page custom slider?

texts: How to add best seller products in home page custom slider. So, I need a best seller product collection in phtml file.


texts: Creating Category Again while uploading products with CSV file

texts: I have created category and subcategory and try to upload products to those category and subcategory with CSV file but the problem is again it is creating category and subcategory.


texts: Rupee symbol not appearing in Internet explorer only

texts: I am using default rupee symbol configured via magento currency setup. Most of the browsers it is working fine except internet explorer. In i.e. below is what is shown instead of symbol.


texts: di.xml ExtensionPool create/read handlers Conflicts

texts:
I am creating extensionpool handlers to save data in multiple tables.

There are total 3 tables :

1 : Sliders

2 : SliderItems

3 : SliderSelectedItems

When I create/update Slider, list of selected slider items displays in TAB like this

I can see which slides are assigned to a slider.
Also when I check/uncheck the slider items, record is added to SliderSelectedItems table, which stores only item_id and slider_id.

Now, When I create/update slider items, I can choose multiple slider in which this item will be displayed. Like this,

When I save this, record is added to SliderSelectedItems

To add records in SliderSelectedItems, I have created extensionpool Handlers

<type name="Magento\Framework\EntityManager\Operation\ExtensionPool">
    <arguments>
        <argument name="extensionActions" xsi:type="array">
            <item name="MageSpark\OwlCarouselSlider\Api\Data\SliderInterface" xsi:type="array">
                <item name="read" xsi:type="array">
                    <item name="sliderReader" xsi:type="string">MageSpark\OwlCarouselSlider\Model\ResourceModel\Slider\Relation\ReadHandler</item>
                    <item name="sliderItemReader" xsi:type="string">MageSpark\OwlCarouselSlider\Model\ResourceModel\SliderItem\Relation\ReadHandler</item>
                </item>
                <item name="create" xsi:type="array">
                    <item name="sliderCreator" xsi:type="string">MageSpark\OwlCarouselSlider\Model\ResourceModel\Slider\Relation\SaveHandler</item>
                    <item name="sliderItemCreator" xsi:type="string">MageSpark\OwlCarouselSlider\Model\ResourceModel\SliderItem\Relation\SaveHandler</item>
                </item>
                <item name="update" xsi:type="array">
                    <item name="sliderUpdater" xsi:type="string">MageSpark\OwlCarouselSlider\Model\ResourceModel\Slider\Relation\SaveHandler</item>
                    <item name="sliderItemUpdater" xsi:type="string">MageSpark\OwlCarouselSlider\Model\ResourceModel\SliderItem\Relation\SaveHandler</item>
                </item>
            </item>
        </argument>
    </arguments>
</type>

Now, when I am saving the slider, it works fine.
But when I save the slider item, SAVE HANDLER of SLIDER is called.
It conflicts my slider item save/read handler.

I am confused, any help would be appriciated.
Thank you.


texts: Caching not working after upgrading to 2.3.2

texts:
After I update my Magento 2 installation to 2.3.2 from 2.3.1 the site caching seems not working as expected. I've double checked the FPC enabled, the site is in production mode. Still, the first response takes more than 20 seconds to the response. Here is the response header I get.

Any idea what causing this?

Please note:
Here I see the expires date is earlier than the current time.

Update:

I completely disable the cache, then the loading time takes about 32.x seconds (without caching). With caching enabled it takes 20.x seconds.


texts: Magento2 : How to retrieve Values from keys in System multiselect field

texts:
I have implemented a system configuration multiselect field (system.xml).

   <field id="foolist" translate="label" type="multiselect" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Allow Foo</label>
                    <source_model>Vendor\Module\Model\Config\Source\Foolist</source_model>
                </field>

with :

<?php

namespace Vendor\Module\Model\Config\Source;

use Magento\Framework\Option\ArrayInterface;

class Foolist implements ArrayInterface
{
    public function toOptionArray()
    {

        $arr = array (
            1 => "foo",
            2 => "bar",
            4 => "toto",
            6 => "Bla"
        );

        $ret = [];

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

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

        return $ret;
    }

}

I manage to get the memorized selected values using (in Model):

$Entries = $this->_scopeConfig->getValue('section/group/foolist', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

Which will return for example "1,3,4", corresponding to the keys of the foolist field.

Is it possible to access the corresponding values (ie foo, toto and Bla)?


texts: Is there in any performance difference between defining event in front/admin and global?

texts:
I was wondering that what is difference between defining event in frontend/admin and global. I know that we can define events  in admin or frontend and also can be define the same events in global.So is there any performance difference between Frontend/admin and global

thank you


texts: Exception #0 (Exception): Notice: Undefined variable on third party API url

texts:
I am using third party API URL from NAV and it has predefined variable to be passsed in the API.
URL is something like this
MAINAPIHOSTURL/PostedSalesHeaderAPI?$filter=No%20eq%20%27FZPSI-00010%27&$format=json
Here $filter and $format is predefine variable used in API section.
when use like this in magento code it show error like
Exception #0 (Exception): Notice: Undefined variable: filter
When i define it using below code like
 $filter = ''; $format = ''; in the function it passed empty in url so i am not able to get result from api call.
What can we do for this.


texts: Uncaught ReferenceError while creating Multistore

texts:
Uncaught ReferenceError: Mage is not defined at example.in/:69
Uncaught ReferenceError: Translate is not defined at example.in/:96
Uncaught ReferenceError: jQuery is not defined at example.in/:120
Uncaught ReferenceError: Varien is not defined at example.in/:244
Uncaught ReferenceError: Varien is not defined at example.in/:367
Uncaught ReferenceError: jQuery is not defined at example.in/:460
Uncaught ReferenceError: Catalog is not defined at example.in.in/:542
Uncaught ReferenceError: jQuery is not defined at example.in/:628

How to resolve this issue. Please help.


texts: catalog_product_load_before event gives getRequestedRouteName() error

texts:
I am trying to add an event observer to run before product page load. I am receiving an error.

Here is my config.xml

<config>
    <frontend>
        <events>
            <catalog_product_load_before>
                <observers>
                    <product_load_handler>
                        <class>hsc_pce/observer</class>
                        <method>productLoadHandler</method>
                    </product_load_handler>
                </observers>
            </catalog_product_load_before>
        </events>
    </frontend>
</config>

Here is my observer function

public function productLoadHandler(Varien_Event_Observer $observer)
{
    echo 'foobar';
    return;
}

I receive the echo and this error

  foobar
  Fatal error: Call to a member function getRequestedRouteName() on a non-object in app/code/core/Mage/Core/Controller/Varien/Action.php on line 226

The echo demonstrates that the function is being called. Error occurs without echo as well. If I die() before return I do not receive the error, so it's happening afterwards.

The error is in a line that is part of the getFullActionName($delimiter='_') function, which is called by the dispatch($action) function.

I've tried digging deeper, leading me to alter the request object, but it's clear that it's leading nowhere and is not the appropriate solution.

What is causing this error, and how can I prevent it?

Update

Mage::app()->getRequest()->getRequestedRouteName() shows that the requested route name is 'catalog'.


texts:
When the order is processed for payment the Total Paid is different from the Grand Total.  It appears that the discount is being added back to the Grand Total when charging the customer.

Here is an example:

I would like to know where I can look to see where the Total Paid amount is set.  We have a custom observer doing some things prior to final check out but have not been successful in getting Magento to charge the correct amount.


texts: How to show all product thumbnails as a grid (no carousel/ribbon) in product page on Magento 2?

texts:
I've been searching for an answer for a while but maybe I'm not searching correctly... We're upgrading to Magento 2 (2.3.2 to be exact) and we're modifying our theme based on Luma. The product page displays the product thumbnails under the main product image as a carousel ribbon that the user has to click through, like so:

We don't like this because it's hiding views of our products, our customers want to see all the product images in a glance, so we wish to show these as a grid. We were able to do this in Magento 1 without issue, like this example:

I could only find options to switch between a horizontal and vertical carousel but nothing for a "grid view" or "see all thumbnails" option. I tried toying with CSS but everything I did just made the "ribbon" taller and the thumbnails remained in a single line.

I can't be the only one who wants to do this, is there an obvious setting I'm missing, or do I need to modify the theme files... and if so, what's the best approach to getting the effect we're looking for?

Thank you in advance!


texts: How to prevent memory consumption during collection enumeration?

texts:
In the following script:

    $pageSize = 1000;
    $productCollection = Mage::getModel('catalog/product')
        ->getCollection()
        ->addWebsiteFilter($website->getId())
        ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
    for ($currentPage = 1; $currentPage <= $pages; $currentPage++) {
        $productCollection->setCurPage($currentPage);

        foreach ($productCollection as $productItem) {
            $this->writeProductForStores($ioObject, $productItem, $stores, $defaultStore);
        }

        $productCollection->clear();
    }

Let's say I've processed page #1, now I'm on the page #2, processing products 1001-2000, and I don't need products 1-1000 from the first page, but they're still in the memory (I'm monitoring the script execution from top)! And the memory consumption grows as the execution goes, then falling with exception of surpassing the memory limit.

How do I clear memory after finishing processing the previous page?


texts: Exception 'Mage_Core_Exception' with message 'Invalid block type' Magento 1

texts:
The following exceptions are showing in my exception log. Could anyone help to resolve that issue and clean my exception log?

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Page_Block_Html_Under'

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Page_Block_Html_Nocart'

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Page_Block_Html_Prefooter'

In theme layout folder page.xml something is written like the follow way:

<block type="page/html_nocart" name="no_cart_message" as="no_cart_message" template="page/html/nocart.phtml">
    <block type="cms/block" name="no_cart" as="no_cart">
        <action method="setBlockId">
            <block_id>no_cart</block_id></action>
    </block>
</block>

<block type="page/html_under" name="underconstruction_message" as="underconstruction_message" template="page/html/under.phtml">
    <block type="cms/block" name="underconstruction" as="underconstruction">
        <action method="setBlockId">
            <block_id>underconstruction</block_id></action>
    </block>
</block>


texts: Magento2 How to get all store specific category if category is not include in menu?

texts:
I am using the below code to find store specific categories but here I am not getting the categories that are not included in the menu. How can I get those categories also?

    protected $_categoryHelper;
    public function __construct(
    \Magento\Catalog\Helper\Category $categoryHelper

    )
    {
    $this->_categoryHelper = $categoryHelper;
    }

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

      in template

// get current store's categories
$categories = $block->getAllCurrentStoreCategories();
foreach ($categories as $category) {
    echo $category->getName() . '<br />';
}


texts:
How can I rewrite Mage_Core_Controller_Varien_Front?
I have already tried the way we rewrite controllers but it is not working.
ADDED CODE

<frontend>
        <routers>
            <core>
                <use>standard</use>
                <args>
                    <modules>
                        <Custom_Front before="Mage_Core">Custom_Front</Custom_Front>
                    </modules>
                </args>
            </core>
        </routers>
    </frontend>


texts: How to move page builder slick slider right after breadcrumbs

texts:
I am https://store-locator-m2.magento-demo.amasty.com/amlocator/summercenter/, if add anything on description section it will come below the map section, i need to move the slider section above the map section, slider section only remaining thing as below the map
Screenshot:

Slider section class:

How to move slider only above map section?


texts: How to set qty number to add to cart on product page

texts:
How to set certain number when the product page loads up.
Default level when you click on a product the add to basket quarry is always one how to change that to different value for each store.
I know we can put the value in phtml but we can always change it to one if we enter lower number

I want to add a check of customer change the new value e.g from 2 to 1 I want a error to be shown

I was planning to override list.phtml

Magento 2 I am after


texts: how to show product sku in custom admin grid in magento2

texts:
hello everyone I have the product_id store in my database through it I want to display product SKU in admin grid, product name I showing in it

n ui_component i have

  index.xml

<column name="entity_id" class="Magneto\PopupQuestion\Ui\Component\Listing\Column\Products">
 <argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
 <item name="visible" xsi:type="boolean">true</item>
 <item name="label" xsi:type="string" translate="true">Products name</item> </item> </argument> </column> </columns>


texts: I am building a module. I need to modify the Magento2 email but I cannot send email in my localhost. Is there anyway to send email or to preview magento email in my localhost?


texts: New header displays correctly on index and product pages, but not category pages

texts:
I have just gone live with a new header design on my Magento store. It is working correctly on the index page, and is also working correctly on my product pages.

However, although showing 99% correctly on my category pages, there is one big error on that type of page.

I have designed a 20px high, 100% width (my store is 960px fixed), solid colour bar at the very top of the page behind some of the account links (sign in, my account, etc).

This shows correctly on the index and product pages, but is missing on the category pages.

The CSS I've used for the div is as follows:

{ background:#F389AF;width:100%;height:20px;position:absolute;z-index:-100; }

I'm a bit unsure why this isn't displaying, any ideas?! Thanks in advance :)


texts: Why products on magento are not aligned Magento

texts:
Why do I have some incomplete rows?
I have products arranged in 4 columns. The first raw is full, the second one is not, the third and the forth are full with products, the fifth contains only one products... so on.

Why is that problem? How can it be fixed? Can be seen here: http://www.ledpro.ro
Thank you!


texts: How to recognize the phtml file from the layout xml file?

texts:
I want to know the proper way of identifying a template file.
For e.g.
In my basket page (cart.phtml) there is a code like...

echo $this->getChildHtml('shipping');

I searched for the template for this as follows.....

I checked "checkout.xml" file for the handle "checkout_cart_index". And find where it is written "as='shipping'" and found that code as follows...

<block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>'

So I checked the "checkout/cart/shipping.phtml" file and try to modify it. But nothing happend. so I confirmed that it is not the right phtml file I am looking for.
When I enable "Template Path Hints" from admin side , then came to know that it is coming from a different folder and it is due to the extension used. And in its layout file it is written as

<checkout_cart_index>
<reference name="checkout.cart">
<block type="webshopapps_productmatrix/checkout_cart_shipping"name="checkout.cart.shipping" as="shipping" template="webshopapps/productmatrix/checkout/shipping.phtml"/>
<reference>
</checkout_cart_index>

So My question is ,what is the proper way to know the template files which is used in our page as ChildHtml ?


texts:
Magento 2.3.4 - Missing records in the Content->Design->Configuration

Can't add favicon in the Magento2.

In Admin panel -> Content -> Design -> Configuration.

Shows We couldn't found any records


texts: How to avoid a customer group from tax calculation in Magento?

texts:
For this task i did below steps to achieve this task.Is it the right way to do this.

1. Created a customer group for non Tax : Tax Free Group.

2. Add a tax class from Sales -> Tax -> Customer Tax Classes : Tax Free

3. Add a new tax rate :Sales ->Tax -> Manage Tax Zones & Rates. Add a new tax rate, call it “Tax Free”, select your country, select “*” for state and zip, and give it a rate of 0. Save the new tax rate.

Finally assigned the tax class Tax Free to group Tax Free Group.

But in the check out or cart there aren't any tax showing for taxable customers too.
Is my way correct to achieve my requirements?


texts: Magento 2 category sort in admin product add page issue

texts:
The categories are shown in the product add/edit page of the admin page is not sorted by a position as in the admin category tree.

As shown above I have this type of sorting on the admin page.
But as shown like below product add page I have like this.


texts: Magento2.3 - My saleable quantity is reducing twice after placing an order

texts:
After creating an order with qty = 5 I see that the saleable quantity of that product reduces by 10.

I already checked the table inventory_reservation and two rows where created:

Attached the screen shot here.

Is there something I can do to stop this from happening?

Thanks!


texts: Add new tab in catalog rule tab in admin magento2

texts: I want to add new tab below action tab I searched on the web but unable to get any solution and what should I use ? please give me any idea thanks in advance!


texts: Limit reviews loaded into the product page

texts:
I have currently got to the point whereby my site loads all of the reviews for a product and then only shows the first ten on the page. However, as there are tens of thousands of reviews on one particular product, when it tries to load every one of them it kills the page.

The line:

<?php $_items = $this->getReviewsCollection()->getItems();?>

Is where you could suggest the change needs to be made (this being inside Review/product/view/list_tab.phtml). However, using setPageSize(); or limit(); brings up the error of trying to use the method on a non object.

Any approach to this problem would be welcome as this is obviously the most bought product for the store! Thank you in advance


texts: How to change childhtml value twice in Magento

texts:
I have a scenario such that the childhtml should be called in two different places of same parent template file and for each childhtml is called it should return a phtml which contains the variable getType should be changed.

How is there

------section1------

 $block->getChildBlock('demoPage')->setSection('section1');

  echo $block->getChildHtml('demoPage');

------section2------

  $block->getChildBlock('demoPage')->setSection('section2');

  echo $block->getChildHtml('demoPage');

In child phtml

echo $this->getSection();

The above one is the situation can anyone help this out.


texts: Magento-CE 2.3.0 installation error on Xampp

texts:
Error in Installation:

  [php7:error] [pid 10084:tid 1952]
  [client ::1:53679] PHP Fatal error:  Uncaught RuntimeException: The
  path
  "C:/xampp/htdocs/magento/lavoska/generated/code/Magento/Swatches/Block/Adminhtml/Product/Attribute/Edit/FormFactory.php.10084"
  cannot be renamed into
  "C:/xampp/htdocs/magento/lavoska/generated/code/Magento/Swatches/Block/Adminhtml/Product/Attribute/Edit/FormFactory.php"
  Warning!rename(C:/xampp/htdocs/magento/lavoska/generated/code/Magento/Swatches/Block/Adminhtml/Product/Attribute/Edit/FormFactory.php.10084,C:/xampp/htdocs/magento/lavoska/generated/code/Magento/Swatches/Block/Adminhtml/Product/Attribute/Edit/FormFactory.php):
  The process cannot access the file because it is being used by another
  process. (code: 32)\r\nClass
  Magento\Swatches\Block\Adminhtml\Product\Attribute\Edit\FormFactory
  generation error: The requested class did not generate properly,
  because the 'generated' directory permission is read-only. If ---
  after running the 'bin/magento setup:di:compile' CLI command when the
  'generated' directory permission is set to write --- the requested
  class did not generate in
  C:\xampp\htdocs\magento\lavoska\vendor\magento\framework\Code\Generator.php
  on line 135, referer: http://localhost:81/magento/lavoska/setup/


texts: How to get all orders in order history page magento 2.3

texts:
I need to get all orders on the sales order history page without any limit I need to get the orders. In Magento 2.3.
I had tried the below code  using the OrderCollectionFactory but I am getting the error
if (!$this->orders) {

            $this->orders = $this->orderCollectionFactory->create($customerIds)->addFieldToSelect(
                '*'
            )->addFieldToFilter(
                'status',
                ['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
            );
            $this->orders->getSelect()
            ->joinLeft(
                ["sop" => "amt_sales_order_payment"],
                'main_table.entity_id = sop.parent_id',
                ['po_number']
            )
            ->where('sop.po_number LIKE ?',$po_number);

            $this->orders->setOrder(
            'ext_order_id',
            'desc'
            );

        }

Uncaught Error: Call to a member function create() on null in
/var/www/html/app/code/Sm/SalesOrderGridTable/Block/Order/History.php:139
Stack trace: #0


texts:
I'm adding product to cart using {baseUrl}/rest/{store_code}//V1/carts/mine/items

If requested qty not available in stock then in response you'll get The requested qty is not available I want to translate this based on store view ?

Any ideas ? Language pack doesn't work at API level where at theme level it working using language packs.

Thanks in advance.


texts: After succesfully installing Magento 2.0 on my local server, going to the backend gives a 404 and the front end looks like its missing the css. Any ideas? Im not receiving any error messages other than 404.


texts: ERROR: Invalid backend model specified: (when extracting product data)

texts:
I am trying to setup a module that will extract my Base (CAD) Canadian prices and show converted USD price. To me it seems like I set up everything as needed, but there is error in the admin panel when I try to EXTRACT product data.

  ERROR:  Invalid backend model specified:
  customcatattrb/product_attribute_backend

  /htdocs/app/code/local/Meteorify/Customcatattrb/sql/customcatattrb_setup/mysql4-install-0.0.1.php

<?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'price_usd', array(
    'type'                       => 'decimal',
    'label'                      => 'USD Price',
    'input'                      => 'text',
    'backend'                    => 'customcatattrb/product_attribute_backend_usdprice',
    'global'                     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
    'required'                   => false,
    'searchable'                 => false,
    'filterable'                 => false,
    'comparable'                 => false,
    'is_configurable'            => false,
   'group'                      => 'Price'
));
$installer->endSetup();
?>

  htdocs/app/code/local/Meteorify/Customcatattrb/Model/Product/Attribute/Backend/Usdprice.php

class Meteorify_Customcatattrb_Model_Product_Attribute_Backend_Usdprice extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
    /**
     * Before save method
     *
     * @param Varien_Object $object
     *
     * @return Mage_Eav_Model_Entity_Attribute_Backend_Abstract
     */
    public function beforeSave($object)
    {
        $attrCode = $this->getAttribute()->getAttributeCode();
        $basePrice = $object->getData('price');

        $value = Mage::helper('directory')->currencyConvert($basePrice, Mage::app()->getStore()->getDefaultCurrencyCode(), 'USD');
        $object->setData($attrCode, $value);

        return $this;
    }
}

Could someone please check the codes above and see if there are any problems causing the error

Invalid backend model specified: customcatattrb/product_attribute_backend


texts: Magento 1.9.3 reindex notification in admin won't disappear

texts:
All reindexing have been done and shows green(Ready) status.

Re-indexing has done manually in admin panel and tried to it with SSH, but still, it shows re.indexing required message, just wondering is it a problem or why it pops up every time!

Thanks!


texts: Error after installing Simiconnetor app builder in magento 2

texts:
after installing when i'm tring to access the general setting n simi option i'm getting the followings error

Exception #0 (ReflectionException): Class Simi\Simiconnector\Model\Config\Source\ViewType does not exist