texts:
Ive added my own color attribute for categories following this guide:
Magento 2 DevDocs: How to add a Category Attribute

But when I save my category my field is not saved.

First I created a InstallData.php:

use Magento\Framework\Setup\{
    ModuleContextInterface,
    ModuleDataSetupInterface,
    InstallDataInterface
};

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;

class InstallData implements InstallDataInterface
{

    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory) {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'color', [
            'type'     => 'varchar(5)',
            'label'    => 'Color',
            'input'    => 'text',
            'source'   => 'Magento\Eav\Model\Entity\Attribute\Source\Text',
            'visible'  => true,
            'default'  => '',
            'required' => false,
            'global'   => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'group'    => 'Display Settings',
        ]);
    }
}

Then Ive added my category_form.xml:

<?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="display_settings">
        <field name="color" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">color</item>
                    <item name="label" xsi:type="string" translate="true">Farbe</item>
                    <item name="default" xsi:type="string"></item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

Then I run:

php bin/magento setup:upgrade
php bind/magento setup:di:compile

The Field is showing up in the backend at the right place but when I enter a value and click save the value is not saved.

So can anyone tell me whats wrong with my script?


texts: Grouping Ordered items in Sales->Order View

texts:
Where and what do I need to adjust to group this based on the first word of the Product Name?

So that If ever I placed an order again using WORD IPHONE it will be under the 3rd line which is iphone.


texts: Adding default address(shipping) to when customer signup

texts:
I'm new to Magento 2, no e-commerce experience before.

So I'm working on making this module that should 'add default shipping address to customer when they sign up'.

During some research and learning magento 2, I found this event and observer + dependency injection could help me able to get it happen.

BUT, my code is not working.. need some help!

here are my codes and structure.

my observer.

<?php
namespace Threeon\DefaultAddress\Observer;

use Magento\Framework\Event\ObserverInterface;

class AddressAdder implements ObserverInterface
{
protected $addressFactory;

public function __construct(Magento\Customer\Model\AddressFactory $addressFactory)
{
    $this->addressFactory = $addressFactory;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $customer = $observer->getEvent()->getData('customer');

    /*$addresses[] = $observer->getEvent()->getAddresses();*/
    $address = $this->addressFactory->create();

    $address->setCountryId('HR')
        //->setRegionId('1') //state/province, only needed if the country is USA
        ->setPostcode('31000')
        ->setCity('Osijek')
        ->setTelephone('0038511223344')
        ->setCompany('GMI')
        ->setStreet('NO:12 Lake View')
        ->setIsDefaultBilling('1')
        ->setIsDefaultShipping('1')
        ->setSaveInAddressBook('1');
    try{
        $address->save();
        $customer->setAddress($address);
    }
    catch (Exception $e) {
        Zend_Debug::dump($e->getMessage());
    }
    // TODO: Implement execute() method.
}

}

?>

event.xml

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


texts: how to restrict order place if virtual product in cart with another product type magento 2?

texts:
I want to restrict order place on the checkout page if the virtual product in cart with another product type like Simple, Configurable, etc.
Users can place the order when either virtual product in cart or other product_type(Simple, configurable) products in the cart.
if both type products in the cart then the order will not be placed.


texts:
How can I make my module available, without full access to the source code, how to control to make my module available and not be replicated, if an access key control is done, which will prevent the source from being edited and removed from that control?

Magento 2


texts:
I created a question a few weeks ago (https://magento.stackexchange.com/questions/64925/popup-review-form) about how to display a popup from an html block and not from a url and it has been deleted because it is too "broad". I personally find it clear, but nevermind.

I took time today to dig further and find a solution, and I think it could help people, that's why I create this thread with the solution.

Here's the original question (to allow search result to find this post):

  I have a problem which seems really simple to resolve I think, but I'm
  kind of stuck on it.

  I'm trying to display the "write your own review" form inside a popup
  without using external libraries like fancybox etc. This way customers
  will see the existing review list on the product page, and they'll be
  able to access the form to add a review by cliking on a link ('write a
  review') which display the form in a popup.

  I looked for the js function popWin(), but I need to pass a URL in it
  and I don't have any, as my block review form is added through
  $this->getChildHtml('review_form').

  I could create a hidden div and make it appear through js and CSS, but
  I really would like to keep using Magento's existing tools and keeping
  the same layout as the other popups.

  Do you have an idea to put that block inside a popup ?


texts:
We are using $_FILES to check files post data in core php.
Which class can use in Magento 2 to check files post data?

Thanks


texts: I am new to magento I want to know where the frontend routers are reflecting in config.xml file custom module?

texts:
I am new to magento, i want know in config.xml file there are two routers are there. one is for frontend router and other is admin router,please explain where the frontend routers will reflects.
for admin it will reflects on admin url.
I am not getting where fronted routers is reflecting.

Here is the config.xml file

<frontend>
        <routers>
            <surgery>
                <use>standard</use>
                <args>
                    <module>Test_Surgery</module>
                    <frontName>surgery</frontName>
                </args>
            </surgery>
        </routers>
        <layout>
            <updates>
                <surgery>
                    <file>surgery.xml</file>
                </surgery>
            </updates>
        </layout>
    </frontend>
    <admin>
        <routers>
            <surgery>
                <use>admin</use>
                <args>
                    <module>Test_Surgery</module>
                    <frontName>surgery</frontName>
                </args>
            </surgery>
        </routers>
    </admin>


texts: Join product_collection with order_item_collection

texts:
I am trying to list the most recently ordered products for a custom module (Magento 1.9.3.7).

I have it working, but I believe that the code is less efficient than it could be + the ordering of the products are not by the date of last purchase, which would be ideal.

I imagine that I could just join the products collection onto the 6 most recently sold items, but can't quite make this work. Is there a way to achieve this in one query?

$itemsCollection = Mage::getResourceModel('sales/order_item_collection');

$itemsCollection
->getSelect()
->limit(6)
->reset(Zend_Db_Select::COLUMNS)
->columns('product_id')
->group('product_id')
->join('catalog/product','`main_table`.`product_id` = `catalog/product`.`entity_id`')
->order('MAX(`main_table`.created_at) DESC');

$productids = [];
foreach($itemsCollection as $item) {
    $productids[] = $item->getProductId();
}

$productsCollection = Mage::getResourceModel('catalog/product_collection')
->addIdFilter($productids)
->addAttributeToSelect('*')
->addUrlRewrite()
->addMinimalPrice()
->addFinalPrice();

Br,
Martin


texts: Shop by category is missing when going to subcategory page

texts: I am developing a magento site where there is a left sidebar called "shop by category" by default in magento theme. I have created a category and there are some subcategories under parent category. When I go to parent category, it shows list of products as well as left sidebar with subcategories. But when I select subcategories, it shows list of products but left sidebar is missing. Is there any way to rectify it from admin or code level.


texts: how to passed array in product_form to observer in magento2

texts:
my phtml file code (below input tag is in for loop i=0 to i<5)
       <input type="text" name="array[]" value="<? echo $i ;?>" data-form-part='product_form'>

observer code
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $_product = $observer->getProduct();  // you will get product object

    $post = $this->_request->getPostValue();

    var_dump($post['array']);die();

}

after save product only print last value of array


texts: Directly upgrade the Magento 2.1.5 to 2.3

texts:
Can we directly upgrade the Magento 2.1.5 to 2.3? Magento 2.1 supports the PHP version 5.6, 7 & 7.1 only and Magento 2.3 supports 7.1.3,7.2,7.3. Both support the different versions while readiness checks it always raised an error “requires PHP ^7.1.3 -> your PHP version (7.0.6) does not satisfy that requirement”.

Anyone, can you please let me know the process of how to upgrade Magento 2.1 to 2.3. I am running this on my local window machine.


texts:
For some reason when I try to use the MagePlaza Social Login extension, LinkedIn login throws this error:

my configuration  and ID on LinkedIn

Please help!


texts: Setting up second website store symlinks

texts:
I have my magento build on a subdomain with the A record pointed to the host server.

I have set up the second website, the secondary domain, the store/catalog, edited and transfered the index.php and .htaccess files, and created the symlinks.

Here's where i think i went wrong. When i created the symlinks, i (stupid) wrote out the code provided, stupidly forgetting to replace example.com with the correct file path to the new domain. I tried to rm the links. It failed.

I don't understand this process. I was following instructions -blindly. Is there a place in the code base where this is hard coded and I can fix it? When i entered the ln -s commands, i was in the root of the domain.

I issued ln -s /home/example/example.com/html/app/ app
It seemed to have created the links.

I don't know how. And it failed to remove them with rm.


texts: Modify shipping/handling during checkout?

texts:
I would like to manipulate the Shipping and Handling fee during the checkout process.  Unfortunately, I cannot set an additional fee in the shipping method config because it's applied on a per-customer basis.

I have created a simple true/false customer attribute to determine if a customer should pay an extra shipping fee; if true, I want to add $5 to their shipping/handling.

I can add extra line items to the total by creating models like Model_Quote_Address_Totals_NewLineItem, but I cannot figure out how to edit the shipping fee directly.

What is the best way to modify the shipping/handling fee during checkout?


texts: Why can't change the admin url in magento1.9?

texts:
vim   /var/www/html/magento/app/etc/local.xml
#change [CDATA[admin]] into [CDATA[admin_guess]]

<admin>
    <routers>
        <adminhtml>
            <args>
                <frontName><![CDATA[admin]]></frontName>
            </args>
        </adminhtml>
    </routers>
</admin>

rm -rf /var/www/html/magento/var/cache/*

Why can't logon into admin with   http://my_host/magento/admin_guess?

Error info:
The requested URL /magento/admin_guess was not found on this server.

Apache/2.4.10 (Debian) Server at 128.199.80.4 Port 80


texts: Prevent Magento2 display information on script on homepage

texts:
I would like to know how can i stop magento2 to printing information about my plugin and script on homepage.If u analyze my code i have got all these script that contain information about all plugin i use.

I thought going on production mode should stop printing this info but it's not working.Please suggest me.


texts: How can I move blocks around in Magento 1.x layout?

texts: I'm trying to move the highlighted div right after the header page div. I'm not sure how I can do this - can someone explain how?


texts: I'm making a database connection between two seperate systems. I found a lot of options for updating existing products, but is there also a way to add new products through the Magento2 API?


texts: Is it possible to perform integration test end to end in payment gateway (Magento 2.2)?

texts: The payment gateway which perform authorize and capture action by third party , Is it possible to perform integration test from  end to end , like start from build request to response and then success , complete application actions test inside Vendor/ModuleName/Test/Integration , any comment and reference link to solution will be appreciated.


texts: how to call data in block from custom table in Magento 2

texts:
I am developing a reward points module.Two tables involve to this module(e25m_rewardspoints,e25m_rewardpoints_history).

I have created the My reward points page under customer my account page.

I want to show the relevant customers reward points in the page from table e25m_rewardspoints.
How to write this query in proper way?

"Select * from e25m_rewardspoints where customer_id="$customer_session_id""

Up to an echo from the page i have completed.

I don't want to use this way

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $customerSession = $objectManager->get('Magento\Customer\Model\Session');
    if($customerSession->isLoggedIn()) {
        $connection = $objectManager->get('Magento\Framework\App\ResourceConnection')->getConnection('\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION');

        $result = $connection->fetchAll("Select * from e25m_rewardspoints where customer_id= ".$customerSession->getId());
        return $result;
    }else{
        return "user_not_login";
    }


texts: Show the SKU in the dropdown of Configurable Products?

texts:
Possible this is a very simple task. But is it possible to add the SKUs of the Simple Products in the dropdown on the Configurable Products views?

There seem to be no option for doing this, so I assume it has to be programmed to do so?


texts: Out of stock product need to be least in the product search

texts: In product search(storefront), the out of stock products need to display only after the in-stock products. (But both should need to list). My Magento version is 2.17.


texts: Magento 1.9 Error log shows undefined variable: id

texts:
I have this error appers all the time in the system.log file. How to fix it?

ERR (3): Notice: Undefined variable: id  in /ext/vhosts/mysite.com/public/app/code/core/Mage/Core/Model/Abstract.php on line 224
ERR (3): Notice: Undefined variable: id  in /ext/vhosts/mysite.com/public/app/code/core/Mage/Core/Model/Abstract.php on line 225

I'm using Magento 1.9.3.0


texts: How to display swatches on homepage Magento 2

texts:
I have two products sliders

(based on \Magento\Catalog\Block\Product\Widget\NewWidget) on my homepage.

I would like to add swatches to these product sliders.

The sliders are added in my homepage.xml layout as below:

<container name="items.wrapper.slider" after="full.width.white.bar" htmlTag="div"
           htmlClass="wrapper wrapper--large c-catalog__products--slider-wrapper">
    <block class="Silvan\TestExtension\Block\Product\Widget\NewWidget"
           template="Magento_Catalog::product/widget/new/content/new_grid.phtml" name="new.products">
        <block class="Magento\Swatches\Block\Product\Renderer\Listing\Configurable" as="new.products.swatches" template="Magento_Swatches::product/listing/renderer.phtml" />
    </block>
</container>

I've tried to add the swatches by adding the block with class Magento\Swatches\Block\Product\Renderer\Listing\Configurable but this doesn't work as expected.

Does anyone know how to achieve this in homepage?

Thanks.


texts: Shipment Note PDF Print don't shows the shop address magento2

texts:
I am trying to put the store address to the shipment pdf. I found that Magento has an own function for address insertion, but it doesn't work.

Sales/Model/Order/Shipment.php
   public function getPdf($shipments = [])
    {
...
 $this->insertAddress($page, $shipment->getStore());

Sales/Model/Order/AbstractPdf.php

protected function insertAddress(&$page, $store = null)
    {

        $page->setFillColor(new \Zend_Pdf_Color_GrayScale(0));
        $font = $this->_setFontRegular($page, 10);
        $page->setLineWidth(0);
        $this->y = $this->y ? $this->y : 815;
        $top = 815;
        foreach (explode(
                     "\n",
                     $this->_scopeConfig->getValue(
                         'sales/identity/address',
                         \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
                         $store
                     )
                 ) as $value) {

            if ($value !== '') {

                $value = preg_replace('/<br[^>]*>/i', "\n", $value);
                foreach ($this->string->split($value, 45, true, true) as $_value) {
                    $page->drawText(
                        trim(strip_tags($_value)),
                        $this->getAlignRight($_value, 130, 440, $font, 10),
                        $top,
                        'UTF-8'
                    );
                    $top -= 10;
                }
            }
        }
        $this->y = $this->y > $top ? $top : $this->y;
    }


texts: To automatically update the price when the quantity of grouped products are changed

texts:
I use the grouped product feature. I use the code below to list the price;
<?php
$priceHelper = $this->helper(\Magento\Framework\Pricing\Helper\Data::class);

$products = $block->getSaleableItem()->getTypeInstance()->getAssociatedProducts($block->getSaleableItem());

$priceForAll = 0;
foreach ($products as $product) {
    $priceForAll += $product->getFinalPrice();
}
?>

    <span id="product-price-284" data-price-amount="<?php echo $priceForAll ?>" data-price-type="finalPrice" class="price-wrapper ">

             <?= $priceHelper->currency($priceForAll, true, false); ?>

I want the price of the main product to update automatically when the quantity of products change in the group. How can I do that?


texts: Magento 2 On checkout page, where shippingAddressFromData is fetched from database?

texts:
On checkout page, what is the class (PHP) that provides data to "mage-cache-storage", which is a key in 'Local Storage'.
About 'Local Storage':
https://superuser.com/questions/356494/what-is-store-in-local-storage-used-for-in-chrome

I'm interested specifically by 'shippingAddressFromData' object from JSON with key 'mage-cache-storage'.

I'd like to know where is the declaration in php/xml side of Magento 2 that  links 'shippingAddressFromData' and the php code that provides the data for it.


texts: Theme without require.js, knockout.js, AngularJS

texts:
I'm evaluating a the moment Magento2 as a solution for our Shop and I looked into a lot of Shops based on Magento2 to test the frontend performance and to be honest, I'm shocked. Every Shop I saw needs ~5 sec. to just render the form in the checkout (all of these Shope are already in production and some are even huge brands.).

I don't want to rant about M2, because I think the basic concept is pretty good, except the frontend part :)

Can someone recommend a basic theme without all of these javascript frameworks and maybe twig templates or does someone already has experience with removing all of these JS Frameworks from M2 and can share some thoughts?


texts:
NOTE: The categories are not the categories which are related to product those categories are and extension categories like for example this categories belong to blog and there are some items under this categories.

I have some categories which are fetched dynamically in this way

<a href="<?php echo $cat->getAddress(); ?>" ><?php echo $cat->getTitle(); ?>

Now if a category is selected I want to show it highlighted in this way means it should be shown as in active stage.

so far I tried giving class="current" to
 and by writing CSS for that but that doesn't worked please help me in solving this thanks in advance.

Please someone look into this issue.


texts:
I need to force one customer group to buy a minimum of 10 products per order (they get free shipping).

Looks to me like this is not possible with normal settings.

Where would I hook in to make this happen?

Would it be easier to use a minimum price instead of product count?


texts: magento 2.2 composer checking pubkeys fail

texts:
when i run a composer diagnose i get some errors, first of al i have to update my current composer version. But more of my concern is the FAIL on pubkeys.

Wich keys are this? The magento authentication keys or some others?


texts:
mates. I'm using simple solution to grab fields from billing that must work , but it doesn't .

just part of config, where we are creating observer :

       <checkout_type_onepage_save_order>
            <observers>
                <sale_recomendation_observer>
                    <type>singleton</type>
                    <class>Namespace_Field_Model_Observer</class>
                    <method>saveCustomData</method>
                </sale_recomendation_observer>
            </observers>
        </checkout_type_onepage_save_order>

my Model/Observer.php

    public function saveCustomData($observer) {
        $event = $observer->getEvent();
        $order = $event->getOrder();

        $fieldVal = Mage::app()->getFrontController()->getRequest()->getParams();

        foreach ($fieldVal as $key => $value){
            echo $key." -- ".$value;
        }
        die;

        //$order->setSaleRecomendation($var);
        if(!empty($var)){
            Mage::getModel('sales/order')
            ->setOrderId($order->getId())
            ->setData(array('sale_recomendation' => $var))
            ->save();
        }
    }

and, ofcourse, part of modified ...persistent/checkout/onepage/billing.phtml

        *<?php echo $this->__('Sale Recomendation') ?>

            <input type="text" class="input-text required-entry"
                    name="field[sale_recomendation]"
                    value="<?php echo $this->escapeHtml($this->getQuote()->getSaleRecomendation()) ?>"
                    title="<?php echo $this->__('Sale Recomendation') ?>"
                    id="billing:sale_recomendation" />

my foreach echo show me this : form_key -- fgfwhmetEgTqHteo .
no one billing field there.


texts: Magento 2 docker install: What is my admin user and password.

texts:
I have a Magento 2 installation using Docker as can be found here: https://github.com/ajmyers01/magento_docker

I have the site spinning up and can see the storefront, and when I go to access the admin url and log in using the credentials I specified in my docker-compose file it doesn't work and doesn't give an error message.

I'm unsure how to login, any insight as to, if my docker-compose isn't set up correctly to set the admin user, if there is a default admin user. Feel free to pull the repo and attempt it yourself. Thanks


texts: Description Attribute Editor Issue in Magento 2.3

texts:
I am developing website with multiple stores and each store has product description in different language.

My description attribute scope is Store View. When I'm going to change description store wise and uncheck the checkbox Use Default Value, although Description Editor is remain disabled and I can't change description.

I have also checked for JS error but there is not any errors.


texts:
i try to change the group of an user, but i won't save it. Any other data like firstname will be saved...

$customer = Mage::getModel('customer/customer')->load(0815);
$customer->setGroupId(5);
$customer->save();


texts:
How to get Store ID by store code in Magento 2

Thanks


texts: Customers being redirected after pressing place order

texts:
Having a major issue on my live store!

When the customer goes through the one page checkout, all is fine, but when the customer has got to the last step where it says place order, this should redirect to the success page (Using card payment).

Instead what happens is the customer gets redirected to the cart page, the items remain in their cart and they have no emails or order confirmation or anything! Also in the backend of the site, we have no order information coming through at all, so we cant see that this customer is trying to order on the site. The only reason why i found this problem out is because, although the order wasn't placed on the website, the money still gets transferred into my paypal, so the payment is being taken but we have no idea its happening except the emails that are coming through from paypal.

What do i do!?! Anyone know why this is happening?

To clarify, no order information is being stored on the backend or sent to the customer, and they are just being redirected back to the cart.

Thanks

EDIT

I have just put my site back into sandbox mode for paypal who deals with all transactions on our site, and i processed both a paypal order and card payment order using the sandbox and both orders went through perfectly, so is seems as though the issue is occurring when i set my payment methods to use paypal live...?

I checked var/log/exception.log and i have no errors which are related to the issue.


texts: How to uninstall extension Algolia_AlgoliaSearch in Magento 2?

texts:
I had installed Algolia_AlgoliaSearch extension via composer in Magento 2.

Now I want to remove this extension from the website. So that I have deleted the complete files and folders of the extension.

After that running upgrade command then I am getting an error:

PHP Warning:  require(/var/www/html/new/vendor/composer/../algolia/algoliasearch-magento-2/registration.php): failed to open stream: No such file or directory in /var/www/html/new/vendor/composer/autoload_real.php on line 71
PHP Fatal error:  require(): Failed opening required'/var/www/html/new/vendor/composer/../algolia/algoliasearch-magento-2/registration.php' (include_path='/var/www/html/new/vendor/magento/zendframework1/library:/var/www/html/new/vendor/php                                  unit/php-file-iterator:/var/www/html/new/vendor/phpunit/phpunit:/var/www/html/new/vendor/symfony/yaml:.:/usr/share/pear:/usr/share/php') in /var/www/html/new/vendor/composer/autoload_real.php on line 71

How to fix this?


texts:
I have a bundle with a fixed price. If I add this bundle to the cart, the entry in the database looks somethink like this:

| item_id  |  product_type  |  parent_item_id  |  sku      |  price  |
 --------------------------------------------------------------------
| 1        |  bundle        |                  |  bundle1  |   49.99 |
| 2        |  simple        |  1               |  p1       |   0     |
| 3        |  simple        |  1               |  p2       |   0     |
| 4        |  simple        |  1               |  p2       |   0     |

but I'm actually need a price for every single product based on the percentage share from the original price to the bundle and the bundle price should be 0.

The way I would go is to rewrite the class Mage_Bundle_Model_Product_Price and do the calculation by my own. Maybe I could use some events and don't need to rewrite the class which definitely would be better.

Actually I'm a bit worried about the price rounding. I think in some case the total of all simple product prices could be diffrent to the actual fixed bundle price.

So thats why I would like to ask you if you know a core method to do this which I don't think of. Or maybe there is already a existing module which does exactly this calculation.


texts: magento extension new routers not working (404)

texts:
I added some routes to my Magento extension and it worked on localhost and my test server, however, when a client installed the extension all the new routes lead to the site's 404 page.

The client assured me he cleaned the cache (don't know which cache though, he just said he cleaned the cache), and the module is enabled and has output since other things work.

Any ideas why the new routes don't work?
They are defined like this:

config.xml:

<routers>
    <vendorname_module_debuge_data>
        <use>standard</use>
        <args>
            <module>Vendorname_Module</module>
            <frontName>vendorname_debug_data</frontName>
        </args>
    </vendorname_module_debuge_data>
</routers>

and the controller:

class Vendorname_Module_DebugDataController extends Mage_Core_Controller_Front_Action
{
    public function dumpAction()
    {
        ...
        echo "something...";
    }
}

But please don't focus on syntax, settings etc as it work perfectly both on localhost and on my test server. Just not on the client for some reason.

Any ideas?


texts:
I want to modify the method _renderContainer($name) in the class \lib\internal\Magento\Framework\View\Layout so that I can pass it another argument and add this to the construction of the container.

The end goal is to add a custom attribute to the container.

Plugin's don't work here I believe and trying a preference I think would need to move huge amounts of classes into my new namespace. Thanks.


texts: Magento 2: How do i get attributes of a specific group like 'product details'

texts:
Hi I want to fetch the attributes of a specific group only. How can i filter the attributes.

Code:

$attrCodes = $block->getProductAttrData($pattr);
foreach($attrCodes as $attrCode)
{
    echo $attrCode->getDefaultFrontendLabel().'
';
    echo $attrCode->getAttributeCode().'
';
}
}

I want to filter the product details group attributes. How can i achieve this.


texts: Change category product sort order values

texts:
I want to change one time all sort order values of the products inside all categories, by using a php script.

Currently all products inside all categories do got the value 1 for the sort order.

I want to change this to 10000, so that I can easily change the sort order of the products.

How can I achieve that?


texts:
I want to show on recently viewed products list button for removing product from that list. Is the way to do it?

Some more details:

There is available with Magento, out of the box, block with recently viewed products, where we can see all products, which we have visited on the shop.
I want to show REMOVE button near each of product on recently viewed list.
When I click REMOVE button, I want to product related to this button disappear from recently viewed products list.


texts: SUPEE6788 and SQL statements in addFieldToFilter

texts:
At SUPEE-6788 Technical Details the Magento people give examples about how to fix Magento modules. Anyway, I have some places I found after install the SUPEE6788 patch that isn't explained in examples maybe someone could help me with. I have this:

$collection->addFieldToFilter('`main_table`.order_id', array('in' => $ordersIds));

I'm just wondering how to fix it? Like this: ('main_table .order_id',array('in" =>$ordersIds)) i.e. just remove the " ` " ?

Thanks


texts: Create custom shipping rate programmatically

texts: I want to create custom shipping rate according to a formula which is Shipping rate = product weight + 10.00$ and add it to total grand total programmatically. I wanted to know the procedure for creating it. Thanks in advance!


texts: magento 2.3.5p1 showing configurable product price regular and special price together in listing and product info page

texts:
I use magento 2.3.5.p1 and use template claue. If a configurable product has a special price magento shows only the special price by default not the regular or oldprice. Only if a select a attribute on the product info page it show both. I have looked for a solution and found one but this one isn't working
in this solution i have to alter the final_price.phtml file in the vendor directory. I have done this but nothing changes. Looks like the template or css is hidding the regular price until you choose a attribute. If i look in the source of the html file the regular price is there. It only isn't showing.
see picture also where left is the current situation and right what i want
Who helps me?
thanks for the attension


texts: Canonical Product URL with category path not showing

texts:
My webshop is not displaying the canonical product url's with the category path.

I have "Use category path for Product URL's" enabled in the backend but it doesn't seem to work.

Would anybody have any suggestions on where to look?


texts: How to add Barcode in invoice pdf in magento

texts:
I want to print "Barcode"(image) in invoice means when we generate invoice from admin panel the that invoice should contain  all product related details along with barcode image .I saw all questions related to above problem but i did't satisfy.

Please tell me step by step instruction where we have to modify files (file path) for adding barcode attribute to pdf.


texts:
We are planning to import a few thousands of products with custom options in Magento CE 1.9. We use SOAP for that, CSV is not an option since additional attributes may store html, json or serialized arrays.
WSDL cache is enabled, index is disabled before and restored after bulk import/update.

Attribute media is another story but for the simple product creation, the ws needs 5 s, 10s in total if we take account of the custom options import. We can live with that but the real issue is this duration (10s) keeps raising in time to reach 50+s for the 200th product! Re indexing reset this value to 10s.

What is going on, has anyone encountered this and eventually find a solution?

MySQL and Apache are on the same server with 8 vCPUs and 16 GB RAM.


texts: including customer/wishlist into customer/account/index

texts:
In customer->account->index I currently have the following Child Html (customer.account.dashboard.extra, info, address). My idea is to include other child html into that page to enhance current customer view when they log into the system and are redirected to their account info.

I copied the information from wishlist.xml:

<block type="wishlist/customer_wishlist" name="customer.wishlist" template="wishlist/view.phtml">
    <block type="wishlist/customer_wishlist_items" name="customer.wishlist.items" as="items" template="wishlist/item/list.phtml">
        <block type="wishlist/customer_wishlist_item_column_image" name="customer.wishlist.item.image" template="wishlist/item/column/image.phtml" />
        <block type="wishlist/customer_wishlist_item_column_comment" name="customer.wishlist.item.info" template="wishlist/item/column/info.phtml">
            <action method="setTitle" translate="title">
                <title>Product Details and Comment</title>
            </action>
        </block>
        <block type="wishlist/customer_wishlist_item_column_cart" name="customer.wishlist.item.cart" template="wishlist/item/column/cart.phtml">
            <action method="setTitle" translate="title">
                <title>Add to Cart</title>
            </action>
            <block type="wishlist/customer_wishlist_item_options" name="customer.wishlist.item.options" />
        </block>
        <block type="wishlist/customer_wishlist_item_column_remove" name="customer.wishlist.item.remove" template="wishlist/item/column/remove.phtml" />
    </block>
    <block type="core/text_list" name="customer.wishlist.buttons" as="control_buttons">
        <block type="wishlist/customer_wishlist_button" name="customer.wishlist.button.share" template="wishlist/button/share.phtml" />
        <block type="wishlist/customer_wishlist_button" name="customer.wishlist.button.toCart" template="wishlist/button/tocart.phtml" />
        <block type="wishlist/customer_wishlist_button" name="customer.wishlist.button.update" template="wishlist/button/update.phtml" />
    </block>
</block>

and include that information into local.xml inside <customer_account_index translate="label">

then I placed <?php echo $this->getChildHtml('customer') ?> inside customer/account/dashboard.phtml

But no results are displayed. My main idea is to know which steps do I have to follow to include particular codes into other pages. (like: modify xml, include in phtml.., etc).


texts: Hide checkout link if quantity is greater than 1 of three specific products in cart

texts:
We'd like to hide the Proceed to Checkout button on the Cart page if any quantity greater than 1 total of a set of 3 products are in the cart.

In other words, the customer can only buy a max of ONE of the following Product IDs: 4, 44, and 47.
I'd like to simply check the cart and total a count of all 3 of those Ids in their cart.
If it's any more than 1 total, then I want to hide the Proceed to Checkout button (and likely echo a note like "You can only buy 1 total of the special products")

I'm using the link.phtml template and figured I need to cycle thru the Cart quote to tally the count in cart of those three products. And of course, if more than 1 then display the message, else display the checkout button.

I've looked at and tried other examples of checking for products in cart, but can't wrap my head around checking for an array of 3 products and tallying the total count. Any help would be appreciated.


texts: Magento products packs (assortiment) with size and stock control - like 3-pack or 6-pack

texts:
Suppose we sell socks. In sizes S, M and L.

Currently we use

1 configurable product
That is linked to 3 simple products, each with its own stock
If a sale is made stock is deducted from the simple product by qty #

Now we would like to create packs of the individual configurable product, say "buy 6 pairs of socks" for price Y.

I can imagining creating 1 product, that

works the same as a configurable product, where
a customer has to select his/her size
but when a sale is made of 1 product (the 6 pack or 8 pack for that matter)
then 6 pieces are deducted from the simple product qty # (instead of 6)

Question: can this be done out of the box? Or is an extension required?

The major element to understand is that one wants to create a new standalone configurable prodcuts (say a T-shirt) where a customer would just like normal select the size and the qty and click add to cart. Only if the product was created as "pack" and has a value ons tock level for a new attribute say "products in pack" (which defaults to 1) then the title of the product can be something like "6 pack t-shirts" and the image shows 6 T-shirts etc.etc. You enter qty=1 (because you want ot buy 1 pack) but the backend order processing should register 6*qty ("products in pack"=6 in this example) when changing the underlying simple products stock. So all values of the configurable product work natively, but not the stock this is influenced by the "products in pack" attribute.

thx!


texts: Do I have to escape this search $q input? (for sql injection)

texts:
In Magento2 I have a Collection method for a search function like this:

 /**
     * @param string $q
     * @return $this
     */
    public function addSearchFilter($q)
    {
        $this->addFieldToFilter(
                array('title', 'content'),
                array(
                    array('like' => '%' . $q . '%'),
                    array('like' => '%' . $q . '%')
                )
            );
        return $this;
    }

My question is: is this safe? Or do I need to escape $q to prevent sql injection?


texts:
I am using magento version 1.8.

I have installed ssl certificates from godaddy and given the base secure url as https://www.mydomain.com. I have also selected both the options

Use secure urls in frontend and Use Secure urls in admin.

But when I try with https I am getting page not found error. And am not able to access into my admin page. My site is working fine though.


texts: programmatically check if coupon code is correct

texts:
I need  to check to see if a coupon code is correct in an ajax controller, how is this done?

I get the code like this:

$param['code'];


texts: Magento 2 : Redirect in case it's not me during dev phase

texts:
I've already installed Magento 2 and started with config and uploading products - working quite nice.

Now I'd like to forward all traffic to another website (currently just using a index.php with a simple http redirect) UNLESS it is me.

Maybe more a PHP topic then Magento but maybe there is sth in Magento that can help?

So basically:
If me show me Magento etc. as usualy
else redirect


texts: Adding multiple "per-item" shipping options

texts: I need two have two "per-item" shipping options, with different base prices and per-item rates. Standard shipping, not usps/ups/fedex. It doesn't seem like there's a good way to do this. I've read about setting up multiple flat rates, but I don't believe that applies to this situation. Anyone have an idea?


texts: Is it possible in magento 2 using model inside the controller to save the data?

texts: I just want to save data in the database but the data calculated in controller so is it possible to store the data in database using the model in the controller.


texts: Magento 2 admin not working after migration

texts:
We have developed a dev website having URL like dev.abc.com and it has magento 2 installed and it is working fine.

Now I need to migrate it on another domain say test.abc.com for that I have done following steps:

Dump for the website which is running for dev.abc.com.
Rename the URL from http://dev.abc.com to test.abc.com.
Deleted var/cache folder
Change the permission for var and pub folder
Change the database credentials in app/etc/env.php

After that Front end section is working fine but admin page is blank and not opening.


texts: Magento 2: what are the benefits of installing magento 2 using composer?

texts: As all of you know we can install Magento 2 using setup wizard or using composer. I would like to know what are the other benefits (except up gradation of core modules) of installing Magento 2 using composer? and which way of installing is recommended?


texts:
I'm seeing that everytime an order is placed, you have to refresh the cache manually, it displays the message on admin panel. In specific the configuration type cache. Is that normal?

I display an additional information on products like how many items are sold, so I need to resfresh the cache everytime an order is placed.

How can I do it?


texts: Remove Recently Viewed Products in RWD Theme using local.xml

texts:
I am trying to remove the Recently Viewed Products from sidebar on the new RWD Theme. Please see my local.xml:

<?xml version="1.0"?>
<layout>
    <default>
        <remove name="catalog.compare.sidebar"/>
        <remove name="right.reports.product.viewed"/>
    </default>
</layout>

I have managed to remove the compare sidebar but not the recently viewed. I have manage to do it on the other themes but not on the RWD. I have also checked all the xml files in the layout folder for RWD for the words viewed and reports and nothing comes back. So I get its reverting back to BASE but then if that was the case should the above xml code remove the recently viewed?

Thanks


texts: Magento2 how to get web image in controller file inside?

texts:
I am using magneto2 and in controller file I try to call getImageUrl function but unable to get Image url.
Please let me know how to get products image url in controller.
In console i an getting

500 request error


texts: Magento2 : Customize the product detail page both in Storefront & Admin panel

texts:
I need to edit the existing product detail page by adding more images and description under them. But I need to automate this function from the backend also. Something like adding 1st image and the relevant detail for the image. Then again 2nd image and the relevant detail for the 2nd image. I need to add about 5 figures but product to product it can be varied.  These details should be added from the admin panel. As the figure below.

How should I do this? Adding a module will solve this? But I need to edit the existing product detail page.


texts:
I've looking this solution for hours!
The v3 is way to old and buggy.
Anyone has been able to upgrade it to v4.3?


texts: Adding Category option : cannot read get

texts:
I'm trying to add a category option and by doing so appearently broke some things.

This is my code :

namespace/module/Setup/InstallData.php

<?php
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\InstallDataInterface;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory) {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'attribute_id', [
            'type'     => 'int',
            'label'    => 'Enable Mega Menu',
            'input'    => 'boolean',
            'source'   => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'visible'  => true,
            'default'  => '0',
            'required' => false,
            'global'   => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'group'    => 'General Information',
        ]);
    }
}
?>

Namespace/Module/view/adminhtml/ui_component/category_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="general">
        <field name="enable_megamenu">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortOrder" xsi:type="number">21</item>
                    <item name="dataType" xsi:type="string">boolean</item>
                    <item name="formElement" xsi:type="string">checkbox</item>
                    <item name="prefer" xsi:type="string">toggle</item>
                    <item name="valueMap" xsi:type="array">
                        <item name="true" xsi:type="string">1</item>
                        <item name="false" xsi:type="string">0</item>
                    </item>
                    <item name="label" xsi:type="string" translate="true">Enable Mega Menu</item>
                    <item name="default" xsi:type="number">0</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

Error that i now have :

Disabling or enabling the module does not change anything.
My category admin page is not completing its loading anymore (it keeps a loading icon in the middle).
I have the next output error in my console :

Uncaught TypeError: Cannot read property 'get' of undefined

Documentation that i used :
Documentation magento

Image on request :


texts: Getting data from order works in template, but not in transaction mail?

texts:
I am running this code in my Template file:

echo($_order->getDeliverydate());

It echo a date, doing that in my transaction mail, it stays empty:

{{var order.getDeliverydate()}}

Any ideas what I might be missing?


texts: PayPal gateway has rejected payment request

texts:
When I try to make payment via PayPal Gateway then I am getting this error:

  "PayPal gateway has rejected request. Payment has already been made
  for this InvoiceID (#10412: Duplicate invoice).

I am using paypal express checkout. Some times it works well, but some times it gives error after redirecting to cart page.

Please help.


texts: How to fix "Eliminate render-blocking JavaScript and CSS in above-the-fold content in Magento

texts:
I have minified JS and CSS and optimized images. Used async="async" in js where it is applicable. How to fix "Eliminate render-blocking JavaScript and CSS in above-the-fold content"

Any Ideas?


texts: some strange errors at the botttom in site

texts:
our site is loading very very slow & if you scroll down to bottom of the page you can see these errors in image :

how to fix this issue ?


texts: Need details of tables that store Zip codes?

texts: I want to use cities instead of zipCodes. Need details of table/s where I could insert city values instead of Zip codes.


texts: How to get product price after a discount was applied

texts:
I tried to get the  product price after a catalog price rules was applied and i can't.

The code that i use to do this:

//load product by id
   $product = Mage::getModel('catalog/product')->load($product->getId());

    //get promo_price
    $promo_price = Mage::getModel('catalogrule/rule')->calcProductPriceRule($product,$product->getPrice());

and this:

$promo_price = $product->getPrice() - $product->getDiscountAmount();

But this code  returns me NULL.

Does anyone know how can i do this?


texts:
I keep getting this error:

  main.CRITICAL: Invalid method
  Inchoo\SocialConnect\Block\Login::_getColSet [] []

method:

protected function _getColSet()
{
    return 'col'.$this->numEnabled.'-set';
}

I can't seem to figure out what is causing the error


texts: How to get all product details using REST API in magento 2?

texts:
I have created Integration in System->Integration. And Set access to catelog ->products to the integration. I can get Single Product by Sku using

  http://localhost.com/index.php/rest/V1/products/:sku

But i need to display all the products. How to get the result.

Thanks in advance.

My Code to get product details

function sign($method, $url, $data, $consumerSecret, $tokenSecret)
{
    $url = urlEncodeAsZend($url);

    $data = urlEncodeAsZend(http_build_query($data, '', '&'));
    $data = implode('&', [$method, $url, $data]);

    $secret = implode('&', [$consumerSecret, $tokenSecret]);

    return base64_encode(hash_hmac('sha1', $data, $secret, true));
}

function urlEncodeAsZend($value)
{
    $encoded = rawurlencode($value);
    $encoded = str_replace('%7E', '~', $encoded);
    return $encoded;
}

// REPLACE WITH YOUR ACTUAL DATA OBTAINED WHILE CREATING NEW INTEGRATION
$consumerKey = 'key';
$consumerSecret = 'key';
$accessToken = 'key';
$accessTokenSecret = 'key';

$method = 'GET';
$url = 'http://localhost.com/index.php/rest/V1/products';

//
$data = [
    'oauth_consumer_key' => $consumerKey,
    'oauth_nonce' => md5(uniqid(rand(), true)),
    'oauth_signature_method' => 'HMAC-SHA1',
    'oauth_timestamp' => time(),
    'oauth_token' => $accessToken,
    'oauth_version' => '1.0',
];

$data['oauth_signature'] = sign($method, $url, $data, $consumerSecret, $accessTokenSecret);

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => $url,
    CURLOPT_HTTPHEADER => [
        'Authorization: OAuth ' . http_build_query($data, '', ',')
    ]
]);

$result = curl_exec($curl);
curl_close($curl);
echo '<pre>';print_r(json_decode($result));

But it returns error

[message] => %fieldName is a required field.
    [parameters] => stdClass Object
        (
            [fieldName] => searchCriteria
        )


texts: There is non-stop reloading of the page Magento 1

texts:
When you go to the page with Google Maps, the page is continuously reloading.
Нow to fix it ?


texts: Had error bar in admin to refresh cache.  Did so and now site is down and rendering looks like Prodigy circa 1993.  Suggestions?


texts: Magento 2.3: Sort Product Attribute Set Groups in Admin

texts:
I'm trying to clean up our product forms in the admin using Attribute Set groups, however, sorting them in the Attribute Set options doesn't seem to affect the product edit page:

As you can see in this example, Firmware group should come after the Images group, however that's not the case on the actual product page.

I've tried clearing cache and re-indexing. Any other ways to sort these, possibly via a layout file?


texts:
I create one tag form for my module. I want to create one pop up with previously saved tags using click on input filed.
Check below screenshot for reference.


texts: How to send reward points to another customer by email?

texts: Has someone worked with the reward points module? Maybe someone has created functionality transfer points to other customer by email?


texts: How to change the admin design in magento of order menu?

texts:
I wanted to change the text Additional Information to another text. The screenshot of the admin dashboard of magento of the order menu.

Can anyone say which is the path of this design in the backend ?


texts: Is It Worthwhile To Use A Separate MySQL Server?

texts:
A similar question turned into opinion soup over here: So maybe there's no 'right' answer to this, but I want to check with the community.

My client is about to launch a TV advert. They are expecting traffic in the 7-digit department over the coming month. My job is to ensure the server does not fall over.

My question: is it worthwhile to split the MySQL database onto a separate server, which only serves the database. I then want to have multiple servers which contain the codebase and serve apache, interfacing with the database box. All will be virtual containers.

I do NOT (think) I want to use multiple DB servers - seems it will introduce unnecessary complexity and potential errors/bottlenecks.

Am I wrong? Would welcome some experience opinions on this. Thanks.


texts: How to make Order with Parallel Express Checkout in Paypal?

texts:
How can we place "Order" for parallel transactions in Express Checkout?

I set

PAYMENTREQUEST_0_PAYMENTACTION = Order  PAYMENTREQUEST_1_PAYMENTACTION= Order in SetExpressCheckout and then in DoExpressCheckoutPayment. but it gives error "Internal Error"  PAYMENTINFO_1_ERRORCODE] => 10001
    [PAYMENTINFO_1_SHORTMESSAGE] => Internal Error
    [PAYMENTINFO_1_LONGMESSAGE] => Internal Error
    [PAYMENTINFO_1_SEVERITYCODE] => Error
    [PAYMENTINFO_1_ACK] => Failure All is fine until  DoExpressCheckoutPayment  why this internal error is coming?  Thanks in advance


texts: Magento2: How to enable Docx, Doc files on wysiwyg to upload attachments to static blocks?

texts:
How I can enable the Docx, Doc or how can I do it on Magento 2 for uploading Docx, Doc attachments to static Blocks?

Thanks


texts: Update Store Summary By Checkout Address Country Change

texts: So Basically I want to update my checkout cart summary when user select country from shipping address ,cart price and currency change according to the country he selected in shipping address.


texts: Security Error - Bug Shooting return Data has been tampered error in Success page?

texts: Magento 1.9 - Using Bug Shooting if i try to place an order i am getting response regard Data has been tampered. How to solve this security issue?


texts:
I have multiple stores and I would like to have different text and images, while the stores are in maintenance mode.
To do that I need to change the 503.phtml file .

This is the default content of the file:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Obviously I cannot use the Mage::app()->getStore(), because the Mage.php is not included, but before I start to hardcode it, by getting the domain name using php , I want to ask you if there is  another way to do this ?

Thank you!


texts: How to pass a Magento 2 variable to KnockoutJS

texts:
I want to pass $vendor_city to knockoutJS:

<?php
    $vendor_city = $vendor->getData('city');
?>

<div id="m2-component" data-bind="scope:'ko'">
<script type="text/x-magento-init">
    {
        "#m2-component": {
            "Magento_Ui/js/core/app": {
               "components": {
                    "ko": {
                        "component": "some_mdl/js/estimate",
                        "template" : "some_mdl/estimate"
                    } // How do I pass a variable here to estimate.js?
                }
            }
        }
    }
    </script>
</div>

estimate.js

define(['uiComponent', 'ko', 'jquery'], function (Component, ko, jquery) {

    return Component.extend({
        initialize: function (config) {
            var self = this;
            this._super();

            // I want get that variable here

        },
});

I already done like this:

<script>
    window.sellerlocation= '<?=$vendor_city;?>';
</script>

But I want to pass a PHP variable to KnockoutJS via a KnockoutJS component initialize, not a JavaScript window object.


texts: How to move layered navigation above toolbar for specific category in Magento 2

texts:
I'm trying to move layered navigation above description block for specific category and category page set in full width from backend in Magento 2 but it's not working.

Can anyone help or suggest?


texts: How can i update label name of full images in bulk using CSV upload

texts: I need to update all label name of images, how can i do it by csv.


texts: Discount/Coupon Code Block not refreshing AJAX

texts:
I have racking my brain about this but not sure where the issue is, though my knowledge of php and ajax is about as minimal as it gets. I have been able to get the discount button on the last step of my onepage checkout process. However, when entering the code and clicking 'apply coupon' .. nothing happens. So I am not sure if there is a call that should be going on or what.

coupon.phtml

<form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post">

<?php echo $this->__('Discount Codes') ?>

            <?php echo $this->__('Enter your coupon code if you have one.') ?>
            <input type="hidden" name="remove" id="remove-coupone" value="0" />

                <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->escapeHtml($this->getCouponCode()) ?>" />

                <button type="button" title="<?php echo $this->__('Apply Coupon') ?>" class="button" onclick="discountForm.submit(false)" value="<?php echo $this->__('Apply Coupon') ?>"><?php echo $this->__('Apply Coupon') ?></button>
                <?php if(strlen($this->getCouponCode())): ?>
                    &nbsp; <button type="button" title="<?php echo $this->__('Cancel Coupon') ?>" class="button" onclick="discountForm.submit(true)" value="<?php echo $this->__('Cancel Coupon') ?>"><?php echo $this->__('Cancel Coupon') ?></button>
                <?php endif;?>

  </form>

I also posted this within the checkout.xml

<block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
...
    <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
...
</block>

as per noted here: https://stackoverflow.com/questions/28759782/magento-how-to-add-promo-code-form-on-one-page-checout-page

Again, the block is there, it just has no functionality currently. Would love for a little help! If any other file documentation is needed, just ask!


texts: Missing 'return' statement in frontend Controller execute() method (IDE warning notice)

texts:
I recently use PhpStorm to write my code and it finds an error in a controller who get data from a <form> to save them in a custom model. (works fine even without correction).
Class StockRequestForm extends \Magento\Framework\App\Action\Action
{
    public function __construct(....)
    {
        ....
    }

    /**
     * @inheritDoc
     */
    public function execute()
    {
        $resultRedirect = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT);
        if (!$this->helper->getFormKeyValidation($this->getRequest())) {
          $this->messageManager->addErrorMessage('Invalid request!');
          return $resultRedirect->setRefererOrBaseUrl();
        }

        $post = (array)$this->getRequest()->getPost();
        if (!empty($post)) {
            try {
                ... // saving $model
                $this->messageManager->addSuccessMessage(__('You\'re request have been submitted.'));
                return $resultRedirect->setRefererOrBaseUrl();
            } catch (\Exception $e) {
                $this->messageManager->addErrorMessage($e->getMessage());
                return $resultRedirect->setRefererOrBaseUrl();
            }
        }

        $this->_view->loadLayout();
        $this->_view->renderLayout();

    } // here the missing 'return' statement !
}


texts: Is there a magento extension that will help me split test different price points?

texts:
I was looking through the connect marketplace for a split testing extension that could help me optimize my product pricing and thus my profit per sale. To my surprise I didn't find anything.

I think it would be very useful to have a system that could test different price points for products in my store in a statistically valid way (doing this manually by changing the price a few times a week would not result in a valid test, we would need to do actual a/b split testing on the price, serving one price to visitor A and one to visitor B simultaneously).

The only thing I found was some split testing on page content (via GA and convert.com), but not on pricing as far as I can tell.

Does anyone know if there is an extension out there that I have overlooked?

Or am I the only stats freak that would want to use this?

If not, please let me know and I just might make an extension that does just that.

Thanks!


texts: Magento 2 Add custom AJAX script in HTML file

texts:
I want to add this code inside my html file but it's not working, tried it in phtml file and it works. Can someone tell me how can make it work in html
<script>
        require([ 'jquery', 'jquery/ui'], function($){
            $(document).ready(function(){
                var frm = $('#myForm');
                frm.submit(function () {
                    $.ajax({
                        type: frm.attr('method'),
                        url: frm.attr('action'),
                        data: frm.serialize(),
                        success: function (data) {
                            $("#send-success").html("OTP Resend Successfully");
                        },
                        error: function(data) {
                            $("#send-error").html("Something went wrong!");
                        }
                    });
                    return false;
                });
            });
        });
    </script>


texts:
I want to set delivery charges based on products categories, states and weight.

I have added delivery charges field also while uploading the products but unfortunately that Delivery charges is not getting add on payment while Checkout.

Moreover, I have to set estimate delivery module based on States.


texts: Image is not showing in my custom grid of Magento 1.9.4.3

texts:
I am trying to add an Image using my custom admin form. The image is saved while uploading it via custom admin form. But does not displays in the admin grid image column of my custom-created module. Here is the screenshot.

As you can see my image has been saved using my custom admin form. The src of an image is generated and the image is been displayed in the my custom created form.

But the image does not displyed in the admin grid. I had created the renderer to get the image but it doe not work for me. The renderer doesn't generate the src of my image.
Please check my code below:

Grid.php

$this->addColumn("image", array(
        "header"    => Mage::helper("news")->__("Image"),
        "type"      => "text",
        "width"     => "150px",
        "index"     => "image",
        "renderer" => "Custom_News_Block_Adminhtml_News_Grid_Renderer_Image",
    ));

Custom/News/Block/Adminhtml/News/Grid/Renderer/Image.php

class Custom_News_Block_Adminhtml_News_Grid_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
public function render(Varien_Object $row) {
    $val = Mage::helper('news/news')->init($row, 'thumbnail')->resize(100);
    $out = '<img src=". $val ." width="100px" height="100px"/>';
    return $out;
}   }

Form.php

$fieldset->addField('image', 'image', array(
        "label"     => Mage::helper("news")->__("Image"),
        "name"      => "image",
        "note" => "(*.jpg, *.png, *.gif)",
      ));

NewsController.php

try {   //Save Image
try {
    if ((bool) $postData['image']['delete'] == 1) {
        $postData['image'] = '';
    } else {
        unset($postData['image']);
        if (isset($_FILES)) {
            if ($_FILES['image']['name']) {
                if ($this->getRequest()->getParam("id")) {
                    $model = Mage::getModel("news/news")->load($this->getRequest()->getParam("id"));
                    if ($model->getData('image')) {
                        $io = new Varien_Io_File();
                        $io->rm(Mage::getBaseDir('media') . DS . implode(DS, explode('/', $model->getData('image'))));
                    }
                }
                $path = Mage::getBaseDir('media') . DS . 'news' . DS . 'news' . DS;
                $uploader = new Varien_File_Uploader('image');
                $uploader->setAllowedExtensions(array('jpg', 'png', 'gif'));
                $uploader->setAllowRenameFiles(true);
                $uploader->setFilesDispersion(false);
                $destFile = $path . $_FILES['image']['name'];
                $fileName = $uploader->getNewFileName($destFile);
                $uploader->save($path, $fileName);
                $postData['image'] = "news/news/".$fileName;
            }
        }
    }
} catch (Exception $e) {
    Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
    $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
    return;
}

Can anyone please help me to get it solved. I had refered this this post to create renderer for my custom grid.


texts: Magento 2 how to setParentBlock for an existing block?

texts:
In Magento 1, when I want to make a block to be parent of an existing block, I only need to do this

$this->setParentBlock($parentBlock);

In Magento 1, the implementation is in Mage_Core_Block_Abstract class

/**
 * Set parent block
 *
 * @param   Mage_Core_Block_Abstract $block
 * @return  Mage_Core_Block_Abstract
 */
public function setParentBlock(Mage_Core_Block_Abstract $block)
{
    $this->_parentBlock = $block;
    return $this;
}

Now in Magento 2, I can only see the getParentBlock method:

/**
     * Retrieve parent block
     *
     * @return \Magento\Framework\View\Element\AbstractBlock|bool
     */
    public function getParentBlock()
    {
        $layout = $this->getLayout();
        if (!$layout) {
            return false;
        }
        $parentName = $layout->getParentName($this->getNameInLayout());
        if ($parentName) {
            return $layout->getBlock($parentName);
        }
        return false;
    }

My problem is when I tried to extend Magento\Sales\Block\Adminhtml\Order\View\Info class, my class need to have  a parent block in order to work. You can see the reason in Info class

/**
     * Retrieve required options from parent
     *
     * @throws \Magento\Framework\Exception\LocalizedException
     * @return void
     */
    protected function _beforeToHtml()
    {
        if (!$this->getParentBlock()) {
            throw new \Magento\Framework\Exception\LocalizedException(
                __('Please correct the parent block for this block.')
            );
        }
        $this->setOrder($this->getParentBlock()->getOrder());

        foreach ($this->getParentBlock()->getOrderInfoData() as $key => $value) {
            $this->setDataUsingMethod($key, $value);
        }

        parent::_beforeToHtml();
    }

I always got the error "Please correct the parent block for this block."


texts: Why Magento re-saves existing customer addresses during checkout?

texts:
During the checkout process even if customer selects existing address form the drop-down the customer_address entity is being re-saved. Any idea what for?

Update:

It starts at Mage_Checkout_Model_Type_Onepage::saveOrder where the following code is executed:

$service = Mage::getModel('sales/service_quote', $this->getQuote());
$service->submitAll();

This submitAll calls Mage_Sales_Model_Service_Quote::submitOrder which executes the following:

$transaction->save();

This method loops through all objects of the quote(?) and saves them.

Update:

The most disgusting thing is that they are doing it for all addresses customer has. So if your visitor get 10 addresses saved in the address book all of them will be re-saved during checkout. Don't wonder why it is the most resource consuming part of Magento.


texts:
I've been trying to create an Order by Rest API and, then shows up the below error
Uncaught Error: Call to a member function setEmailSent() on null in.

public function metodoHudson(OutputInterface $output, $orderData)
{
    $store=$this->_storeManager->getStore();

    $websiteId = $this->_storeManager->getStore()->getWebsiteId();
    $customer=$this->customerFactory->create();
    $customer->setWebsiteId($websiteId);
    $customer->loadByEmail($orderData['email']); // load customet by email address 263135

    if(!$customer->getEntityId()){
        //If not avilable then create this customer
        $customer->setWebsiteId($websiteId)
        ->setStore($store)
        ->setFirstname($orderData['shipping_address']['firstname'])
        ->setLastname($orderData['shipping_address']['lastname'])
        ->setEmail($orderData['email'])
        ->setPassword($orderData['email']);
        $customer->save();
    }

    $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
    $customer= $this->customerRepository->getById($customer->getEntityId());
    $quote->setCurrency();
    $quote->assignCustomer($customer); //Assign quote to customer

    //add items in quote
    foreach($orderData['items'] as $item){
        $product=$this->_product->load($item['product_id']);
        $product->setPrice($item['price']);
        $quote->addProduct(
            $product,
            intval($item['qty'])
        );
    }

    //Set Address to quote
    $quote->getBillingAddress()->addData($orderData['shipping_address']);
    $quote->getShippingAddress()->addData($orderData['shipping_address']);

    // Collect Rates and Set Shipping & Payment Method

    $shippingAddress=$quote->getShippingAddress();
    $shippingAddress->setCollectShippingRates(true)
    ->collectShippingRates()
        ->setShippingMethod('freeshipping_freeshipping'); //shipping method
    $quote->setPaymentMethod('checkmo'); //payment method
    $quote->setInventoryProcessed(false); //not effetc inventory
    $quote->save(); //Now Save quote and your quote is ready

    // Set Sales Order Payment
    $quote->getPayment()->importData(['method' => 'checkmo']);

    // Collect Totals & Save Quote
    $quote->collectTotals()->save();

    // Create Order From Quote
    $order = $this->quoteManagement->submit($quote);

    $order->setEmailSent(0);
    $increment_id = $order->getRealOrderId();

    if($order->getEntityId()){
        $result['order_id']= $order->getRealOrderId();
    }else{
        $result=['error'=>1,'msg'=>'Your custom message'];
    }

    return $result;

}


texts: Will updating Magento mean starting again with theme customisation?

texts:
For the last week I have been editing a theme ready to launch my first e-commerce website. At first, Magento seemed to confuse the idea of creating a website, but as I'm learning I can see / understand it's benefits. I now feel somewhat comfortable (proud?) that i've got my site roughly where I want it to be.

Enter Magento 2.0...

Will updating Magento cause any issues or alteration with the work I have already done?

and

Is NOT updating a bad idea?


texts:
I am Working as PHP Developer and want to learn about magento 2.3.5 from scratch so can anyone having material related to magento 2.3.5 then please send me for self learning and any demo of modules as well as theme development can please send me.

Thank in Advance.


texts: how to display rows based on qty column values in rows

texts:
I tried but not work in my code.
table is sales_flat_order_item

this is table

    item  | qty
    ------+------
    foo   |     5
    bar   |     3

But I want to output like this

   item   | qty
    ------+-------+------
    foo   |     5
    foo   |     5
    foo   |     5
    foo   |     5
    foo   |     5
    bar   |     3
    bar   |     3
    bar   |     3

It means that it will create number of rows based on qty column values.
How can I do this functionality in magento.

$collection = Mage::getModel('sales/order_item')->getCollection();
        $item = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_item');

        $collection->getSelect()
        ->joinCross(array('item' => $item), array('*'))
        ->where('item.qty_ordered >=1');
        //$collection->setOrder('name','ASC');
        echo "<pre>";print_r($collection->getData()) ;


texts:
I'm trying to get to localhost/magento using WAMP but get the following message:

  You don't have permission to access /magento/ on this server.

Does any know what I'm doing wrong?


texts: Magento 2 : How to load payment methods in shipping step?

texts:
I need to show payment methods in shipping step in Magento 2.3 checkout,
I have added done changes to file checkout_index_index.xml, and also I have added html code to shipping.html file.

But I still get "No Payment Methods", is there anything which I must add to knockout.js model to show payment methods before validating shipping step?

Thanks


texts:
Hi i have my magento running in amazon ec2 linux instance but frequently i get errors stating below mentioned errors

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)

Trace:
#0 /var/www/html/trial/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /var/www/html/trial/lib/Varien/Db/Adapter/Pdo/Mysql.php(320): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /var/www/html/trial/lib/Zend/Db/Adapter/Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /var/www/html/trial/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /var/www/html/trial/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /var/www/html/trial/app/code/core/Mage/Core/Model/Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /var/www/html/trial/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /var/www/html/trial/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup')
#8 /var/www/html/trial/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup')
#9 /var/www/html/trial/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#10 /var/www/html/trial/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#11 /var/www/html/trial/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /var/www/html/trial/index.php(87): Mage::run('', 'store')
#13 {main}

But once if i restart my apache and mysql again my site starts working perfectly and after some time the same error occurs initially my site was running in localhost after migrating to amazon linux instance i changed the secure base url and unsecure base url pointing towards my amazon linux instance public ip.

I have tried reindexing data.

so my question is
1.Where do i need to make changes so that my mysql will connect to my public ip instead of localhost(127.0.0.1).
2.what should i do so that this error won't happen again.

Thanks in advance.


texts: autoload error in magento2 on local host

texts:
I am getting following error during install magento2 on local server.
using php v 5.6


texts: I have to add condition in Magento 1.9 to check if its mobile device

texts: I am working on Magento 1.9 and i want to check condition for mobile using php code how can i do this? can anybody help to figure out this?


texts: How to use Text Component in custom Admin form?

texts:
I am trying to insert simple text to my custom form (not system.xml).

There is a UI component for Form or DynamicRow to show static text:
https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-text.html

How I try to use it:

    ...
    </field>

    <text name="my_text">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">true</item>
                <item name="label" xsi:type="string">My Text</item>
            </item>
        </argument>
        <settings>
            <label translate="false">My Text</label>
            <addBefore translate="false">My Text</addBefore>
            <addAfter translate="false">My Text</addAfter>
        </settings>
    </text>

    <field name="i_am_next_field" formElement="textarea">
    ...

It seems incorrect way to use this ui component.
How to insert text to my form?


texts: Menu in the Magento 2 admin panel not working

texts:
I just installed a fresh copy of Magento 2.2.2 and the menu (the one on the left side) is not working in the admin panel. Nothing happens when you click the icon.

I checked the Chrome console and these errors are showing:

I am running CentOS 7, Centminmod with PHP 7.1.13. Any help will be highly appreciated.

Thanks.


texts: Magento 2: Get System->Config value in JS file

texts:
I have a JS file that is loaded through require-js.config.
I need to get access to a store->configurations value inside my JS file.

Does anyone know of a way to accomplish that?


texts: How to Remove Zipcode, State and Company from Magento 2.3

texts:
As per the title, you can realize that its a very old and repetitive question, but actually I could not find a solid answer !!

I want your help (step by step) how to "remove/disable" the Zipcode & State & Company from my checkout page, please note that I'm using a 3rd party One Step Checkout Extension with Porto Theme + Magento 2.3

Your Help is appreciated.


texts:
I need to setup Gzip compression for a Magento project. I have tried many code in the .htaccess file in my project, but weren't able to enable Gzip.

Please give me the right solution.


texts: How to display all prices and sizes in one web page (without need to selecting size)

texts: any Magento master can help me with creating a page with all prices and sizes in one web page (without need to selecting size), such as what's in this website:http://www.selleckchem.com/products/CAL-101.html ? Greatly appreciated!


texts: display the customer name & location who previously bought the product on product page block

texts:
I want to display the customer's name, location and date who bought the product previously on the product page,

can anybody tell me how to do it,

please provide me the code for the same


texts: Get correct configurable product image on my order page

texts:
i am want to show correct product image on my order details page:

I am using it as:

$_item = $block->getItem();

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$_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();

but showing main product image its not showing child product image. here i am want to show correct configurable product image.

Please help.

Thanks


texts: Error rolling back sql file created in Magento 2.3.0

texts:
When I try to rollback using a sql dump file created in Magento 2.3.0, I get the following error:

Table 'inventory_stock_1' was not locked with LOCK TABLES


texts: How to convert number into currency format in magento2

texts:
I want to convert number into currency format in magento2 like we do in Magento 1.x with this

$_coreHelper = $this->helper('core');
$_coreHelper->currency(number_format(50,2),true,false)

How to do same in Magento2?


texts: Not able to see the currency as per the website in Magento admin product grid

texts:
I have created two website in Magento admin, website 1- Saudi Arabia , Website 2 - Kuwait with same catalog & Configured all the currency specific settings as per the websites , Did change catalog price scope set to website level as but still in Magento admin > Product Grid currency is reflecting for Saudi Arabia only till I trigger any store view like english or arabic for Kuwait website.
Kindly suggest is there any specific solution where we can see the product prices separately for websites rather than reflecting main website prices initially in the product grid.


texts: customer_address_load_after Event Not Firing

texts:
I'm attempting to implement encryption on certain customer data in a fresh install of Magento 1.9.3.6. I'm aware that this will cause numerous issues in the Magento dashboard, and probably elsewhere, but I'm just trying to put together a proof-of-concept.

I've succeeded in encrypting the data using the customer_address_save_before event, I'm looking for a way to reliably decrypt the contents of the address each time it is loaded.

For now I'm working inside of the core Customer module until I get it working, at which point I'll move the code out into a module of it's own.

I've created a new function in the

 app/code/core/Mage/Customer/Model/Observer.php

file, called afterAddressLoad, which I have successfully managed to run by making use of another event. I've included the <events> section of the config.xml file below, note the top two events are unchanged from the stock file:

<events>
    <customer_address_save_before>
        <observers>
            <customer_address_before_save_viv_observer>
                <class>customer/observer</class>
                <method>beforeAddressSave</method>
            </customer_address_before_save_viv_observer>
        </observers>
    </customer_address_save_before>
    <customer_address_save_after>
        <observers>
            <customer_addres_after_save_viv_observer>
                <class>customer/observer</class>
                <method>afterAddressSave</method>
            </customer_addres_after_save_viv_observer>
        </observers>
    </customer_address_save_after>
    <customer_address_load_after>
        <observers>
            <customer_address_after_load_viv_observer>
                <class>customer/observer</class>
                <method>afterAddressLoad</method>
            </customer_address_after_load_viv_observer>
        </observers>
    </customer_address_load_after>
</events>

The customer_address_save_before and customer_address_save_after events function fine, but the customer_address_load_after does not fire at all when loading a customer address.

Changing the event to customer_load_after at least runs the function when the customer data is accessed, but then the contents of the $observer variable is the Customer object, not the Address object which I need to modify.

How can I do this? If the customer_address_load_after event won't work, is there a way I can alter the contents of the loaded address by making use of some other event which fires each time the address is loaded?

Any help would be much appreciated!

EDIT: The relevant function in the Observer.php file is below:

class Mage_Customer_Model_Observer
{
    public function afterAddressLoad($observer)
    {
        Mage::log($observer);
    }
}

This function runs fine when bound to other events, just not the customer_address_load_after event. Caching is disabled on my install.


texts: Magento 1.9 - TypeError: this.toggleElements.toggleSingle is not a function

texts:
I am a developer Magento themes but I'm still learning how to work with the theme rwd.

I am getting a javascript error (below) when I see our store smaller screens resolution.

TypeError: this.toggleElements.toggleSingle is not a function
this.toggleElements.toggleSingle();

I don't understand the function below. I have copied the rdw package files to make the package from our store and have not changed any html tag in any of these files, just added my classes for CSS usage.

enquire.register('(max-width: ' + bp.medium + 'px)', {
    setup: function () {
        this.toggleElements = $j(
            // This selects the menu on the My Account and CMS pages
            '.col-left-first .block:not(.block-layered-nav) .block-title, ' +
                '.col-left-first .block-layered-nav .block-subtitle--filter, ' +
                '.sidebar:not(.col-left-first) .block .block-title'
        );
    },
    match: function () {
        this.toggleElements.toggleSingle();
    },
    unmatch: function () {
        this.toggleElements.toggleSingle({destruct: true});
    }
});

What can be causing this error?


texts: Magento 2 knockout js check variable value to specific value

texts:
I want to check knockout variable value equal to 1

below is my code:

But above code is not working. giving me console error

  Unable to process binding


texts: Magento 2 : Custom extension install and update composer require using public and private key

texts:
I have created the custom extension for my client and the client want to install and update the custom extension like Amasty and Aheadworks.
So can anyone give any reference URL and how can I do the below thing?

how can i create custom composer url like "repo.magento.com",
"https://composer.amasty.com/community/",
"https://dist.aheadworks.com/"?

How can I add the Composer access token like public and private key?


texts: Ways of upgrading magento1.8.1.0 to magento1.9.2

texts: Hi Guys i have already running with magento1.8.1.0 need to upgrade magento 1.9.2 kindly let me know all the way that i can perform this task


texts: My client asking a requirement for replacing email as mobile number with OTP verification. Is there any ways to remove email from required fields. If so it would cause any issue on checkout or order processing.


texts: Is there an event for after a shipping method is saved in admin?

texts:
I have custom configuration fields (added from system.xml file in my module) in Shipping Methods section in the admin panel:

System -> Configuration -> Sales -> Shipping Methods page.

It's not a new shipping method, just few fields to work with the default Table Rates method.

Is there a way to catch when this data is saved/changed? Or where can I dispatch a custom event to catch it? Simply I have to check if my custom fields are changed and to perform some updates with the new values.

Answer:
In my case the event was admin_system_config_changed_section_carriers. I've found it in Mage_Adminhtml_System_ConfigController::saveAction.

Mage::dispatchEvent("admin_system_config_changed_section_{$section}",
    array('website' => $website, 'store' => $store)
);


texts:
I'm using Magento 1.9.3 to make my store, but I came to a custom layout problem right now.
I tryed by my own looking in similar topics over there but couldn't figure it out.

I need to put my custom attributes in different places instead of tabs.

I have the "Informação Adicional" (en_US: Additional Info [attributes]) that I need in the right column.

Thanks!

UPDATE

I tried what @MauroNigrele suggested, but without success. So I tried to copy the php instructions from frontend/base/default/template/catalog/product/view/attributes.phtml into a block I use in the right column, as you may guess, not worked (I'm a newbie).

Now I thought on doing something that may be easier.
Create a new block that I could use in the right column, showing the "Aditional Info" tab, instead of a collateral tab, where it is right now.

So, it should show me the Aditional Info where previously I wanted to show only the tracklist.

I supposed it may have something to do with this kind of code:

{{block type="core/template" name="tracklist" template="frontend/base/default/template/catalog/product/view/attributes.phtml"}}

But I still couldn't figure it out how to do that, I readed other topics with something similar, but I couldn't understand them clearly.

They are as follows:
https://stackoverflow.com/questions/13710077/calling-an-attribute-in-a-cms-block-in-magento?rq=1
https://stackoverflow.com/questions/13883139/how-to-add-product-attribute-on-product-page-via-cms-block-magento

Shortly, I want to put the "Informação Adicional" (Additional Info) in the right column. As I saw, their php file is from:
frontend/base/default/template/catalog/product/view/attributes.phtml

It may be useful to say I use a custom theme: Ultimo.

UPDATE 2

I tried to work with the default and rwd catalog.xml, moving the additional block into the right column, but it doesn't show in the website.

UPDATE 3

I did what @ Ahmed El Awadi saidin local.xml, and now it shows in the right column:
There was no 404 CMS page configured or found.
The code used is:

<action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>

UPDATED with new description image


texts: Can we apply no write permission on media folder in magento

texts: Hello Guys  i am using magento 1.8.1.0 version for the security point of view i want to put no write permission on media folder of magento.but it shows warning at the top of site. how to resolve this.is this folder permission feasible?.tell me what is best folder permission for media in magento.


texts: I have to make some promo when you buy 3 items discount 1, and only pay 2, but when i try to buy the discount does not apply, this is my screenshot from the promo.


texts: Credit Memo Subtotal Mismatch magento 2.2.8

texts:
I'm Trying To change Subtotal For The item In Credit Memo Email

Product Price:- 4.99

I am creating a credit memo for 10 product but Subtotal is a mismatch

The grand total is correct.

how can I change subtotal?


texts: Same product showing multiple times in shopping cart

texts:
I am having a strange issue that if i add a product to cart and then logout of my account, then after logging out i am adding same product to cart. Now when i login i should see same product with quantity 2 but the product is showing multiple times.
How to fix this?


texts: Product images not showing for some product - Magento 2.3

texts:
I am new to Magento, Facing some issue with product images :
Total product count  : around 550
1) On Product Detail page images are not showing for some product, showing error 500 in console. (/pub/media/catalog/product/cache - Cache url : Failed to load resource: the server responded with a status of 500 ())

2) Does php bin/magento catalog:images:resize , Help's to generate the missing images in cache folder ?  (Is it a good idea to run this ?)

3) What I have to do to generate new images in cache folder (/pub/media/catalog/product/cache)

Note : Also, the product images are showing correctly in backend & image files are present inside /pub/media/catalog/product/H/i.
If anyone

Thanks :)


texts:
How to create custom module from scratch in Magento 1.9

which is he directory structure and which are the files i need to create for creating the simple basic custom module.


texts: Magento2; Advanced Searching (SmartSearch)

texts:
I'm trying to create a "SmartSearch" extension for Magento 2.0, but I really can't find out what the next step should be. What I have so far:

Working 2.0 Extension (registration.php, module is enabled and recognized)
I override the default autocomplete function by using this code:

With this code I can manipulate the default autocomplete text. This is my SearchDataProvider:

class SearchDataProvider extends \Magento\CatalogSearch\Model\Autocomplete\DataProvider {
    /**
     * {@inheritdoc}
     */
    public function getItems()
    {
        $collection = $this->getSuggestCollection();

        $query = $this->queryFactory->get()->getQueryText();
        $result = [];
        foreach ($collection as $item) {

            $resultItem = $this->itemFactory->create([
                'title' => $item->getQueryText(),
                'data'  => $item->getData(),
                'num_results' => $item->getNumResults(),
            ]);
            if ($resultItem->getTitle() == $query) {
                array_unshift($result, $resultItem);
            } else {
                $result[] = $resultItem;
            }
        }
        return $result;
    }

    /**
     * Retrieve suggest collection for query
     *
     * @return Collection
     */
    private function getSuggestCollection()
    {
        return $this->queryFactory->get()->getSuggestCollection();
    }
}

If i add something after 'title', it's shown in the autocomplete dropdown.

What I want to do now is to load another provider that will return a collection of products that contain the search query text.

I already found a FullText search model, but I cannot figure out how to properly use this.

Does anyone have experience with creating a search collection in Magento 2.0?


texts: Magento2-How to check Order Was actual order or Reordered by admin?

texts: I want to check whether the order is Original order (Ordered from frontend by customer) or reordered by admin(in case admin credit memo the original order and reorder the same order). There is no relation_parent_id


texts: Magento2 : how to get resize image for custom module

texts:
I have created custom module for get category's products which are assigned to particular category like "Featured Product". Feature product is a category and it has a many products. i got that array by developing custom module but i don't know how to get resized image for that product.

please help me
Thank you.


texts: How to implement Authorize.net tracking code?

texts: I need to implement Authorize.net tracking code. In case of Paypal I extended Mage_Paypal_Model_Config with my own class and rewrote getBuildNotationCode() method. Is there any similar method in Authorisenet module?


texts: Magento 2.2 REST API Add Item to cart issue

texts:
i have an issue with Magento ver. 2.2.0-dev i'm trying to create a cart and insert a product for a logged user, with the magento 2 rest api, but when i try to insert a product into the cart (already correctly created) it seems doesn't work and respond with this error:

  "message": "No such entity with %fieldName = %fieldValue",
  "parameters": {
    "fieldName": "cartId",
    "fieldValue": null
  },

Steps to reproduce:

Create a cart with get rest/V1/carts/mine
Call the rest api for
   insert product in the cart with the correct token of the user at       rest/V1/carts/mine/items
Headers: Authorization Bearer + [TOKEN]
Body: cartItem: testing (sku of the product); qty: 1

Expected Result

a 200 status and the json of the cart

Actual Result

{
  "message": "No such entity with %fieldName = %fieldValue",
  "parameters": {
    "fieldName": "cartId",
    "fieldValue": null
  },

How can i solve?? it's a bug or i forgot something? i've seen a lot of thread but no one can help me.

Thanks in advance!


texts: Magento 2 add ViewModel to product widget

texts:
I use ViewModel for custom data in category product listing and everything working ok
but i need add ViewModel to widget with new products.

Is it possible to add ViewModel to widget?

Check my screenshot below


texts: what happen if i delete system.log file in magento 2?can create new empty system.log file?

texts:
what happen if i delete the system.log file in Magento 2?
can create a new empty system.log file?

could anyone know?


texts: How to Change 'SKU' Label in product detail page using CSV Magento2

texts: I don't have experience with change name using CSV. Actually, I want to change Name From 'SKU' to 'Product ID' using CSV in magento2.


texts: Magento 2 : Get Customer Collection with it's Attribute

texts:
I've managed to get customer collection using class \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory

but it returns me default details not with Created Customer Attributes.

  Any idea how to get Customer Collection with it's Attributes ?