texts: How to get Subcategory and its products with details in magento

texts:
I want to show subcategory with its products in list.phtml. I am trying

<?php $_helper = Mage::helper('catalog/category') ?>
<?php $_categories = $_helper->getStoreCategories() ?>
<?php $currentCategory = Mage::registry('current_category') ?>
    <?php if (count($_categories) > 0): ?>

            <?php foreach ($_categories as $_category): ?>

                    <?php if ($currentCategory && $currentCategory->getId() == $_category->getId()): ?>
                    <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
                        <?php $_subcategories = $_category->getChildrenCategories() ?>
                        <?php if (count($_subcategories) > 0): ?>

                                    <?php foreach ($_subcategories as $_subcategory): ?>

                                <?php echo $_subcategory->getName();
                                     $category = Mage::getResourceModel('catalog/category_collection')
                                    ->addFieldToFilter('name', $_subcategory->getName());
                                    print_r($category->getData());

                                ?>

                        <?php endforeach; ?>

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

        <?php endforeach; ?>

    <?php endif; ?>

it will show all sub category with its details but how can i find subcategory products and details through it.


texts: Unable to receive copy of sales order email

texts:
I am having a problem receiving copies of order emails.

I have configured Mage to as follows:
System | Configuration | Sales |Sales Emails
Enabled = Yes
...
Send Order Email Copy To: my email address
Send Order Email Copy Method: Separate Email (but it also does not work for Bcc)

The Order Confirmation successfully sends to the person who placed the order, but the copy is never sent (as far as I can tell).

My email is configured to send via localhost:25. I beleive this is working because the buyer gets the order confirmation.

Is the order confirmation, and the copy, both sent the same way? Some people say the copy is sent by scheduled cron. I installed AOE_Scheduler and it says the cron jobs are running fine.

Can you help me troubleshoot why the order copy email is not being generated/sent? If it is related to Cron, how can I check that the cron job is running in order to send the queue?


texts: How I can convert this cart to sidebar in version 2.3.5? anyone have any ideas, thank you very much


texts: htaccess URL rewrites with GET parameters

texts:
I'm trying to rewrite an URL to a CMS page and append some GET parameters.

My CMS page has the code "foobar" and can be accessed via "/foobar".
On the CMS page i have some custom logic which uses GET parameters, e.g. "/foobar?test=123". This domain can be called without problems.

Now i want to make that accessible via "/foobar_123" and tried it with the rule:

  RewriteRule ^foobar_([0-9]+)$ /foobar?test=$1 [L]

which isn't working (not found). I guess it's because of Magento looking for an CMS page called "foobar?test=123" ?

I also tried defining the rewrite in my config.xml, like that:

<rewrite>
    <foobar_test>
        <from><![CDATA[#^/foobar_([0-9]+)#]]></from>
        <to><![CDATA[/foobar?test=$1]]></to>
    </foobar_test>
</rewrite>

Which isn't working as well (leads to an 404).

How can i archieve the wanted behaviour?

Thx


texts:
I cloned, by git, a live magento installation, but I receive the following error:

Fatal error: Call to a member function getFrontNameByRoute()

I tried some suggestions goggling a bit, but no one of them works.
So, I used xdebug and found the variable $routeName set as 'install'. I guess magento doesn't find some file, but I've double checked etc/local.xml and the var folder permissions.

Does anyone know what magento is looking for otherwise it search for the install route?
thanks


texts: Set shipping method price based on payment method

texts:
I have added new shipping method InPost Kurier in my Magento 2.2.4 also i have enabled Cash on delivery payment method and visa ...

I have set default price 15 for that shipping method , but now i need to set it to 20 if user choose cash on delivery method

any help please ?


texts: How to redirect page to 404 in magento2?

texts: I want to redirect sales/order/history page to 404 in magento2.


texts: How to add google recaptcha on checkout page

texts:
I want to add google Recaptcha on checkout page in Magento 2.
Please advice me.


texts: Troubleshooting Magento 1.9.2.4 with PHP 7

texts:
I've been doing some research and decided to go ahead with an upgrade to PHP v7. Initially my front-end and back-end were non responsive, just a blank white page.

Running the latest version of Magento 1.9.2.4.

I came across the inchoo compatibility module: http://inchoo.net/magento/its-alive/

This resolved my front-end issues, but I cannot login to my admin panel. The header loads but that is it. There are no errors in any of the logs.

I did a search in my local and community directories to check for incompatible code that might be responsible:

grep -rnPe .'->\$.+\[.+\]\(.*\)'

The only results were from the core which are resolved by the Inchoo PHP 7 module.

Others seem to have had the exact same problem:

  from magento 1.9.2.2, uploaded Seven to the server, then change to PHP 7.0 and my side goes blank.
  No errors, just nothing on the screen.

I'm sure this is a common issue and would like to get this documented since I could not find any solution to resolve this.

With no errors in the logs I am at a loss on how to troubleshoot the back-end issues.

Can someone provide a solution or guide me into how to resolve this?

For the close happy people in this section of SE:

I'm not asking if it is compatible, I'm asking how to make it work given the troubleshooting I've already done


texts: How to get the order item id in Magento 2 (not the order ID)?

texts:
I'm trying to show product information on Order_View page. I have selected all of the product I have ordered from many orders to show on a page (Order_History). On the Order_History, When you click on Order Detail, it will show the product you have clicked on with information about price, qty...My idea to do that is I want to get the itemId in table sale_order_item, from that, I can get specific the product I want to show on.
Can anyone show me how can we get the itemId?? I refer to this link, But, it did not solve my problem.

<?php
 namespace Magento\History\Block;

 class Display extends \Magento\Framework\View\Element\Template
{

protected $order;
protected $orderRepository;

public function __construct(

    \Magento\Sales\Api\Data\OrderInterface $order,
    \Magento\Sales\Api\OrderRepositoryInterface $orderRepository
)
{
    $this->order = $order;
    $this->orderRepository = $orderRepository;
}

public function yourFunction()
{
    $order_increment_id = '4';
    $order = $this->order->loadByIncrementId($order_increment_id);
    $orderId = $order->getId();
    $order = $this->orderRepository->get($orderId);
    $item_data = [];
    $count = 0;
    foreach ($order->getAllVisibleItems() as $item) {
        echo $item->getName();
        $item_data[$count]['item_id'] = $item->getItemId();
        $item_data[$count]['product_id'] = $item->getProductId();
        $count++;

    }
    return $item_data;
}

}


texts: Magento2: Block not created from controller

texts:
How to create block from controller by ajax method?

    $result = $this->resultJsonFactory->create();
    $resultPage = $this->_resultPageFactory->create();
    $block = $resultPage->getLayout()
        ->createBlock('Module\Ajaxcart\Block\BuildProductInfo')
        ->setTemplate('Module_Ajaxcart::buildproductinfo.phtml')
        ->toHtml();

Showing Cache Exception Error


texts: Custom store credit get applied twice on the payment gatway total in magento 2

texts:
When applying for store credit/custom fees(custom module) in one-page checkout in Magento 2. It gets applied correctly on the grand total. But when pay using a payment gateway(razor pay), my store credit gets applied twice on that payment value.

Screenshot for store credit applied correctly on the grand total.

Screenshot for when pay using razor pay my grand total and payment total(store credit get applied twice) get different.

I followed this for reference link
How to add fee to order totals in Magento 2


texts: product images are not showing category page magento ver. 2.3.4

texts:
I have moved my website from the development server to the live server! The product images in category listing page are not showing!
I have tried many solutions which have been given in online
I gave folder permission 777
I used these commands
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
But could not get images on the category page. I also tried to execute:
php bin/magento catalog:images:resize
the images are fine in the backend, also I have noticed that images are loading in the frontend but not displaying only lazy load images are coming!
the data-source image is (data-src="http://www.rialitradecentre.com.au/pub/media/catalog/product/cache/cf7b02caee139e721502aa370caab615/a/u/aus-crete_premium_industrial_1.png)
But source image is different (src="data:image/gif;base64,R0lGODlhkAGQAffKAOrq6ujo6Ofn5///)

here is my website link webiste link
Can anyone please help me where are wrong! what I have left!


texts: Function getSelectionFinalTotalPrice, Bundle price update

texts:
Goodnight,
I updated the model Price.phtml that handles the prices of the bundled products.
My need is to add a surplus price on regular prices based on a custom attribute (supplementoprezzo). The bundle is Dynamic.
This is the function interested:

public function getSelectionFinalTotalPrice ($bundleProduct, $selectionProduct, $bundleQty, $selectionQty, $multiplyQty = true, $takeTierPrice = true)
{

$attribute = $bundleProduct->getResource()->getAttribute('supplementoprezzo');
$supplementoprezzo = $attribute_value = $attribute ->getFrontend()->getValue($bundleProduct);

if (is_null($selectionQty)) {
    $selectionQty = $selectionProduct->getSelectionQty();
}

if ($bundleProduct->getPriceType() == self::PRICE_TYPE_DYNAMIC) {

    $price = $selectionProduct->getFinalPrice($takeTierPrice ? $selectionQty : 1);

} else {
    if ($selectionProduct->getSelectionPriceType()) { // percent
        $product = clone $bundleProduct;
        $product->setFinalPrice($this->getPrice($product));
        Mage::dispatchEvent(
            'catalog_product_get_final_price',
            array('product' => $product, 'qty' => $bundleQty)
        );
        $price = ($product->getData('final_price')) * ($selectionProduct->getSelectionPriceValue() / 100);

    } else { // fixed
        $price = $selectionProduct->getSelectionPriceValue();
    }
}
$price = $this->getLowestPrice($bundleProduct, $price, $bundleQty);

if ($multiplyQty) {
    $price *= $selectionQty;
}

$price += $supplementoprezzo;
return $price;
}

The last two lines are the lines affected: the variable $supplementoprezzo is a float number.
The problem (and the odd thing) is that if I enter a number like this:

$price += 2.50;
return $price;

everythink works like a charme..
Instead summing the variable (which also is a number)

$price += $supplementoprezzo;
return $price;

the final price of the bundle is not updated with the surplus value.
I tried with various casting for the variable (float, floatval number_format, etc) .... nothing.
Any suggestions?

Thank you

Save


texts: Magento 1.9 : How to add required class in custom options, if a custom checkbox selected?

texts:
On product detail page, product's custom options not display till then custom checkbox("Interested in Embroidery") not checked. When checkbox checked then custom option display.

I want that, when checkbox not checked custom options not require when checked, custom options require.

Please check following link:

http://superbuniforms.com/magento/medical-lab-coat-unisex-sky-blue.html

Here, a checkbox "Interested in Embroidery". When you checked checkbox then open a section which is "Product Custom options" which is not required. But I want to  required all options when checkbox is checked otherwise not required.

Please suggest.

Thanks


texts: How many design patterns does Magento Have?

texts: How many design patterns does Magento 2 have?


texts: Magento 2 : How to Add wysiwyg Editor in Frontend Custom Form

texts:
I wanted to create WYSIWYG editor in custom form frontend.

What I tried doing is :

Created WysiwygConfig.php file inside Vendor/Extension/Plugin directory with code :

class WysiwygConfig {
    public function afterGetConfig($subject, \Magento\Framework\DataObject $config)
    {
        $styleArray = [
            'Hero - Image' => 'hero__image',
            'Hero - Heading' => 'hero__heading',
            'Hero - Action Button' => 'hero__primary-action'
        ];

        $styles = array_map(function($title, $class) {
            return "{$title}={$class}; ";
        }, array_keys($styleArray), array_values($styleArray));

        $config->addData(["settings" => ["theme_advanced_styles" => implode("; ", $styles)]]);

        return $config;
    }
}
?>

Created di.xml file inside Vendor/Extension/etc/ folder and provided plugin name with type.
I have frontend template where I want to implement WYSIWYG editor.

I had followed one tutorial but that one is incomplete for me. Please help me to do it.


texts:
Can anyone please tell  me How to create new Advance Dataflow Profile via script during extension installation?

I asked earlier also but no response: How to Create Magento Dataflow advanced profiles during extension installation in Magento 1.9.x?

Thanks


texts: Before place order validation in magento2

texts: In magento2 before place order check new customer form (billing address form) open and filed is not fill then not place order and show message please fill the form then place order, now in magento2 only payment method validation check if you can not select payment method then show message but my requirement is also check payment page new customer billing address form validation also check. so any one to implement know about that help us.


texts: magetno2 magetique theme template monster No such entity with id = 57

texts:
I have deleted some products now website is not working(front end crash) showing code on front page

No such entity with id = 57 in store_group  table my theme root category id is =57.

default store id is 19

Thanks


texts:
This Error is coming on Magento 2.2.3 frontend after Migrating the data from Magento 1.9

  Exception #0 (Exception): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "217" already exists.

This Error is coming on few Products, not on all products.

I have applied few fixes from google, but nothing is working.


texts: Searching with or without spaces or special signs

texts:
In my store I've set the search type to "Combined" and I'm looking for the exact name that I use for my products.

The problem is that some articles use spaces, others use the "-" sign and the rest is written without any spaces or special signs.

How can I set it up so that for example:

My product name is KNG-HF2000

My search input could be KNGHF2000 or KNG-HF2000 or KNG HF2000

And the tricky part is, I only want that product to be the result for all search inputs.

Is there some way to configure that without having to change all my product names?

I was looking at this.

But there has to be some sort of rewrite function to strip the name en search input of spaces and special signs, so u can compare them stripped results?


texts: Is it possible to set an auto reply email for “contact us” form

texts: I'm wondering is it possible to create an auto reply message to emails received through contact-us form?


texts: Error javascript define magento2 : window.checkout.quoteData or store code are undefined

texts:
I cannot inject some javascript dependencies of magento in my main.js.

ex:
'Magento_Checkout/js/action/get-payment-information',
'Magento_Checkout/js/model/totals'

Uncaught TypeError: Cannot read property 'quoteData' of undefined   at quote.js:13

Uncaught TypeError: Cannot read property 'storeCode' of undefined  at url-builder.js:12

I see problem with window.checkoutConfig

Do you have an idea to fix that ?

define([
    "jquery",
    'Magento_Checkout/js/action/get-payment-information',
    'Magento_Checkout/js/model/totals'
],
function ($, getPaymentInformationAction, totals) {});


texts: No user created after magento installation

texts:
I installed fresh magento 1.9.2.0

just copied the magento folders and after that created database using cpanel.

now, i dont know what username and password to give in backend.

i followed this

i run SELECT * FROM admin_user; and than it showed :

if the user created already, than somehow we can change username and password, here there is no user created!


texts: Installing Magento2 extension without using command line

texts: I have downloaded a Magento2 extension in zip format. I have access to the FTP; but not command line in server. How this can be installed without using command line tools?


texts: Is there a some solution to use npm packages within a Magento 2 module?

texts:
The main idea - don't keep JS files which belong to some NPM packages in a module repository?

Maybe someone have some solution of thoughts.


texts: Does loading a product using Mage::getModel('catalog/product') give out error messages if nothing is found?

texts:
for a relaunch I've been trying to output some 301 redirect for our htaccess (the old system was not magento).

So I've exported an array of 'old_url' => 'product_id' and now I'm trying to loop through it to get our new urls, using something like this:

foreach($arr as $url => $prodId) {

    $oldurl = $url;

    $product = Mage::getModel('catalog/product')
                ->setStoreId($store_id)
                ->loadByAttribute('objektnummer', $prodId);

    $newurl = $product->getProductUrl();

    echo "Redirect 301 " . $oldurl . "\t\t" . $newurl . "\n";

}

But what I've found is that if a Produkt is not found, the loop breaks. Obviously this is rather tedious if you have 10,000s of URLs to go through.

So my question is this, if loading a product by a product_id that is not found in the database breaks the loop, how can I check it first?

It would be nice if the following returned 'FALSE' or 'NULL' or something rather than just breaking.

$product = Mage::getModel('catalog/product')
            ->setStoreId($store_id)
            ->loadByAttribute('objektnummer', $prodId);


texts: How can we send email at installation time of extension

texts:
I want send an email at installation time of the extension. But didn't find any solution yet.
Any help will be appreciated.


texts: How to test buy something in the webshop?

texts:
Hope all is well.
I'm trying to configure my Google Analytics goals at the moment, but to no avail so far. One of the goals I - clearly - would like to define is when a client has bought something.

In order to get to know what my webshop redirects to after a client places an order, I'd like to test-buy an item and walk through the complete process - without having to pay the actual amount. Is there any convenient way to do this?

Many thanks in advance,

AWXX


texts: Add customer custom attribute to customer grid for searching and filtering

texts:
I have Magento 2.1.3 and have added a custom field in to the admin area of customers which works nicely, however I am now trying to add that field to the customer grid view in the admin area so we can search and filter by that field.

I have got the column to appear in the customer grid view but the data values for that field/record are not showing, the column is just blank.

'I think' I have to add to indexer.xml, but when I do a reindex I get an SQL error - details below...

Here is my Setup/InstallData.php

<?php
namespace custom\CustomerPut\Setup;

use Magento\Framework\Module\Setup\Migration;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
/**
 * Customer setup factory
 *
 * @var \Magento\Customer\Setup\CustomerSetupFactory
 */
private $customerSetupFactory;
/**
 * Init
 *
 * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
 */
public function __construct(\Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory)
{
    $this->customerSetupFactory = $customerSetupFactory;
}
/**
 * Installs DB schema for a module
 *
 * @param ModuleDataSetupInterface $setup
 * @param ModuleContextInterface $context
 * @return void
 */
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{

    $installer = $setup;
    $installer->startSetup();

    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
    $entityTypeId = $customerSetup->getEntityTypeId(\Magento\Customer\Model\Customer::ENTITY);
    $customerSetup->removeAttribute(\Magento\Customer\Model\Customer::ENTITY, "customer_account");

    $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, "customer_account",  array(
        "type"     => "varchar",
        "backend"  => "",
        "label"    => "Customer Account",
        "input"    => "text",
        "source"   => "",
        "visible"  => true,
        "required" => true,
        "default" => "",
        "frontend" => "",
        "is_used_in_grid" => true,
        "unique"     => false,
        "note"       => ""

    ));

    $customer_account   = $customerSetup->getAttribute(\Magento\Customer\Model\Customer::ENTITY, "customer_account");

    $customer_account = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'customer_account');
    $used_in_forms[]="adminhtml_customer";
    $used_in_forms[]="checkout_register";
    $used_in_forms[]="customer_account_create";
    $used_in_forms[]="customer_account_edit";
    $used_in_forms[]="adminhtml_checkout";
    $customer_account->setData("used_in_forms", $used_in_forms)
        ->setData("is_used_for_customer_segment", true)
        ->setData("is_system", 0)
        ->setData("is_user_defined", 1)
        ->setData("is_visible", 1)
        ->setData("sort_order", 100);

    $customer_account->save();

    $installer->endSetup();
}
}

Here is my etc/indexer.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
<indexer id="customer_grid" class="Magento\Framework\Indexer\Action\Entity" primary="customer">
    <fieldset name="customer" source="Magento\Customer\Model\ResourceModel\Customer\Collection" provider="Magento\Customer\Model\Indexer\AttributeProvider">
        <field name="customer_account" xsi:type="filterable" dataType="varchar"/>
    </fieldset>
</indexer>
</config>

When I rebuild in the index I get the following SQL error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.customer_account'

What am I missing?
Any help would be most appreciated
Thanks


texts: How to add foreach result to column grid?

texts:
I try to get the foreach result in a grid column (I have the result but I don't how to put it into the column for each category id).

my grid.php

public function _prepareCollection()
    {
    $subcategories = Mage::getModel('catalog/category')
    ->setStoreId(Mage::app()->getStore()->getId())
    ->getCollection()
    ->addAttributeToSelect('*')
    ->setOrder('parent_id', 'ASC');
    $categories = array();
foreach ($subcategories as $category){
    //do something with $category and put it in Route column
    if ($category['level'] > 1) {
    $categories[$category['entity_id']] = array('category_route' => $category['level'] == 2 ? $category['name'] : $categories[$category['parent_id']]['category_route'] ." -> ". $category['name']);
}
var_dump($categories[$category['entity_id']]);
}
        $collection = Mage::getModel('thorleif/commerciaux')->getCollection();
        $collection->addFieldToFilter('entity_id',array("nin"=>array(1,2)));
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

    public function _prepareColumns()
    {
        $this->addColumn('entity_id',
            array(
                'header' => 'ID',
                'align' => 'left',
                'width' => '10%',
                'index' => 'entity_id'
            )
        );
        $this->addColumn('name',
            array(
                'header' => 'Category Name',
                'align' => 'left',
                'index' => 'name'
            )
        );
        $this->addColumn('route',
            array(
                'header' => 'Route',
                'align' => 'left',
                'index' => array($category['name'] .'>'. $category['name'])
            )
        );

The result of the var_dump it's like this


texts:
what I want to do is that when the user clicks in the review's summary this opens up a popup with the review.
That finally I got it with the fancybox and a hidden div that contains this

<?php echo $this->getLayout()->createBlock('review/product_view_list')->setTemplate('review/product_info_review.phtml')->toHtml(); ?>

so when you click in the summary the fancyboax loads that div.
But my form doesn't work, the submit button does nothing.


texts:
How can I write this same query, but with magento language ?

        $table = $resource->getTableName('sales/order');

        $total_quadrante = $readConnection->fetchAll('SELECT base_subtotal FROM ' . $table
        . ' WHERE '
        . ' customer_id = ' . (int)$customerId
        . ' AND (created_at BETWEEN '
        . '"' . $date_begin . '"'
        . ' AND '
        . '"' . $date_end . '"' . ')');

And I have this loop to get the sum from the orders from $total_quadrante:

    foreach($collection as $child) {
        $gasto += $child['base_subtotal'];
    }


texts: system.xml fields are not saving in magento

texts:
Hi today i'm working on system.xml file. it's not saving correctly.

system.xml

<custom_field translate="label">
     <label>Add Class and it's Params</label>
     <frontend_model>hello/adminhtml_form_field_addclass</frontend_model>
     <backend_model>hello/system_config_backend_addclass</backend_model>
     <sort_order>6</sort_order>
     <show_in_default>1</show_in_default>
     <show_in_website>0</show_in_website>
     <show_in_store>0</show_in_store>
</custom_field>

Test\Block\Adminhtml\Form\Field\AddClass.php

<?php

class Test_Hello_Block_Adminhtml_Form_Field_AddClass extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{

    protected function _prepareToRender()
    {
        $this->addColumn('add_param', array(
            'label' => Mage::helper('hello')->__('Add Parameter'),
        ));
        $this->addColumn('add_param_class', array(
            'label' => Mage::helper('hello')->__('Add Parameter Class'),
            'style' => 'width:100px',
        ));
        $this->addColumn('add_param_class_field', array(
            'label' => Mage::helper('hello')->__('Add Parameter Class Fields'),
            'style' => 'width:100px',
        ));
        $this->_addAfter = false;
        $this->_addButtonLabel = Mage::helper('hello')->__('Add Class');
    }

}

Test\Model\System\Config\Backend\AddClass.php

<?php

/**
 * Backend for serialized array data
 *
 */
class Test_Hello_Model_System_Config_Backend_AddClass extends Mage_Core_Model_Config_Data
{
    /**
     * Process data after load
     */
    protected function _afterLoad()
    {
        $value = $this->getValue();
        Mage::log($value,null,'AddClass');
        //$this->setValue($value);
    }

    /**
     * Prepare data before save
     */
    protected function _beforeSave()
    {
        $value = $this->getValue();
        //$this->setValue($value);
        Mage::log($value,null,'AddClass');

    }
}

it's saving core_config_data table like below formate.

path = customtab/custom_attributes/custom_field

value = Array,Array,Array,

Logs are created like below formate

2015-08-10T10:42:55+00:00 DEBUG (7): Array,
2015-08-10T10:58:26+00:00 DEBUG (7): Array
(
    [_1439204268814_814] => Array
        (
            [add_param] => acceptNewClass
            [add_param_class] => AcceptNewClassFields
            [add_param_class_field] => ID,PrimariContact
        )

    [_1439204284271_271] => Array
        (
            [add_param] => TokenID
            [add_param_class] =>
            [add_param_class_field] =>
        )

    [_1439204298185_185] => Array
        (
            [add_param] => memberID
            [add_param_class] =>
            [add_param_class_field] =>
        )

    [__empty] =>
)

how to save & retrieve this?

Any help on this

Thanks.


texts:
I have this table in my Magento database:
'manthan_marketplace_vendorproduct':

    entity_id  product_id  user_id
       3          35          2
       4          36          2

It shows all the products that have been added by each user(seller)
I can access the user_id value in my phtml file in this directory:

app\design\frontend\base\default\template\marketplace\seller\profile.phtml

by this code:

$seller = $this->sellerProfile();
$seller['user_id'];

but $seller which is an array of objects, doesn't have any product_id. So I should use that table to get all product_id into an array
but the Magento framework is unknown for me.

Help me please, thanks!


texts: Magento 2 - Street Address in OSC is not being saved

texts:
Got a weird issue. My site is running Magento 2.3, everything was working fine a week ago. Decided to do one last check before launch and now have a weird situation where the Street Address is not being saved.

I changed it from 2 lines to 1 but it does not work.

It also caused the checkout form to NOT validate and gives me the following error -

  Please check the shipping address information. "street" is required. Enter and try again.


texts: Group (Wholesale) Pricing Not Displaying on Product Page

texts: I have Configurable products with Associated Products attached. It's essentially just dresses in different sizes, and colors. However, when I added "Group" pricing for our wholesale customers, it only displays the "wholesale" price on the main catalog view. When I click on the item, the regular retail price is displaying, and even when I add to cart, it's not using the "Wholesale" price. I am logged in as a wholesale customer. Does anyone know how to get the product page to display this wholesale/group pricing?


texts: How to add customer new Address(multiple shiiping and billing addresses) through API in magento2.1.7

texts: How can I add customer multiple address through rest API in Magento2.1.? Hope currently there is no API for adding additional customer address.So, Please let me know is there any other option to add multiple shipping and billing addresses through rest API. Is there any kind of suggestion should be appreciated.


texts: Magento 2 - Invoice without collecting shipping cost

texts:
Is there a way to create a partial invoice without collecting the shipping cost?

For example, if I have an order with a virtual product and a shipped product, I want to be able to invoice the virtual product first without collecting the shipping.

Digging through code I don't see a way to do this built-in to magento.

Are there any mods that do this?  Or suggestions on where to start if I were to write a mod to provide this functionality.


texts: How do I get Full Price including Custom Option on Add To Cart?

texts:
I want to get the Full Price, including the Custom Option price on Add To Cart.
I've tested using the checkout_cart_add_product_complete event with below observer:
class CheckoutCartAddProductObserver implements ObserverInterface
{
    public function execute(EventObserver $observer)
    {
        $product = $observer->getEvent()->getQuoteItem();
        $price = $product->getPriceInfo()->getPrice('final_price')->getValue();
    }
}

Which gives me the final price of the product, but it doesn't include the price of the option. The option is of type dropdown, if that makes a difference.


texts:
How to create a popup?

I want to create a popup for every page unless the customer clicked close.
I want to show a popup with the cms block content.

I am not sure what to do or how to start I have looked at few from inchoo and here but they both didn’t help.


texts: How to make the site front page display the number of product SKUs ？

texts: My product is a configurable product, I would like to show the number of product SKUs on the product page, switch each different color, show the number of SKUs for each different color。


texts: Pagination Button in the "my order pages" are not working Magento 2

texts: Pagination button 1,2 next are not working not taking to next page they are appearing like disabled in Magento 2.2.7


texts:
If you are running RabbitMQ in M 2.3/2.4 and have the env.php section set up for amqp:
    'queue' => [
    'amqp' => [
        'host' => '127.0.0.1',
        'port' => '5672',
        'user' => 'abc',
        'password' => 'def',
        'virtualhost' => '/',
        'ssl' => 'false',
        'ssl_options' => [

        ]
    ]
],

do you remove the cron_consumers_runner section from env.php? Or set it to false? Or trim it down to only specific consumers? Just trying to understand the relationship between the 2 sections. A full cron_consumers_runner section may include:
    'cron_consumers_runner' => [
    'cron_run' => true,
    'max_messages' => 20000,
    'consumers' => [
        'product_action_attribute.update',
        'product_action_attribute.website.update',
        'codegeneratorProcessor',
        'exportProcessor',
        'inventory.source.items.cleanup',
        'inventory.mass.update',
        'inventory.reservations.cleanup',
        'inventory.reservations.update',
        'quoteItemCleaner',
        'inventoryQtyCounter',
        'async.operations.all'
    ]
],


texts: How to install themes in magento 2.0 without using magento connect manager?

texts: I'm new to Magento 2.0. I'm not able to install themes in it, because in magento 2.0 version there is no magento connect manager. Can anyone tell me the exact way to install themes without using magento connect manager.


texts: Remove last item from product collection

texts:
I want to remove last item from product collection

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

But I have to avoid any 'loop' solutions.


texts:
I'm looking now for a while but I can not find any solution.
The Magento wishlist allways replacing the existing wishlist item with the newly added item.

SELECT * FROM wishlist_item WHERE wishlist_id LIKE 4578

shows allways only one Item.

the part in which the addurl is generated:

app\design\frontend\[mytheme]\default\template\catalog\product\view\addto.phtml

<?php
    $_product = $this->getProduct();
    $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product);
?>

    <?php if ($this->helper('wishlist')->isAllow()) : ?>

        <a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="add-to-wishlist"><?php echo $this->__('Add to Wishlist') ?>

    <?php endif; ?>

        <a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>" class="recommend fancybox" data-type="iframe" data-fancybox-width="480" data-fancybox-height="90%"><?php echo $this->__('Recommend product') ?>

the part in which the wish list will be displayed:

\app\design\frontend\[mytheme]\default\template\wishlist\item\list.phtml

<?php
    $columns = $this->getColumns();
?>

            <?php foreach ($columns as $column): ?>
                <?php echo $column->getTitle();?>
            <?php endforeach; ?>

        <?php if (count($this->getItems())): ?>
            <?php foreach ($this->getItems() as $item): ?>
                <tr id="item_<?php echo $item->getId();?>">
                    <?php foreach ($columns as $column): ?>
                        <?php $column->setItem($item); echo $column->toHtml($item);?>
                    <?php endforeach; ?>

            <?php endforeach ?>
        <?php else: ?>
                <td colspan="<?php echo count($columns);?>" class="wishlist-empty"><?php echo $this->__('This Wishlist has no Items');?>
        <?php endif; ?>

<?php foreach ($columns as $column): ?>
    <?php echo $column->getAdditionalHtml();?>
<?php endforeach; ?>

Does anyone have the same problem and possibly a solution for this?


texts: Magento2: How to move product tabs to short description area

texts:
I want to move tabs:

description
more information
reviews

to short description area. Any solution?


texts: I am running a client store and they want to give free shipping in India and shipping charges 2000 for all other countries how to achieve this?


texts: Associated Category List from Products in a Particular Category

texts:
I am working on a site where product brands have been set up as categories. Each product has at least 2 categories, one for brand and others for product categories.

On the page for Brand-X, rather than list the products, I wish to show all the other categories that are associated with Brand-X's products.

What would be the most efficient way to obtain a category list from this structure?

For example:

Product A - Categories [Brand-X, Category-1, Category-2]
Product B - Categories [Brand-X, Category-4]
Product C - Categories [Brand-X, Category-2]
Product D - Categories [Brand-Y, Category-3]

on the Brand-X page, display links to Category-1, Category-2, Category-4


texts: Is there an event or plugin spot for when cart rule is no longer valid?

texts:
Is there an event or place I can plugin for when a shopping cart price rule is no longer valid (such as when it expires or if you change the quantity of other products where it no longer applies)?  I know that it is automatically removed from the cart, but I can't seem to find the place this is happening in the code.

I am writing a module that adds a free product to the cart for a coupon where the subtotal is more than X amount.  It is all working except for when reducing the quantity of items in the cart where the subtotal goes below X.  The coupon is getting removed, but my product is staying in the cart.

So far I've tapped into the following events to do what I need so far...

salesrule_validator_process
checkout_cart_update_items_after
sales_quote_collect_totals_before

I did find Magento\Quote\Model\CouponManagement which seemed promising since it has set() and remove() methods, but they don't appear to be getting called when the cart is updated.

In the checkout_cart_update_items_after it also seems like a logical place I can check, but it appears the rule is still set according to $cart->getQuote()->getAppliedRuleIds()

UPDATE: I ended up adding an observer for the checkout_cart_save_after event which runs after collectTotals() so knows if the rule is still on the cart or not.  Then I basically compare $quote->getAppliedRuleIds() with $quote->getOrigData('applied_rule_ids') to see if the rule has been removed.  I feel like there is a better way to do this, but it works for the moment.  I still have the issue with coupons that expire though...


texts: magento2 cannot override custom controller

texts:
i have overridden my custom controller in etc/di.xml

<preference for="Magento\Catalog\Block\Product\ListProduct" type="Vendor\Module\Block\Catalog\Product\ListProduct" />
<preference for="ToolbarModel" type="Vendor\Module\Block\Catalog\Product\ProductList\Toolbar" />    <!--ToolbarModel: alias for Magento\Catalog\Model\Product\ProductList\Toolbar -->
                    <!--Override for Block catalog Search layer -->
<preference for="Magento\LayeredNavigation\Block\Navigation" type="Vendor\Module\Block\CatalogSearch\Layer" />
                    <!-- Override model: Catalog Resource-->
<preference for="Magento\Catalog\Model\ResourceModel\Product\Collection" type="Vendor\Module\Model\Catalog\Resource\Product\Collection" />

my etc/frontend/di.xml is as

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
                    <!--Override controller -catalogsearch-->
<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Vendor\Module\Controller\CatalogSearch\ResultController" />


texts: Programatically create customer cart in magento 2?

texts:
I have tried the below code but the cart is not creating:

public function addcustomercart()
{
    $itemId = 59;
    $price = 160;
    $qty = 1;
    $email = "test@test.in";
    $store = $this->storeManager->getStore();
    $websiteId = $this->storeManager->getStore()->getWebsiteId();
    $customer = $this->customerFactory->create();
    $customer->setWebsiteId($websiteId);
    $customer->loadByEmail($email);
    $quote = $this->quote->create(); //Create object of quote

    $quote->setStore($store); //set store for which you create quote
    // if you have allready buyer id then you can load customer directly
    //   echo json_encode($quote->getquoteId());
    // exit;
    $customer = $this->customerRepository->getById($customer->getEntityId());
    $quote->setCurrency();
    $quote->assignCustomer($customer); //Assign quote to customer

    //add items in quote

    $product = $this->product->load($itemId);
    $product->setPrice($price);
    $quote->addProduct(
        $product, intval($qty));

    return $quote->getId();
}


texts: Parsing mass selection id from the product grid

texts:
I made a new item in the action list from the product grid. This is my file, ui_component/product_list.xml:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction">
            <action name="create_barcode">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">create_barcode</item>
                        <item name="label" xsi:type="string" translate="true">Create Barcode(s)</item>
                        <item name="url" xsi:type="url" path="myurl/product/massCreateBarcode"/>
                    </item>
                </argument>
            </action>
        </massaction>
    </listingToolbar>
</listing>

In my controller(massCreateBarcode):
class MassCreateBarcode extends Action
{

    private $resultPageFactory;

    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        parent::__construct($context);

        $this->resultPageFactory = $resultPageFactory;
    }

    public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Product Barcode(s)'));

        return $resultPage;
    }
}

in my layout, i have this:
<body>
    <referenceContainer name="content">
        <block class="Namespace\Module\Block\Adminhtml\Barcode\View" name="my_name" template="Namespace_Module::barcode/view.phtml"/>
    </referenceContainer>
</body>

and in my block (Namespace\Module\Block\Adminhtml\Barcode\View) i have this method:
public function getProducts()
{
    $products = [];
    $productIds = $this->getRequest()->getParam('selected');

    if (!isset($productIds)) {
        return [];
    }
    foreach ($productIds as $productId) {
        $products[] = $this->productRepository->getById($productId);
    }
    return $products;
}

the method: getProducts is called in the template(phtml file). My problem is that if I do a filtering on the grid after the name, select a couple of products and do the mass action, the result of this code from my method is null:
$productIds = $this->getRequest()->getParam('selected');

If I reset the product grid and do the same thing. I get the products ids. So something is wrong when I filter my grid and do the mass action. Does anyone know what should I check ? Thank you in advance!


texts: Send automatic email when placing customer in a customergroup

texts: I've been searching for a way to send an automatic email when placing a customer in a certain customergroup. I have had no luck finding exactly how to get that done if it's even possible. Suggestions with programming or through an extension would be welcome


texts: different colors for different types of categories and sub categories in magento

texts:
please visit this link : http://demo.kidsdial.com/

on top of the site, you can see "catalog search box "all categories" and search box.

if you hover mouse on dropdown symbol next to "all categories" text, you can see all categories.

a)ALL CATEGORIES
b)BOYS TOYS
c)ACTION & TOY FIGURES.

I want to give different colors for a) and b) and c)

pleas help me to find solution.


texts: How do I get around Magento 2's Template Cache for a dynamic snippit

texts:
I am trying to create a shipping time indicator by pulling in the current time and if it falls within our shipping rules, it will display ships today, or ships tomorrow. That being said, I am running into a caching issue where after the content is dynamically generated once, it will then cache it for every load following.

For example, I went to my Magento_Catalog/templates/product/list.phtml and added a random number generator to the product list. Every time I refresh it, it displays the same number.

Is there a way around this?

Do i need to use a front end solution?


texts:
I'm trying to add content to Magento 2 Admin page; specifically the "Order and Account" section of the Information page in "Order View".

I've done the following but my content is not rendering

created my_module (this is working - I see it in enabled modules and other functions are working)
Created layout file within my_module

<?xml version="1.0"?>

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

        <referenceContainer name="content">
            <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="my_module_name" template="my_module::list.phtml"/>
        </referenceContainer>

</page>

Created template file within my_module (my\module\view\adminhtml\templates\list.phtml)

<?php  ?>

<?php echo __('Latest Orders') ?>

<?php /** @var $post \\Model\Post */ echo 'hello';?>

The above template does not appear on the Order admin page.  What am I doing wrong?


texts: How to add custom attribute filter to LoadByEmail function in magento

texts:
I have added custom attribute is_website user to customer.What i want is when the customer logins it should check if is_websiteuser attribute=1 if it is 1 then only allow the user to login else stay on same page..
Until now i found that LoadByEmail consist of the query,but it is not workin if we write

$select  = $adapter->select()
        ->from($this->getEntityTable(), array($this->getEntityIdField()))
        ->where('email = :customer_email')
        ->where('is_webshopuser',1);//my code to add filter

Can you plz tell how this should be done


texts:
I created Simple Hello world Module But it's not Display Front End

Also I can't Understand in test.xml can you please any one explain it

app/code/local/Manoj/Test/etc/config.xml

<?xml version="1.0"?>
    <config>
        <modules>
            <Manoj_Test>
                <version>0.1.0</version>
            </Manoj_Test>
        </modules>
        <frontend>
            <routers>
                <test>
                    <use>standard</use>
                    <args>
                        <module>Manoj_Test</module>
                        <frontName>test</frontName>
                    </args>
                </test>
            </routers>
            <layout>
                <updates>
                    <test>
                        <file>test.xml</file>
                    </test>
                </updates>
            </layout>
        </frontend>
        <global>
            <blocks>
                <test>
                    <class>Manoj_Test_Block</class>
                </test>
            </blocks>
            <helpers>
                <test>
                    <class>Manoj_Test_Helper</class>
                </test>
            </helpers>
        </global>

    </config>

app/design/frontend/default/Manoj/layout/test.xml

<?xml version="1.0"?>
    <layout version = "1.0"?>
        <test_index_index>
            <reference name="content">
                <block type="test/test" name="test" template="test/test.phtml"/>
            </reference>
        </test_index_index>
    </layout>

app/code/local/Manoj/Test/Block/test.php

<?php

class Manoj_Test_Block_Test extends Mage_Core_Block_Template{

        public function getContent(){

            return "My First Module";
        }

}

app/design/frontend/default/Manoj/template/test/test.phtml

<?php
    echo $this->getContent();
?>

app/code/local/Manoj/Test/controllers/IndexController.php

<?php

class Manoj_Test_IndexController extends Mage_Core_Controller_Front_Action{

    public function indexAction()
    {
        $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.
    }

}

Manoj_Test.xml

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


texts: Getting error log for every URL hits in magento1.7

texts:
I am getting this error log for any url hit in my magento..What could be the reason and how to solve this?

2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 94
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 95
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 96
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 97
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 98
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 99
2014-11-14T07:49:47+00:00 ERR (3): Notice: Undefined variable: cookieParams  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 108
2014-11-14T07:49:47+00:00 ERR (3): Warning: call_user_func_array() expects parameter 2 to be array, null given  in /var/www/beta_dev/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 108


texts:
I have a slider and it works by loading in a background image. I need to resize this image so it fits to all screens i know what line of code i need to put in just dotn quite know how to go about it. I need to add

background-size: 100% 100%;

to the $style variable, how would i go about doing this.

I tried

$style = "background-size: 100% 100%;, background:url('". Mage::getBaseUrl('media') . $s['image'] . "') 50% 0 no-repeat;";

But that loaded the background size but not the back ground.

<ul class="slides">
            <?php
            $slides = $this->getSlides();
            foreach($slides as $s) {
                $style = $content = '';
                $attr = 'data-img-height="0"';
                if ( !empty($s['image']) ) {
                    $imgSize = getimagesize(Mage::getBaseDir('media') .'/'. $s['image']);
                    if ($imgSize) {
                        $style = "background:url('". Mage::getBaseUrl('media') . $s['image'] . "') 50% 0 no-repeat;";
                        $attr = 'data-img-height="'.$imgSize[1].'"';
                    }
                }

Thanks for any help!!


texts:
In Magento2, I understood we have to use repositories instead of collections. What I do not understand is how to add custom attributes to repository.

If I do something like this:

    $searchCriteria = $this->searchCriteriaBuilder
        ->addFilter(ProductInterface::STATUS, Status::STATUS_ENABLED)
        ->addFilter(ProductInterface::VISIBILITY, array(Visibility::VISIBILITY_IN_SEARCH, Visibility::VISIBILITY_BOTH), 'in')
        ->create();

    $products = $this->productRepositoryInterface->getList($searchCriteria);

I have a list of products, but I do not have all the attributes I need.
How can achieve this? Something like the addAttributeToSelect in Magento 1.


texts: Saving a page/static block triggers an tinymce error and I can´t switch from HTML to text

texts:
I have a up to date Magento System. But for some reason when I am in the backend and want to edit a page or a static block, I cant switch from the HTML view to the text/visual view. If I click the (sry, dont know how it is in english ) "switch on editor", this is what my console says

and when I save a page this occurs:

What I tried:
I uploaded the js files from a fresh magento installation but this didnt help.

I uploaded the tinymce plugin folder from a fresh magento - didnt help.

Anyone an idea what I can try / how to fix this?


texts: Searching for a certain line of code in magento ( general question)

texts:
I long time ago i used Zen-cart and while it was not advanced as magento, it had one cool feature were you could searching all site files for a line of code, really handy when you are looking for something.  Magento 1  (and I think magento 2) does not have this, is there a plug in for this, or can it be done some other why ( eg locally on the pc?
Thanks


texts: custom table data show on shopping cart page

texts:
Can any one please guide me how can i show custom table data in
shopping cart page.
Any tutorial or any guidance will helpful for me, please let me know.


texts: Use same storecode for different websites

texts:
We have a multistore setup with 3 stores/domains, which should support different languages in the near future and I want to have the locale/language information in store URLs.

Example:

website1.com/en/
website1.com/fr/
website2.com/en/
...

From the (current) technical background I understand that using same code does not work.

  Store with the same code already exists.

But it is even not allowed to use uppercase codes to work around ...

  The store code may contain only letters (a-z), numbers (0-9) or underscore(_), the first character must be a letter

I could use some "fake" codes, but this is also to limited ...

website1.com/en/
website2.com/english/
website3.com/en_en/

Is there any way to reuse same store? What files have to be adjusted to make this work?


texts: Problem with loading Javascript in Magento 2 from history

texts:
On our Magento 2 new webstore there is a problem with loading javascript from history (with F5 or new tab). This problem occurs mostly in Microsoft Edge Browser. Sometimes, my code loads fine, but mostly not. If I want it to load as it should, I have to delete browser cache and cookies or CTRL+F5. The code that should load is inside:

<script>
// <![CDATA[
    requirejs([
        'jquery',
        'cycle2',
        'cycle2carousel'
    ], function ($) {
        $(window).on('load', function() {
           //my code
    });
});
// ]]>

I put a debugger point inside, but it never comes to that point. What could be wrong here?


texts: "Save config" is not working in Configuration -> Advanced -> Developer

texts:
After changing in Configuration -> Advanced -> Developer

Merge JavaScript Files = Yes
Merge CSS Files = Yes

My site is not browsing correctly.

I believe returning back to

Merge JavaScript Files = No
Merge CSS Files = No

may help but “Save Config” button is not working any more..

Through debug console I see issue with on-click
with button  id="id_5552aa811a9448075ead92b4a88ba8c2"

Please help


texts: What is the proper way of positioning/ordering CSS files in Magento 2?

texts:
In the Magento 2 DevDoc it says

  To include a CSS file, add the <css src="<path>/<file>" media="print|<option>"/> block in <head> section in a layout file.

However it doesn't say how we can influence the order of our CSS files. And if we add CSS files this way in a custom theme which has a parent theme the result is that the files are added quite at the top of the <head> section with a lot of other CSS files below them, meaning their priority is quite low and we cannot easily override rules from the parent theme or extensions.

There were similar problems in Magento 1 and there were workarounds. Some were more clean others less.
What is the best way to order a CSS file of a custom theme at the bottom of <head> in Magento 2 - if possible complying the Magento 2 layout guidelines for custom themes?


texts:
I have this error when i try to import my categorie.csv in magento with the module pimgento (in the menu import pim data)

  General error: 1290 The MySQL server is running with the
  --secure-file-priv option so it cannot execute this statement

If someone can help me ?

thanks


texts: Redirect to customer login page with filled email field

texts: Please advice: I'm redirecting through JS to customer login page customer/account/login and I want that customer email field should be already filled with some value, which I provide.


texts: How can I show all countries in UIcomponent dropdown?

texts:
<field name="country_id">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object"></item><item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Country</item>
<item name="formElement" xsi:type="string">select</item>
<item name="source" xsi:type="string">ModuleName</item>
<item name="dataScope" xsi:type="string">country_id</item>
<item name="default" xsi:type="string">10</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
</argument>
</field>


texts: Transactional Email - Difference between backend and files

texts:
I have a question about transactional emails

I ever modified it from backend at System -> Transactional Email and it works perfectly!

Just for fun, I searched into my directories and I found different places where are stored different kinds of transactional emails, eg. I've found it into:

/app/locale/[you_language]/template/email/

and also in:

/app/design/frontend/[your_theme]/default/locale/[your_language]/template/email/

They are different from the emails that I'd modified from backend
Now, I want to know why I've a lot of different places where emails are stored? why they are different from backend's emails?


texts: Is there any problem with using php native functions setcookie or using $_SERVER?

texts: We have a sdk in php needed to be used by some Megento websites so we are extending that as a magento module. In our SDK we used php native fuctions and arrays. For example to find out what is the current request url is a wrong practice to use $_SERVER or to set cookie using php setcookie could cause any problem?


texts: Magento 2.3.2. No 'Cost' price attribute on 'Advanced Pricing' tab

texts:
I am using Magento 2.3.2, should I have a 'Cost' attribute under the 'Special Price From' attribute on the 'Advanced Pricing' tab? I have, from top to bottom -

Special Price
Special Price From
My tiered prices
Manufacturer's Suggested Retail Price
Display Actual Price

Just wondering as it would be handy for us to use. I have looked under Magento 2.3 documentation and it does refer to a 'Cost' attribute but nothing shows up in a search of my product attributes. Is this something that was not included in 2.3.2? I could add a new attribute I guess, but if there's one already for the job then I'll use that.
If anyone can shed light on this I'd be grateful.


texts: Magento 2: Undefined Index Error When Upgrading to 2.3.3

texts:
When upgrading to magento 2.3.3 I get the following error.

I have already ran composer install
Error occurs when running: php bin/magento setup:upgrade

  Notice: Undefined index: search_query in /home/magento/htdocs/vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php on line 352


texts: Caching the restricted cookie block globally (instead of store view): how to solve

texts:
We are trying to move the restricted cookie store notice to the header block in page/html/header.phtml just above <div class="header-container">. This block should be storeview specific.

Problem: The problem now is that the first time the block is opened that it sticks to all storeviews (always the same). But they need to be different per store language.

We tried adding a cache tag like below, but this doesn seem to solve it...

Any ideas how to solve this?

class Mage_Page_Block_Html_CookieNotice extends Mage_Core_Block_Template
{

    protected function _construct() {
        $this->addData(array(
        'cache_lifetime' => 3600,
        'cache_tags'     => array(Mage_Core_Model_Store::CACHE_TAG, Mage_Cms_Model_Block::CACHE_TAG),
        'cache_key'      => 'COOKIE_RESTRICT_BLOCK' . Mage::app()->getStore()->getId(),
        ));
    }


texts: Add customer text after customer name in the top header section using plugin in

texts: So next to welcome message I need append customer text. It should display in the front end all the pages using plugin


texts:
I have a site with 2 store views.

One of the views (lets call it store view X), should be accessible to only certain users, and parts of the store should be restricted when this store view is enabled.

For example, when a logged in user is of the correct customer group and X is enabled, i don't want them to access /wishlist, or customer/account, i want those pages to be redirected to the homepage.

What i've tried is to add redirects specific to store view X of type 302,

i.e. request path - wishlist, target path - ../, type 302

I've then tried reindexing and navigating to the page wishlist, only to find the redirect doesn't work. That route doesn't even hit Magento\UrlRewrite\Controller\Router match() ln 60.

how can i redirect pages such as this for a specific store view, and can someone explain why the Router isn't being hit?

Thanks,

Sophie


texts: Braintree with Magento 2 - Configuration

texts:
We are facing an issue with Braintree Module in Magento 2 with Sandbox.

PayPal:

Credit Card:

We have set up an account as per Magento guideline (https://docs.magento.com/m2/ce/user_guide/payment/braintree.html)

but still not working.

I have check payment.log but not able to get any response data.

[2018-09-07 11:06:56] main.DEBUG: array (
  'request' =>
  array (
    'customer' =>
    array (
      'firstName' => 'kaushal',
      'lastName' => 'chauhan',
      'company' => 'CP',
      'phone' => '111-222-3333',
      'email' => 'kaushal@yahoo.com',
    ),
    'amount' => '3.00',
    'paymentMethodNonce' => 'tokencc_bc_bxqv9x_y5vscx_bqyy9s_kvybcn_9z5',
    'orderId' => '000000050',
    'merchantAccountId' => 'xmfnjz54mtzfjp6w',
    'channel' => 'Magento2_Cart_Community_BT',
    'billing' =>
    array (
      'firstName' => 'kaushal',
      'lastName' => 'chauhan',
      'company' => 'CP',
      'streetAddress' => 'address',
      'extendedAddress' => '',
      'locality' => 'greer',
      'region' => 'SC',
      'postalCode' => '29650',
      'countryCodeAlpha2' => 'US',
    ),
    'shipping' =>
    array (
      'firstName' => 'kaushal',
      'lastName' => 'chauhan',
      'company' => 'CP',
      'streetAddress' => 'address',
      'extendedAddress' => '',
      'locality' => 'greer',
      'region' => 'SC',
      'postalCode' => '29650',
      'countryCodeAlpha2' => 'US',
    ),
    'options' =>
    array (
      'storeInVaultOnSuccess' => true,
    ),
    'store_id' => 1,
  ),
  'client' => 'Magento\\Braintree\\Gateway\\Http\\Client\\TransactionSale',
  'response' =>
  array (
  ),
) [] []

also, need to confirm anyone has used with Magento REST API with braintree??


texts: Cron Job ebizmarts_ecommerce has an error: in magento2

texts:
I have uploaded  ebizmarts_ecommerce module in my live server.

  Cron Job ebizmarts_ecommerce has an error: : Argument 1 passed to  Magento\SalesRule\Model\Converter\ToDataModel::arrayToConditionDataModel() must be of the type array, string given, called in vendor/magento/module-sales-rule/Model/Converter/ToDataModel.php on line 110.
  Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":52690944,"emalloc_start":52091584} [] []
  [2019-10-18 04:40:16] main.CRITICAL: Error when running a cron job {"exception":"[object] (RuntimeException(code: 0):  Error when running a cron job at also facing error on vendor/magento/module-sales-rule/Model/Converter/ToDataModel.php:216

anyone have an idea about this ?


texts: Magento 2 - Difference Between "Separately" and "Together" in Bundle Products

texts:
As I created a bundle product and checked the difference between "Separately" and "Together" by visiting/ordering this product in both condition but didn't find any difference.

Please visit here for more understanding:-

https://nimb.ws/UoiPIL

https://nimb.ws/f4r8yE

When I changed to "Separately" then I expected that on the cart/checkout page I'll get the option to choose individual shipping for each item( e.g- "1st T-shirt", "2nd T-shirt" etc) but not getting like that.both option seems same for me.

Here is the definition for both option:-

1- Together

Shipping together means that you can create one shipment for entire bundle items.

2-Separately

if you choose to ship bundle items separately, you need to notice when creating the shipment for each bundle item.

Please explain in detail so that I can understand well.

Thanks!!!


texts: Is There Any tool or way to get customer tracking url/path in Magento 2

texts:
I want to track a path of customer from page to page, or Track There Travel Activity.

for ex: initially customer is on homepage, then went to product listing and then product details page and so on...

So I want customer or any relative info and then Homepage URL, Product listing URL, Product Details URL ...

And Simply we can say trace customer activity on Website.

Is there any tool or any way to do that?


texts: Convert mysql query into magento model format

texts:
I have the following query that I am trying to convert in Magento Model format, but the result is not the same after conversion and getting same errors.

Query is:

SELECT
  ce_varchar.value AS CODE,
  sfoi.order_id,
  sfo.increment_id,
  COUNT(sfoi.`order_id`) AS totalOrders,
  ea.attribute_id,
  ea.attribute_code,
  pv.value,
  sfo.created_at
FROM
  mage_catalog_product_entity AS ce
  INNER JOIN mage_eav_attribute AS ea
    ON ce.entity_type_id = ea.entity_type_id
  INNER JOIN mage_catalog_product_entity_varchar AS ce_varchar
    ON ce.entity_id = ce_varchar.entity_id
    AND ea.attribute_id = ce_varchar.attribute_id
    AND ea.backend_type = 'varchar'
  INNER JOIN mage_sales_flat_order_item AS sfoi
    ON sfoi.product_id = ce.entity_id
  INNER JOIN mage_sales_flat_order AS sfo
    ON sfo.entity_id = sfoi.order_id
  INNER JOIN mage_catalog_product_entity_varchar pv
    ON pv.entity_id = ce.entity_id
WHERE ea.attribute_id = 1062
  AND pv.attribute_id = 96
  AND LOWER(sfo.lead_status) IN ('converted', 'unconverted')
  AND ce_varchar.value IS NOT NULL
;

Here is my Failed attempt of Magento's Model Formatted query

$collection = Mage::getModel('catalog/product')->getCollection();
$collection->getSelect()
    ->join(array('ea'=>'eav/attribute'),
        'ea.entity_type_id = ea.entity_type_id',array(''))
    ->join(array('ce_varchar'=>'catalog/product_entity_varchar'),
        'main_table.entity_id = ce_varchar.entity_id')
    ->join(array('sfoi'=>'sales/flat_order_item'),
        'sfoi.product_id = ce.entity_id',array(''))
    ->join(array('sfo'=>'sales/flat_order'),
        'sfo.entity_id = sfoi.order_id ',array(''))
    ->join(array('pv'=>'catalog/product_entity_varchar'),
        'pv.entity_id = main_table.entity_id',array(''))
    ->addFieldToSelect('entity_id')
    ->addFieldToSelect('cut_sample_location')
    ->addExpressionFieldToSelect('tatalOrders','COUNT(sfoi.`order_id`)','sfoi.order_id')
    ->addFieldToFilter('ea.attribute_id',1062)
    ->addFieldToFilter('pv.attribute_id',96)
    ->addFieldToFilter('sfo.lead_status', array('in' => array('converted', 'unconverted')))
    ->addFieldToFilter('ce_varchar.value' != null)
    ->group('main_table.entity_id , ce_varchar.value')
    ->order('DESC')
    ->limit(30);


texts: Magento v1.9.x ultimate module creator entity URL rewrite / key problem

texts:
Hi all ( especially Marius :) )

I have an annoying problem with my Mag 1.9.x modules created using the, otherwise great, ultimate module creator.  When an item/entity is given a friendly URL and initially saved then all is great.  However, if the item/entity is reloaded, edited in some way and saved then the friendly URL (unchanged) is seen as a duplicate of the existing URL and then appends -1, -2, -3....and so on for each save.  This then means the proper/original URL no longer works and the URL changes with each edit.  It is possible to go back and then remove the -1 (or whatever number it has reached) as the original no longer exists as a URL.

It seems that this might not be specific to UMC modules but any entity types that are not products, categories or otherwise inbuilt to Magento.  I wondered if there was a known fix for this as I am already fiddling with overwriting the core to check if the found matching url actually belongs to the same item as you are currently saving so not to update it but it is proving troublesome and seems to impact quite a lot of things.

Thanks
Jon


texts: Magento 2.3 get attribute id from attribute Label

texts:
I want to get product attribute id from attribute Label

  example: attribute label = Manufacturer

I want to get Manufacture attribute id from attribute Label

Any help would be appreciated.

Thanks.


texts: Send custom moudle config to external API when saving

texts:
I am writing a Magento 2 module. I need to send it to my external API config value when the merchant clicks the save button on my module config page.
This is the save function in Magento\Config\Model
   public function save()
    {
        $this->initScope();

        $sectionId = $this->getSection();
        $groups = $this->getGroups();
        if (empty($groups)) {
            return $this;
        }

        $oldConfig = $this->_getConfig(true);

        /** @var \Magento\Framework\DB\Transaction $deleteTransaction */
        $deleteTransaction = $this->_transactionFactory->create();
        /** @var \Magento\Framework\DB\Transaction $saveTransaction */
        $saveTransaction = $this->_transactionFactory->create();

        $changedPaths = [];
        // Extends for old config data
        $extraOldGroups = [];

        foreach ($groups as $groupId => $groupData) {
            $this->_processGroup(
                $groupId,
                $groupData,
                $groups,
                $sectionId,
                $extraOldGroups,
                $oldConfig,
                $saveTransaction,
                $deleteTransaction
            );

            $groupChangedPaths = $this->getChangedPaths($sectionId, $groupId, $groupData, $oldConfig, $extraOldGroups);
            $changedPaths = \array_merge($changedPaths, $groupChangedPaths);
        }

        try {
            $deleteTransaction->delete();
            $saveTransaction->save();

            // re-init configuration
            $this->_appConfig->reinit();

            // website and store codes can be used in event implementation, so set them as well
            $this->_eventManager->dispatch(
                "admin_system_config_changed_section_{$this->getSection()}",
                [
                    'website' => $this->getWebsite(),
                    'store' => $this->getStore(),
                    'changed_paths' => $changedPaths,
                ]
            );
        } catch (\Exception $e) {
            // re-init configuration
            $this->_appConfig->reinit();
            throw $e;
        }

        $this->pillPut->put();

        return $this;
    }

I am thinking of writing before plugin for this function so that it checks if the group is my module group then send config data to my external API. If successful then save the configs, else don't save the config.
Another solution is to listen to config saving event. Could you guys show me how to write a plugin or an event? How to send config to the API when saving? Thanks


texts:
I want to add breadcrumbs for my faq page like this:

  Home -> Pages -> FAQ

but when I call breadcrumb from Magento_Theme module, it's just show Home -> FAQ.

Any suggestions for this issue?

Many thanks.


texts:
We are building a website for a client and are towards the end of the build.

We have been stuck with a problem of the product 'sort by' ordering being stuck on price ascending. We've attempted to override it on the Manage Categories section, via System>Configuration too, but it will only default to price ASC.

Even if we select Name or Date on the front end, it won't change from Price ASC.

Could anyone shed some light on to this? Magento 1.9.1 using RWD theme


texts: Angular JS2 REST API call with Magento 2 headers not send

texts:
I try to write code to call Magento 2 API with AngularJS 2

// headers.append('Access-Control-Allow-Origin', '*');
// headers.append('Access-Control-Allow-Headers', 'Content-Type');
// headers.append('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
// headers.append('Content-Type', 'application/json');
// headers.append('Accept', 'application/json');
// headers.append('X-Frame-Options', 'SAMEORIGIN');
// headers.append('Authorization', ' Bearer 3sl175yf8v8pec7hjll9v79mt1w0tvpv');

  // this.createAuthorizationHeader(headers);

  // curl -X GET 'http://www.mageplayground.tk/rest/V1/categories' -H 'Authorization: Bearer 3sl175yf8v8pec7hjll9v79mt1w0tvpv' -H 'Content-type: application/json' -g

  let opt: RequestOptions
  let myHeaders: Headers = new Headers
  // myHeaders.set('app-id', 'c2549df0');
  myHeaders.append('Authorization', 'Bearer 3sl175yf8v8pec7hjll9v79mt1w0tvpv');
  // myHeaders.set('Content-type', 'application/json')

  opt = new RequestOptions({
      headers: myHeaders
  })

  this.http.get('http://www.mageplayground.tk/rest/V1/categories/', opt).subscribe(res => this.result = res);
  console.log(this.result);

i can't send the header of Authorization and i get an error with any header i try to send.

The error i get is 400 .

If i send the get method without headers - i get 401./

When i do curl - i get the parameters and its also work with postman software

i know its not that smart to put my Authorization number but its only a playground so i guess its ok.

Anyone got a solution for me?


texts: After add product to cart page goes to top issue

texts:
I have the following issue:

I am on the list page, and i have few products. Let's say 100.
If i am going to the 60'th product and i added to the cart, when i press the button to add my product, the product it's added to cart and the page is refreshed.

My issue: when the page is refreshed my page goes to the top everytime, not at the 60'th product when i was before and now i need to scroll down again.

Does anyone know if is any solution, to remain at the same point on the page after refreshing?

Thank you and advance.


texts: Magento 2 - Display subcategories above product listing

texts:
I'm trying to display the first 8 subcategories above the product listing on a select few category pages.

I know that I can easily do this using static blocks, but I'd rather use a custom template to do this.

I don't really need help with the PHP code to fetch the subcategories, I'm just not sure about the exact structure in magento 2 to use.

I know I need a custom .phtml template at least, but I'm not sure where to place the PHP methods to use in my template as I've never developed a custom module.

Also, I'm assuming that for each category that I'd want the subcategories to display on, I can use update the layout in the admin on the category's "custom design" tab.


texts: Magento 2: After login how to get current quote id?

texts:
Magento 2: After Customer Login Get Cart Information?

On observer I got 2 active quote id's. I can get by latest from quote table.

Is there any way to get current quote id?


texts:
I am using magento version 2.3.2

I have installed extension : Ebizmart mailchimp extension

and I have api key for that, when i put api key in text box and that giving me alert box
also giving same error on "create mailchimp store"

see sreenshot

anyone help in me, thanks in advance.


texts:
I want to offer 50% offer for the products added in to the cart. It need to working like suppose i have 2 products on my cart A and B. A have $100 and B have $200 suppose i apply the promo code it will reduce the 50% price of the most lesser price product so here $100 reduced as $50. Like i have 3 products it will affect only 1. Suppose i have 4 products it will reduce 2 product price.

Here are the current settings:

Apply = Percent of product price discount
Discount Amount = 25
Discount Qty Step (Buy X) = 0


texts: Magento 2: Override product image JPG quality

texts:
Magento 2.2.1 with custom theme which inherits from Magento/blank.

Attempting to fix the JPG compression for product images.

I know, based on this solution, that I must extend the Image class found here:

  Magento_Catalog/Model/Product/Image.php

I now understand the basic file structure properly, thanks to Quan Le's answer.

I have created the following structure:

+-- app
    +-- code
        +-- [Vendor]
            +-- module-image-fix
                +-- registration.php
                +-- etc
                    +-- di.xml
                    +-- module.xml
                +-- Model
                    +-- Product
                        +-- Image.php

I know that there is a problem here, but I can't work out how to properly label directories within the files themselves. The solution I am working from does not clearly label the files or file structure, so I'm not sure if I even need registration.php etc.

I have tried renaming module-image-fix to ImageFix with no luck.

registration.php

<?php
  \Magento\Framework\Component\ComponentRegistrar::register(
  \Magento\Framework\Component\ComponentRegistrar::MODULE,
  '[Vendor]_ImageFix',
  __DIR__
);

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="Magento\Catalog\Model\Product" type="[Vendor]\ImgFix\Model\Product" />
  </config>

module.xml

<?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
        <module name="[Vendor]_ImageFix" setup_version="1.0.1">
        </module>
    </config>

Image.php

<?php
    namespace [Vendor]\ImageFix\Model\Product;
    class Image extends \Magento\Catalog\Model\Product\Image {
        protected function _construct() {
            $this->_quality = 100;
            return parent::_construct();
        }
    }

I have so far managed to successfully enable the module, but without any change to images.

I have also managed to enable the module, but received an error that [Vendor]/ImageFix/Models/Product does not exist.


texts: Extra Configurable Swatches showing on the Category Page

texts:
On our product listings page, two of our products have color swatches showing up beneath them which should not be there,  one of them does not even have any configurable color options set but is showing them anyway.

The other has 4 color options that should be there but 8 that shouldn't.  The 4 that should be there are swapping the main product image correctly while the 8 that shouldn't are sometimes swapping the product image and sometimes for a different product image entirely.

I've checked that the color attribute is correctly set for all the associated products and they are, I've also cleared the cache and re-indexed.

I've looked in the template/configurableswatches/catalog/product/list/swatches.phtml file and see that $_attrValues = $_product->getListSwatchAttrValues() is responsible for getting the list of swatches on the product listings page but that's as far as I could debug it.

Any idea where Magento is getting the list of swatches from, is it from a DB table.  Any other advice would be appreciated.


texts: How to show full price in super attribute drop-down instead of only the increased price in Magento?

texts:
I've created a configurable product with a super attribute.
It works great and i can select the different products from the dropdown menu.

Now my question is the following: Is it possible to also include the full price in the dropdown menu instead of only the increased price per product?

I have added an image as an example


texts: magento 2 : Flush static content from admin panel forces to run static:deploy command everytime

texts:
After flushing the static cache files from the System -> Tools -> Cache Management -> Flush Static Files Cache from the admin panel...

magento admin panel is looking like below...

and for the solution i have to run the php bin/magento setup:static-content:deploy
command everytime.

When i installed Magento 2, static files were generated automatically and not by running the command.

What i need to do so that it will start generating the static files automatically after i have flushed them from backend? Thanks in advance...


texts: How to search/filter for ONLY empty fields in the admin panel?

texts:
I'm looking for orders that specifically did not use a coupon code, and therefore have no visible value in the "coupon" field.

Which value do I search for?

I tried "NULL", ""(as in, two quotation marks with nothing in them), leaving the field empty and just a space character. None of those worked, unfortunately.

Don't have full admin access, only our orders, so I can't make any changes to the actual search setting itself.

P.S.: Hope this post is adequate, first time posting on any stackexchange. Thanks in advance for any and all hints!

Quick edit: I have a workaround of sorting by coupons, but that does not allow me to sort by a more relevant value (date), as specific times are affected, and therefore seems unviable for my needs.


texts: Convert Base64 to Image file and save file directory : Magento 2

texts:
How to convert base 64 image format to image file and save image in local file directory in magento 2

  public function setProfileImage($customerId, $base64)
        {
             if ($customerId) {
                     //code for convert base64 to image file and save file directory
                  }

        }

Thanks in advance !!


texts: How to override (vendor/magento/module-gift-card/Model) Magento\GiftCard\Model\AccountGenerator generate() function Magento 2


texts: How to display product by using order Item_Id in Magento 2?

texts:
I'm trying to show product detail by order Item_Id. I have this page:

When we click on Order Detail, it will get the item (2) to show product detail we've chosen. Here is my code to show this page:

<?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $orders        = $objectManager->
    create('Magento\Sales\Model\Order\Item')->getCollection();

    echo "

             Product Ordered

";
 ?>

<?= $block->escapeHtml(__('Orders'))
      ?>

       <?= $block->escapeHtml(__('OrderItem'    )) ?>
       <?= $block->escapeHtml(__('Product Image')) ?>
       <?= $block->escapeHtml(__('Product Name' )) ?>
       <?= $block->escapeHtml(__('Qty'          )) ?>
       <?= $block->escapeHtml(__('Price'        )) ?>
       <?= $block->escapeHtml(__('Total'        )) ?>
       <?= $block->escapeHtml(__('Action'       )) ?>

  <?php foreach($orders as $item): ?>
    <?php
     $_product     = $objectManager->get('Magento\Catalog\Model\Product')->load($item->getProductId());
     $imageHelper  = $objectManager->get('\Magento\Catalog\Helper\Image');
     $image_url    = $imageHelper->init($_product, 'product_page_image_small')->setImageFile($_product->getImage())->resize(100, 100)->getUrl();
    ?>

          <?php echo $item->getItemId();           ?>
          <img src="<?= $image_url ?>"  width="75px" height="75px">
          <?php echo $item->getName();                ?>
          <?php echo $item->getQtyOrdered();          ?>
          <?php echo $item->getPrice();               ?>
          <?php echo $item->getBaseRowTotalInclTax(); ?>

        <td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions">
          <a href="<?php echo $this->getUrl('history/detail/display',['item_id' => $item->getItemId()]); ?>">Order Detail

  <?php endforeach; ?>

Can anyone help the next step?
Thanks a lot.


texts: What are the only needed files for custom module?

texts:
I've seen a lot of tutorials on how to create a custom module in Magento. But all of them are mostly those helloworld examples.

I'm wondering what files do we actually have to create in order to just create a module that's been reckognized by the system.

What are the only important files that have to exist for the module?
I'm thinking that only confing.xml and namespace_Modulename.xml are needed for a new module and everything else is like extra for that (example showing stuff on the page etc).


texts:
i m so so sad my site hacked 2 times yesterday . i m trying to search a developer for this but all are telling me they can't guarantee about the security i m not sure what to do next. You guys have a experience like this ? please help me if you have a answer for this i m very disappointing about my situation i have completed whole website and now i have to go online but this hacking how i can go live !!!

Please help me


texts: Paging controls not showing in Mage2 listing page (ui_component)

texts:
Here's the relevant portion of the XML to create a listing page. For some reason the paging component won't show. I've been looking over this for hours, any idea where I need to look next to enable pagination?

<listingToolbar name="fulfillment_code_grid_top">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="template" xsi:type="string">ui/grid/toolbar</item>
        </item>
    </argument>

    <bookmark name="bookmarks">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/controls/bookmarks/bookmarks</item>
                <item name="displayArea" xsi:type="string">dataGridActions</item>
                <item name="storageConfig" xsi:type="array">
                    <item name="namespace" xsi:type="string">fulfillment_code_grid</item>
                </item>
            </item>
        </argument>
    </bookmark>

    <paging name="fulfillment_code_grid_paging">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="storageConfig" xsi:type="array">
                    <item name="provider" xsi:type="string">fulfillment_code_grid.fulfillment_code_grid.fulfillment_code_grid_top.bookmarks</item>
                    <item name="namespace" xsi:type="string">current.paging</item>
                </item>
                <item name="selectProvider" xsi:type="string">fulfillment_code_grid.fulfillment_code_grid.fulfillment_columns.ids</item>
                <item name="options" xsi:type="array">
                    <item name="20" xsi:type="array">
                        <item name="value" xsi:type="number">20</item>
                        <item name="label" xsi:type="string" translate="true">20</item>
                    </item>
                    <item name="30" xsi:type="array">
                        <item name="value" xsi:type="number">30</item>
                        <item name="label" xsi:type="string" translate="true">30</item>
                    </item>
                    <item name="50" xsi:type="array">
                        <item name="value" xsi:type="number">50</item>
                        <item name="label" xsi:type="string" translate="true">50</item>
                    </item>
                    <item name="100" xsi:type="array">
                        <item name="value" xsi:type="number">100</item>
                        <item name="label" xsi:type="string" translate="true">100</item>
                    </item>
                    <item name="200" xsi:type="array">
                        <item name="value" xsi:type="number">200</item>
                        <item name="label" xsi:type="string" translate="true">200</item>
                    </item>
                </item>
            </item>
        </argument>
    </paging>
</listingToolbar>


texts:
What are the differences between all the Magento versions

Magento2.0
Magento2.1
Magento Open Source 2.2
Magento Commerce 2.2
Magento Commerce Cloud 2.2


texts: How to add custom attributes as top navigation menu items?

texts:
I am trying to categorize my products by different attributes for easy cross-match layered navigation. Example:

(category) shoes, clothes... // i have these categories already
(color): red, black... // attribute
(material): leather, fabric... // attribute
etc.

Achieving this by creating categories only for the attributes is not helpful as it seems Magento cannot cross-match 2 different categories. Also repeating the same properties as a subcategory for each item is not a good option for this store in particular (e.g. Shoes/red, Shoes/black, T-shirt/red, T-shirt/black etc) . So I am looking for a way to give the customer the ability to browse not only by category but also by attributes and cross match those at any time. Example: start by material Leather and then cross-match it with color Red in layered navigation.

So instead of having the default menu structure:

Cat1 Cat2 Cat3 ... (with subcategories)

I want to have a top menu like:

Browse by: Category Attr1 Attr2 Attr3

Where hovering Category will unfold the subcategories and AttrN will unfold the used values for the custom attribute.

This will also help to avoid the current problem of having too many root-level categories (resulting in multi-line top menu).

How can I achieve this?


texts: Magento 2 - Remove video from gallery in product page

texts:
I'm trying to remove the video from the gallery in product page and I saw that the method getGalleryImages() in the Magento\Catalog\Block\Product\View\Gallery block gets all types of media (image and external-video).

So I have created my custom module where I put a block that extends Magento\Catalog\Block\Product\View\Gallery and I override getGalleryImages() method.

There wasn't any problem to get only the images, but now in my gallery I can't see the thumbnail, I get only the main gallery.

Here my code, my custom block: <Vendor>\<Module>\Block\MediaGallery:

<?php namespace <Vendor>\<Module>\Block; use Magento\Framework\Json\EncoderInterface; class MediaGallery extends \Magento\Catalog\Block\Product\View\Gallery {

public function __construct(
    \Magento\Catalog\Block\Product\Context $context,
    \Magento\Framework\Stdlib\ArrayUtils $arrayUtils,
    EncoderInterface $jsonEncoder,
    array $data = []
)
{
    parent::__construct(
        $context,
        $arrayUtils,
        $jsonEncoder,
        $data
    );
}

public function getGalleryImages()
{
    $product = $this->getProduct();
    $images = $product->getMediaGalleryImages();
    if ($images instanceof \Magento\Framework\Data\Collection) {
        foreach ($images as $key => $image) {
            /* @var \Magento\Framework\DataObject $image */
            if ($image->getMediaType() == 'image') {
                $image->setData(
                    'small_image_url',
                    $this->_imageHelper->init($product, 'product_page_image_small')
                        ->setImageFile($image->getFile())
                        ->getUrl()
                );
                $image->setData(
                    'medium_image_url',
                    $this->_imageHelper->init($product, 'product_page_image_medium')
                        ->constrainOnly(true)->keepAspectRatio(true)->keepFrame(false)
                        ->setImageFile($image->getFile())
                        ->getUrl()
                );
                $image->setData(
                    'large_image_url',
                    $this->_imageHelper->init($product, 'product_page_image_large')
                        ->constrainOnly(true)->keepAspectRatio(true)->keepFrame(false)
                        ->setImageFile($image->getFile())
                        ->getUrl()
                );
            } else {
                $images->removeItemByKey($key);
            }
        }
    }

    return $images;
}}

That's is what I get with my custom block:

Setting in this way the block in layout:

 <container name="product.info.media" after="product.info.main">
                    <block class="<Vendor>\<Module>\Block\MediaGallery" name="product.info.media.image" template="Magento_Catalog::product/view/gallery.phtml"/>
                </container>

While with this configuration:

 <container name="product.info.media" after="product.info.main">
                    <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image" template="product/view/gallery.phtml"/>
                </container>

I get what I want to see:

I don't post the phtml file, because is the same of the default module, I only copied it in my theme folder in the same position.


texts: How to Implement Domain Registration API In Magento

texts:
I want to implement domain search facility in my website. As I searched and learn I need to implement Domain search and registration API. As I never did this before and not found much knowledge base documentation on this at beginner level.

Which API I should use SOAP or REST ?

Where do I get API Key for development purpose or Do I need to purchase this?

Please let me know how can I implement or from where should I start at least.

Any help would be appreciated.


texts: Magento 2.2.5 Unable to get orderGrandTotal() in success.phtml

texts:
I'm trying to get access to the grand total of the order but for some reason am unable to access this variable.

I have tried multiple solutions by creation modules but nothing seems to be working.

success.phtml

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

// @codingStandardsIgnoreFile

?>
<?php /** @var $block \Magento\Checkout\Block\Onepage\Success */ ?>

<!---- Onefeed Tracking Code ---->
<?php
//-------------------------------------------
// GET MAGENTO 2 ORDER VALUES FOR TRACKING CODE
//-------------------------------------------
$orderId = $block->getOrderId();
echo $block->getOrder();
$total = 2;
?>

<script type="text/javascript">
  var of_ssid = '362-1';
  var cs = '<?php echo $total; ?>';
  var oi = '<?php echo $orderId; ?>';
  var it = 1;
  var id = '';
  var pairs = document.cookie.split("; "),
    count = pairs.length, parts;
  while (count--) {
    parts = pairs[count].split("=");
    if (parts[0] === "user" && parts[1] === "usr")
      id = parts[2];
  }
</script>
<script type="text/javascript" language="javascript" src="https://tracking.onefeed.co.uk/t.js"></script>
<noscript>
    <img border="0" src="https://tracking.onefeed.co.uk/ProcessProductCheckout.ashx?of_ssid=362-1&cs=<?php echo $total; ?>&it=1&oi=<?php echo $orderId; ?>" />
</noscript>

<!---- End Onefeed Tracking Code ---->

success.php

<?php

namespace Creation\OrderSuccess\Block;

class Success extends \Magento\Checkout\Block\Onepage\Success {

    public function getOrder() {
        return $this->_checkoutSession->getLastRealOrder();
    }

}

echo $block->getOrder() outputs null, if I echo $block->getGrandTotal() I also get null.

I can't seem to figure out where I'm missing the connection to access this data.


texts: Magento 2 How to show Layered Navigation on home page?

texts:
I want to show Layered Navigation on Home Page.

On home page their is banner slider and on banner image their is Search Box like below.

Now I want show Layered Navigation instead of that search box.

And I can remove that search box but Don't know

How to show Layered Navigation on Home Page?