texts: Link redirection issue while adding a custom tab on customer Dashboard in Magento 2

texts:
I am trying to add the custom link on customer dashboard in magento 2.

I have added

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="demo-link">
                <arguments>
                    <argument name="path" xsi:type="string">module/controller/action</argument>
                    <argument name="label" xsi:type="string">Demo Link</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

on my module.Actually i have followed http://webkul.com/blog/magento2-add-link-in-my-account-navigation-panel/ . I changed the path to my module controller.Till here it is working good.

But there are two things that i couldn't achieve:

one is When i click on that tab it is redirecting to me to the entirely new page.The page that was defined on my layout's xml file. so I added the code of updating the handle of customer account. see my xml file.

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="customer_account"/>
    <body>
        <referenceContainer name="content">
            <block class="Custom\Addprofile\Block\Index\Index" name="index.index" template="Custom_Addprofile::index/index.phtml"/>
        </referenceContainer>
    </body>
</page>

This is still not working as expected. The template should load aside of the left navigation links on the account dashboard.

Am I missing some thing here?

Also Another thing i was trying achieve is i want to display that custom tab to particular customer group only. Is there any easy way of achieving that?


texts: How to get a product value attribute from attribute id?

texts:
I need to retrieve product attribute value based on the attribute id, here's how I get the id and label for each attribute

$attributes= Mage::getResourceModel('catalog/product_attribute_collection')->getItems();
foreach ($attributes as $attribute) {
   $id[] = $attribute->getAttributecode();
   $label[] = $attribute->getFrontendLabel();
}


texts:
Complete noob here, I've installed magento locally to learn more about it, and try to build an ecommerce site. I've succesfully installed it with xampp and composer, however I get no images displayed, and when attempting to click on menu items it does nothing. Everywhere says run this command:

  bin/magento setup:static-content:deploy

So I put this at the end of the url of localhost/magento2. So it's localhost/magento2bin/magento setup:static-content:deploy and hit go. I get a 403 code Access forbidden

Is there somewhere I should be running this command specifically? How do I do that? Or how do I fix the 403 error? I've done some searching, but can't seem to find the answer to my problem


texts: Generate a list in Magento Admin of customers that have a wishlist?

texts:
I need a way to get a list of customers that have a wishlist.

Thanks in advanced.


texts: Wrapping search and cart in element Magento 2

texts:
I understand that in mage2 the header is generated through xml and knockout js, so all the blocks can be controlled with xml and the node - move

My question is i have the mini cart and search block in the header, they're called in by the fall back theme, the problem is I want to wrap the two separate divs in one container.

So instead of:

    // content

    // content

I want to generate the following:

        // content

        // content

How do i go about doing this?


texts: Magento 2 : How to move register-link next to minicart?

texts: I want to move the Create An Account button, near the mini cart in the header section.


texts: always show My Account & Wish List user logged in or not

texts:
Am new in magento 2 and also no experience in magento 1. I'm try to show My Account & Wish List links in top nav link in my custom theme (parent: Magento/luma ) like blank theme. I try with Magento/blank parent but still not show my account & wish list link. i try to add this script

  app/design/frontend/Package/themename/Magento_Customer/layout/default.xml

    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
      <body>
        <referenceBlock name="top.links">
           <referenceBlock name="register-link" />
           <referenceBlock name="authorization-link"  />
           <referenceBlock name="wish-list-link"  />
           <referenceBlock name="my-account-link" />
        </referenceBlock>
      </body>
    </page>


texts: Magento - Add field to Admin Address Forms

texts:
How would I go about adding a new field to all Backend Magento Customer Address forms?

I've looked into Magento's EAV system but none of the tutorials about adding custom address fields seem to work or make any sense.

I've gotten to the point where i have the mysql4-install-0.1.0.php file in my module, but I'm not sure what needs to be in there to add the new EAV field to the customer addresses.

Any help would be massively appreciated, I'm pretty new to Magento but I've worked with PHP for years.

Thanks all!


texts: Magento Public Honeypot blacklist for LFD (or other firewall)

texts:
Several projects exist where malicious IP's are recorded or stored (DOS attacks, spam attack, brute force) ... and I was wondering if the Magento community also has 1 shared list of IPs specifically targetting attacks at Magento 1 and/or 2
question: Does a public Magento hacker blocklist exist?
Something like below, but then for Magento only

appreciate the input


texts: How to get shipping address information in additional checkout step in magento 2?

texts: Hello I have add an extra step before the Reviews and payment step and I want to display shipping address in my newly added step in magento2?


texts: What is the effect of Mage::getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID)

texts:
I've found the following line of code used in some of our one-off scripts, and have also found it used in various unofficial (i.e. not entirely trustworthy) websites:

Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID);

In our usage it's called during the bootstrapping of various .php scripts; things like one-time data-load scripts.

In debugging I see that it change's the current store's Id to zero; however I don't understand the reason or need to do so.

What purpose would this serve, and when (if at all) would it be correct to be used?


texts:
I have removed all files of a Module and now i have this exception:

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Tiny_Compressimages_Block_Adminhtml_ApiNotification' in {{server_folder}}/app/Mage.php:595

What have i missed?


texts: Converting from 1.7 to 1.9 and cannot get RWD theme to work

texts:
I am converting an existing multi store Magento 1.7 to 1.9 and cannot get the rwd theme to work. I want to appy a custom theme but thought that I should get RWD working first.

After conversion the Magento 1.7 default theme shows up.

I used a copy of my production DB and an app/etc/local.xml  corrected for the test DB and loaded the site to get the database upgraded.
In Admin I changed the package to rwd and cleared out the theme, info for other scopes.

What is preventing the rwd to show?

I can make a new 1.9 install and it works as advertized including the RWD theme.


texts: Magento2 - huge bulk products to upload in Magento

texts:
We are using Retail Pro 9 as POS for our chains stores, we have around 7000 products we can export it from retail pro, what is the easiest  way to import all products in Magento 2.
Hope to have answers.
Thank you.


texts:
I run a shop (Magento CE 1.6.2) with 4 different store-views, which have (for historical reasons) ID's 1, 3, 4 and 7. Order numbers have been looking like this 10000001, 30000001, 40000001, 70000001.

I have set-up a brand new install with Magento CE 1.9.1, but now the store-ID's are 1, 2, 3, 4...

How do I change this in the old situation?

I came across this post --> http://www.thevortexcode.com/how-to-change-order-prefix-and-default-value-of-ordershipmentinvoice-numbercredit-memo-in-magento/ explaining how to set/cahnge the eav_entity_store.increment_prefix

But this does not seem to work in 1.9...


texts: Magento 2.2: How can I override "checkout.item.price.unit" and "checkout.item.price.row" in the cart?

texts:
My goal is to switch out the .phtml files: magento_module-wee::item/price/unit.phtml as well as magento_module-wee::item/price/row.phtml with my own custom ones and change how the prices are displayed in the cart.

My approach so far was to use:
app\code\Vendor\Module\view\frontend\layout\checkout_item_price_renderers.xml

<?xml version="1.0" encoding="UTF-8"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="checkout.item.price.unit">
        <arguments>
            <argument name="template" xsi:type="string">Vendor_Module::item/price/unit.phtml</argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="checkout.item.price.row">
        <arguments>
            <argument name="template" xsi:type="string">Vendor_Module::item/price/row.phtml</argument>
        </arguments>
    </referenceBlock>
</page>

Edit2: NOTE! The code above should work but does NOT (as I just found out). <action method="setTemplate"> (which is deprecated) has to be used (until the above code works as advertised) aparently.

And have the custom row.phtml as well as unit.phtml located at:
app\code\Vendor\Module\view\frontend\templates\item\price\

I also tried to change <arguments> to <action method="setTemplate">, but whatever I tried so far - the "vanilla" module (module-weee) and its phtml file versions are used.

Any ideas how to get my phtml files rendered instead?

Edit1: Reading Hit's answer, I realized that I should probably post my entire module, not only the part, where I believe the fault lies. Sorry for my posting inexperience!

app\code\Vendor\Module\etc\module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Checkout"/>
            <module name="Magento_Weee"/>
        </sequence>
    </module>
</config>

app\code\Vendor\Module\registration.php:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Vendor_Module',
    __DIR__
);

app\code\Vendor\Module\composer.json:

{
    "name": "vendor/module",
    "description": "Description",
    "type": "magento2-module",
    "version": "1.0.0",
    "require": {
        "php": ">=7.0.13|>=7.1.1",
        "magento/framework": "101.0.*"
    },
    "repository": {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    "minimum-stability": "stable",
    "autoload": {
        "files": [
          "registration.php"
        ],
        "psr-4": {
            "Vendor\\Module\\": ""
        }
    }
}


texts: How to show order delivery date and gift message in success page in magento2.1.7

texts: I want to show order delivery date and gift message in success page in magento2.1.7 as per my clients requirements.


texts:
I created a custom grid under custom tab  in product view page.

The grid was showing the total product collection from my table.

I want display the grid only current product data.

I apply filter for grid collection in magento2.

If anyone knows please explain me..


texts: I write echo $block->getBaseUrl() in my .phtml template, and show output http://localhost/magento2/index.php/. I want to remove index.php from that output. How can i do that?


texts: Credit Card Reference Number / Purchase Order Number - Authorize.net

texts:
I need to have a reference number (rn) or purchase order (po) as an optional field during the credit card part of the checkout.  I am using Authorize.net for credit cards and there isn't an out-of-the-box solution to include an rn or po with the information.

For those that aren't familiar with rn or po, it's an internal number that the customer provides for purchasing reasons (most commonly if the customer is a business).  They'll see the rn or po on all the invoices, transactions, packing slips and receipts.

There is little to no information on integrating purchase order numbers or reference numbers with Authorize.net and It's something we need on our checkout to ensure customers are able to track their purchases internally.


texts: How do I make the newsletter popup don't close until email is supplied?

texts:
Is there a way in magento to make a pop-up newsletter which will not close until there is an email supplied? How can I do this?

Example. http://www.peopleperhour.com/hourlies the grey area is not clickable and I don't want to put close button.

<script>
    function setCookie(cname,cvalue,exdays) {
        var d = new Date();
        d.setTime(d.getTime()+(exdays*24*60*60*1000));
        var expires = "expires="+d.toGMTString();
        document.cookie = cname+"="+cvalue+"; "+expires;
    }

    function getCookie(cname) {
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for (var i=0; i<ca.length; i++) {
            var c = ca[i].trim();
            if (c.indexOf(name)==0) return c.substring(name.length,c.length);
        }
        return "";
    }

     jQuery(document).ready(function() {
        if (getCookie("shownewsletter") != 1){
            jQuery('#newsletter_pop_up').bPopup({
                modalClose: false,
                position: ['auto', <?php if(Mage::getStoreConfig('newsletterpopup/general/top') != '') echo Mage::getStoreConfig('newsletterpopup/general/top'); else echo '120'; ?>],
                easing: 'easeOutBack', //uses jQuery easing plugin
                speed: <?php if(Mage::getStoreConfig('newsletterpopup/general/speed') != '') echo Mage::getStoreConfig('newsletterpopup/general/speed'); else echo '450' ?>,
                transition: 'slideDown',
                onClose: function() { setCookie("shownewsletter",'1',<?php if(Mage::getStoreConfig('newsletterpopup/general/cookietimeout')!='') echo Mage::getStoreConfig('newsletterpopup/general/cookietimeout');else echo '1' ?>);
                }
            });
        }

        jQuery( "#newsletter_pop_up form" ).submit(function( event ) {
            var email = jQuery('#newsletter_subscribe').val();
            var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
            if (testEmail.test(email)) {
                setCookie("shownewsletter",'1',1);
                return true;
            } else{
                jQuery('#newsletter_subscribe').addClass('validation-failed');
                jQuery('#advice-required-entry-newsletter').show();
                return false;
            }
        });
     });
</script>


texts:
I recently activated single store mode, since it removes the need to select the scope everytime I want to edit a product.

Unfortunately it came with some problems, "Content" -> "Configuration" -> "HTML Head" is now empty. I checked the database and there are now 2 HTML head configurations:

config_id 31 is the HTML Head before activating "single store mode", it is still the active one, I have to edit it in the database if I want to change it.


texts:
I don't know much about ERPs or Magento and wanted to find out if Magento Community version talk directly to an ERP, specifically Infor M3

Using V1.9 of Magento.


texts:
I've accidentally deleted my local.xml file. So, site stopped working. I tried to use the local.template.xml file and added the db settings, but then the front-end started giving this error.

Fatal error: Class 'Mage_GoogleCheckout_Model_Resource_Setup' not found in /home4/dezyner/public_html/demo/menstyle3/app/code/core/Mage/Core/Model/Resource/Setup.php on line 234

Then I deleted the var folder, and deleted the local.xml file again, so that i could fresh install using magento install wizard. When i refresh front-end, the url changes from http://demo.webdezyner.com/menstyle3/index.php/ to http://demo.webdezyner.com/menstyle3/index.php/install but the page keeps on loading, and give this error:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.

Can anyone help me here.


texts: front controller reached 100 router match iterations - but only for /admin (adminthml)

texts:
I have searched for the source of this error and there are several posts but they seem to cover things generally.

In my case, there are some different factors and I'm asking in hopes of not trying to "patch" core.  BTW I have version 1.4.

The front end of the site works fine!  It's only when I try and go to:

http://shop-staging.mysite.com/admin

That I get this error "front controller reached 100 router match iterations"

Note that we have other deployments of the exact same code base (for example the production shop.mysite.com/admin) and it lives quite comfortably in the other environments for both frontend and adminhtml portions of the site.

Is this a database issue?


texts: Magento 2 attribute backend_type static vs varchar

texts:
Is Magento attribute value saved in database table static and varchar identical?

when and why to use static backend_type instead of varchar?


texts: how could i get all user role list in edit page in my custom module in magento 2

texts:
I want to show user role list in my custom module edit page my code is as below

$fieldset->addField(
       'admin_role_ids',
       'multiselect',
       [
         'name'     => 'permission[admin_role_ids]',
         'label'    => __('Allowed for Roles'),
         'title'    => __('Allowed for Roles'),
         'values'   => $this->_adminSession->getUser()->getRole(),
       ]
    );


texts: apply custom discount in cart magento2 via observer

texts:
I have created a custom promotion in magento2. To get that working I needed to do some customization in cart which I am trying to do with salesrule_validator_process event.
I needed the rulename and discount values to be modified before applying in cart.
Now In Magento1 we used to update values as below:

$result = $observer['result'];
$result->setDiscountAmount($DiscountAmount);
$result->setBaseDiscountAmount($BaseDiscountAmount);

How we can achieve the same in Magento2?
Any thoughts/suggestions are welcome.


texts: Can we implement Alexa Skill to use with our Amazon pay Account in magento 1

texts:
In Magento 1 websites, we want to implement Alexa Skills to use our amazon payment account.

Can anybody please share knowledge/steps/guide, how we can implement alexa skill to use our amazon pay account to enable purchases on our website through alexa's voice recognition?

Is it possible for us to implement alexa voice recognition system with Magento community Edition version 1.9.1.0 & so on...

It will be great, if someone who know about that and share his/her knowledge to achieve that.

Thanks in advance.


texts: Odd behavior with Magento 2 color swatches

texts:
When I use the quick search on my Magento 2 store for a Configurable SKU and hit ENTER, the search_results page displays only the product image with its description without any JS or CSS. But when I do the same step through searching a Simple product, the search_result page displays normally with the product query.
I investigated the matter, and found out that if I delete the COLOR attribute Swatches i.e. Green, Blue... from the color attribute page, then the Configurable product displays normally once I search for it through its SKU.
My Catalog Search engine is MySQL and my Magento version is 2.3.4
Has anybody had a similar issue?
Would the possible solution be oriented toward the Catalog_Search phtml or XML as it looks like a corrupted code?


texts: Magento site suddenly mail not coming to user and admin

texts: Hello My magento site have suddenly mailing process not working. Please help me I have SMTP. It's working fine but now mails are not working. Please shortout my problem.


texts:
I have upgrading from Magento CE 1.9.0.1 to 1.9.1

And I have an error into transactional email as example:

{Error in template processing}
You have been successfully subscribed to the newsletter.

{Error in template processing}

I seems to be related to the header and footer.

I have tested to configure transactional email : System -> Configuration -> Design -> Transactional Emails -> Email Footer Template

But It is not working.


texts: Magento2 Multistore Separate Logging Question

texts: Is there a way to enable separate logs for each store within my Magento 2.3 set up? I am having difficulties when searching through the logs for issues pertaining to specific stores.


texts: How to add custom text to price or How to display EMI prices in order review?

texts:
As my site uses EMI options for payment the prices in Order review section should be shown in

  Rs.xxx per month

format.

I've made changes to phtml files only [to do this], because it should only be shown like that but price calculations should happen as it is.

Now my problem is, I've used FlyWebdesign_PaypalFee extension to add payment method charges, I need to display the payment method charge in the above mentioned format.

  the prices in the image may not be correct, it's just the format I
  want. I want Payment charge to be shown as 120 per month

I don't know how to do this, can anyone help please?

I know the payment charge is passed like

$address->addTotal(array(
            'code' => $this->getCode(),
            'title' => Mage::helper('sales')->__('Payment Charge'),
            'full_info' => array(),
            'value' => $amount,
            'emi'   => 'per month' // custom line to show per month.
        ));

and i can add an extra element in the array, to fetch it in payment review. But how to appended it to Rs120.00


texts: How to get collection of ids in desc order?

texts:
I'm trying to get a collection/list of subcategories in desc order.

$subrategories = $brategory->getChildrenCategories()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('show_brand', array('eq' => 1))
    ->addAttributeToSort('position','desc');

but it still creating collection in the same order, what am I doing wrong ?


texts: Reorder via Code & Setting New Payment Method

texts:
I'm attempting to reorder via code using the follow code from: https://stackoverflow.com/a/7122181/2758139

$orderId= $YOUR_ORDER_NUMBER;
$personsOrder = Mage::getModel('sales/order')->load($orderId);
$order_model = Mage::getSingleton('adminhtml/sales_order_create');
$personsOrder->setReordered(true);
$order_model->initFromOrder($personsOrder);
$order_model->createOrder();

This code works great. However, I am trying to set a different payment method while trying to do this. The following is what I have:

$orderId= $YOUR_ORDER_NUMBER;
$personsOrder = Mage::getModel('sales/order')->load($orderId);
$order_model = Mage::getSingleton('adminhtml/sales_order_create');
$personsOrder->setReordered(true);
$order_model->initFromOrder($personsOrder);
/* Trying this */
$order_model->getQuote()->setPayment(array('method' => 'free'));
/* ---- */
$order_model->createOrder();

The new code trying to set the different payment method doesn't seem to be working. I've debugged and followed the code to where it validates the payment method in the core of Adminhtml/Model/Order/Create.php and where it get the method $method = $this->getQuote()->getPayment()->getMethodInstance(); but it is still the original payment method.

How do I set a new payment method when reordering via code?


texts:
I'm running CE 1.9 on a VPS. Have a problem with the category, which contains more than 350'000 SKUs. When I try to open this category in the backend, nothing happens, so I cannot edit any category data. When I try to access this cat in the frontend, products are shown but FILTER is not shown.
In the same time, an error is generated as follows:

  a:5:{i:0;s:2777165:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query was: SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_entity` AS `e` WHERE (`e`.`entity_id` IN(1, 2, 3, 4, HERE GOES 360 000 SKU'S))";i:1;s:6077:"#0 lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

Do I understand correctly that my VPS is just out of memory?
The trouble is that the store will contain 2-3 millions of SKUs and will have categories which will contain ~500 000 SKUs.

Any suggestions on how to fix it? ... or how to calculate needed VPS RAM? ...or maybe something wrong with MySQL my.cnf file?


texts: Set Custom CMS page as a home page programatically in Magento 2

texts: How to set a custom CMS page as my Magento home page programmatically.


texts: jQuery get grand total from summary Magento 2

texts:
I'm trying to retrieve the grand total from the summary on the checkout/cart page through jQuery. However, the summary is being loaded with AJAX in some other file which causes my jQuery to not recognize this:

$('.grand.totals.incl > .amount').find('.price')

I've tried to do it this way:

$( document ).ajaxComplete(function() {
                console.log($('.grand.totals.incl > .amount').find('.price'));
            });

But this doesn't show anything. How do I retrieve the grand total after the AJAX is done loading?


texts:
I was trying to create a section in backend product edit page of Magento.
Under Images section, I was willing to add images for variations directly from there. I have tried searching for something useful but couldn't find something. I wasn't able to find anything useful yet.

Is there any way we could alter images part?

Also, I wasn't able to create some code for that so don't ask for any code I have tried.


texts: Magento 2 : What's the best practice when it comes to escaping in templates?

texts:
This is a question about best practices when it comes to writing templates / block classes and security.

When it comes to writing templates I know you need to escape everything that comes into the template. Just for security's sake. But most of the time the data you're fetching comes from dedicated block classes that are (most of the times) already tightly coupled with the phtml files.

For example: why would you do this:

// block class code:

public function getTitle():string
{
    return $this->getSomeEntity()->getTitle();
}

// template code

<?= $block->escapeHtml($block->getTitle()) ?>

... if you can also do this?:

// block class code:

public function getTitle():string
{
    return $this->escapeHtml($this->getSomeEntity()->getTitle());
}

// template code

<?= $block->getTitle() ?>

Or when it comes to text/x-magento-init-statements, you would even have something like this:

"title": "<?= $block->escapeJs($block->escapeHtml($block->getTitle())) ?>"

The above pattern you can see all through Magento, but I am wondering: why? I like to keep my templates as dumb as possible, and I don't want my template to be 100% responsible about the security of my theme. At any given point! It's also not DRY, which means that if getTitle() is called anywhere else, the escaping needs to be done again. And every time the author needs to get the order right so that the escaping happens in the right sequence.

The methods in blocks are written and meant to be used in templates. So in my opinion it would make much more sense to have a block have methods like:

public function getTitle():string
{
    return $this->escapeHtml($this->getSomeEntity()->getTitle());
}

public function getJsTitle():string
{
    return $this->escapeJs($this->getTitle());
}

Now the template that uses this block class is much more readable and whenever you use getTitle() in your template you can be sure that it's escaped on the proper way.

Now I am wondering what are the community thoughts on this matter? I know that if you want to learn Magento you should look at how Magento does it themselves, but this just seems a little bit off to me.


texts:
I created a form in the adminhtml, all other fields are working well (ie., text, select, etc). However, I tried adding a button in the list of fields but it seems it's not picking up the value:

$fieldset->addField('test_button', 'button', array(
            'name'      => 'test_button',
            'value'     => 'Test Me',
            'label'     => 'Click the button to test',
));

Output is just:

<input id="test_button" name="test_button" value="" type="button">

Note that the value is empty, thus button is just a blank button.


texts: I have created a custom module that shows data in a grid. How do I move the 'add new rate' button from the module header to the grid? I have not tried anything yet as I have no idea where to start.


texts: how to set the overridden block file to template file in magento 2

texts:
i have overridden the Magento\Customer\Block\Form\Register block .now my new block file Webkul\Hello\Block\Form\Register

customer_account_create.xml

 <referenceContainer name="content">
            <block class="Magento\Customer\Block\Form\Register" name="customer_form_register" template="Magento_Customer::/form/register.phtml">
                <container name="form.additional.info" as="form_additional_info"/>
                <container name="customer.form.register.fields.before" as="form_fields_before" label="Form Fields Before" htmlTag="div" htmlClass="customer-form-before"/>
            </block>
            <block class="Magento\Cookie\Block\RequireCookie" name="require-cookie" template="Magento_Cookie::require_cookie.phtml">
                <arguments>
                    <argument name="triggers" xsi:type="array">
                        <item name="registerSubmitButton" xsi:type="string">.action.submit</item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>

above code is core xml file.

what xml code i have to write to update block file of template and where i have to insert that code

i have tried this code snippet

<referenceBlock name="customer_form_register">
   <block class="Webkul\Hello\Block\Form\Register" template="Magento_Customer::/form/register.phtml" />
 </referenceBlock>

but not working


texts: How to change the text content of static block region wise

texts:
I want to change the content of static block region wise. for e.g;-
Suppose I have text ‘Go to Home‘ for US version and if I select UK then it should be change to another text e.g. "Shop at home"  This should be customisable by region shop (e.g. different geographic storefronts have different messages.)
How can I do it please give me suggestions.
Thank u in advance!


texts: Second website on another domain's folder

texts:
Is this possible:

Main Website A:
www.domain.com

Website B:
www.second-domain.com/sitefolder

We need a second website to work on different domain's sub folder. Both sites are on the same server. I know it's possible to use another domain for second website, but is the folder doable?


texts: Magento sub-category page is not loading

texts:
I am not PHP/Magento developer, I have tried to solve this issue by following a lot of posts, but no luck.

We are managing Magento 1.9.3.4 on ubuntu-16/Ngnix.

One of category(Dropdown menu) is working fine but its remaining pages are not loading and show the blank page, but it is working fine when I refresh the same page. there is no web server or magento error.

Following URL is working fine

  https://www.testsite.com.pk/winter-collection.html

But following is not working

  https://www.testsite.com.pk/winter-collection.html?p=3 or ?p=2

We have also cleared cache from GUI and CLI. It is happening only with one category, all others are working fine.


texts: Mage_Adminhtml_Block_Widget_Grid prepareCollection depends on action called before gridAction

texts:
i've got a problem in my customgrid while preparing the collection data. The grid is used by 2 actions with different collections, xyAction uses an innerjoin while abAction uses a leftJoin in prepareCellection:

class Abc_Mymodul_Block_Adminhtml_Sales_Invoice_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
    ..
    protected function _prepareCollection()
    {
    ....
        if (Mage::app()->getRequest()->getActionName() == 'xy')
        {
            $collection->getSelectSql()->join(array('a' => Mage::getConfig()->getTablePrefix().'mydata'), 'main_table.increment_id = a.mydata_id');
        }
        else if (Mage::app()->getRequest()->getActionName() == 'ab')
        {
            $collection->getSelectSql()->joinLeft(array('a' => Mage::getConfig()->getTablePrefix().'mydata'), 'main_table.increment_id = a.mydata_id');
        }
    ....
    }
}

This works fine with the above actions but not with the gridAction, which is called by sorting or filtering in the grid.

Does anyone have a hint, how to handle this in gridAction?

Thanks!


texts: Magento 2 Custom price option for multiply with base price

texts:
I have one special requirement.
How to multiply my base price with custom option price?

For example:

Base price is 17 and custom option price is 3
So if user select custom option at that time calculate (17 X 3) and product price become 51

So please provide appropriate help to do this

I am a new in magento


texts:
I have several models in my custom extension that only serve the purpose filling in some selects and/or multiselects in the add/edit form of my entities.
So they are what magento calls "source models".
The values involved are always the same and the methods return the same thing.
How should I unit test those? Or even better, should I write unit tests for them?
Here is an example.
The following class is used for add/edit form for a field called type and for the grid column of the same field.

<?php
namespace Sample\News\Model\Author\Source;

use Magento\Framework\Option\ArrayInterface;

class Type implements ArrayInterface
{
    const COLLABORATOR = 1;
    const EMPLOYEE = 2;

    /**
     * Get options
     *
     * @return array
     */
    public function toOptionArray()
    {
        $_options = [
            [
                'value' => '',
                'label' => ''
            ],
            [
                'value' => self::COLLABORATOR,
                'label' => __('Collaborator')
            ],
            [
                'value' => self::EMPLOYEE,
                'label' => __('Employee')
            ],
        ];
        return $_options;
    }

    /**
     * get options as key value pair
     *
     * @return array
     */
    public function getOptions()
    {
        $_tmpOptions = $this->toOptionArray();
        $_options = [];
        foreach ($_tmpOptions as $option) {
            $_options[$option['value']] = $option['label'];
        }
        return $_options;
    }
}


texts:
I am new to Magento and Cloud Hosting.

I have used Godaddy a bit but the reviews I read about Magento hosting on Godaddy were not very encouraging. So I am planning on setting up Magento on AWS. For me Godaddy is one stop shop where I can get the Domain, Hosting and everything. But in case of AWS I have yet to learn.

My question is if I get an EC2 instance with Magento do I need to purchase the IP and Domain separately?

Also if someone can give a one-liner on what is paravirtualization?


texts: How to disable the authorization form on the checkout page using xml

texts:
How to disable the authorization form which is located on the checkout and appears if the user is not authorized.

Need to disable completely or in the second step


texts: magento 2 translate shipping method title

texts:
I am trying to convertshipping method title but it's not working.

I am using porto theme for magento 2. In theme there is Folder i18n. for free shipping method i have placed title FRee Shippings  now i want to translate this text to custom text Free Shippings for you  from en_US.csv file but it's not working.  Also,  for german store i have added german Title. but when i switch to german store it doesn't translate the shipping Title to german.  it shows in english.

How can i translate shipping title?


texts: SQL statement for Customer email and address

texts:
I need a SQL statement for the following

Email | user name | surname | addresses | password hash | subscription flag

Raw SQL to export


texts: How can I show customer OS and browser (User agent) on order slip?

texts:
For troubleshooting reasons, I would like to be able to see  what browser and OS the customer used to place their order, ideally right on their order in Magento backend. How would that best be done?

Magento version 1.8.10. Thanks.


texts:
Ok this is going to sound confusing but its not, I have 4 categories Single, Double, Double 4'6", Kingsize, SuperKing and I have one configurable product with the different sizes as associated products.

so my questions is how do I set default option when a user goes through bed --> 3" bed --> 3" price is auto selected in the drop down menu ?


texts:
I need to add some modification on the following file so that i'm trying to overwrite the file in local

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

to app/design/frontend/Vendor/theme/Magento_Sales/adminhtml/templates/order/view/info.phtml

also try app/design/frontend/Vendor/theme/Magento_Sales/adminhtml/templates/order/view/info.phtml
app/design/frontend/Vendor/theme/Magento_Sales/templates/adminhtml/order/view/info.phtml

But it seems not working...!


texts: How to create sortable array (draggable) in configuration

texts:
I would like to create an array in a custom module configuration where I can manually order the lines thanks to drag & drop.

I can see there is a similar behavior in the related products when editing a product.

The array lines would contain 4 columns:
draggable handle, title, checkbox or dropdown and text input.

How should I proceed?
Thanks in advance for the help.


texts: Magento 2: Different stores with different customers, products and admin accounts

texts:
I have a website that has multiple sub-domains. The sub-domains are all connected to the same files but have been styled differently depending on the sub-domain. I would like each sub-domain to have their own store with their own products and customer. Each store would have to have a global admin account that would allow the admin to access all stores but then each sub-domain store would need to have their own admin account where this admin only has access to that one store and can only manage and upload products to that store. All the stores would have that same layout but styled differently (i.e. color and logos would be different)

I would like to know if this is possible and if so what store structure would I use and how can I achieve this?

I am using Magento community version 2.1.3


texts:
$('.handleObject').on("change", function() {
        var id = $(this).val();
        var cid = $('#cid').val();
        $.ajax({
            type: 'POST',
            url: '/example/shirt/listing',
            data: {
                id: id,
                cid: cid
            },
            success: function(){
                  resetOptionValues('collarAround', collarAround); /**Getting error for this**/
            }
        });

});


texts: Magento reload page with one of 2 payment methods

texts:
I have a question and I want to know how to implement this.

My customer has 2 different payment methods.
 - iDeal
 - Cash on Delivery

I have setup the price cart rules and the first choice the customer can pick is iDeal.
This gives them a 2% discount. However, If they choose the pay with cash on delivery the amount is changed but the discount amount is still showing, so this is confusing the customers.

I have found this file in Magento where I want to make the change:

/app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml

<?php
$methods = $this->getMethods();
$oneMethod = count($methods) <= 1;
?>
<?php
foreach ($methods as $_method):
$_code = $_method->getCode();
?>

?php if(!$oneMethod): ?>
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
<input id="p_method_cashondelivery" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>'); window.location.reload();"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
<?php else: ?>
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" />
<?php $oneMethod = $_code; ?>
<?php endif; ?>
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?>

<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>

<?php echo $html; ?>

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

Somewhere around line 45 I have this code:

<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />

What I want to do is have this rule stay and add another line of code to change the Payment method like this:

<input id="p_method_cashondelivery" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>'); window.location.reload();"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />

But this result in the page have 2 radio buttons for each payment method, not so great idea.

Which code do I need to add to change the p_method_cashondelivery?

Br,

Steve


texts: Mage Register is Cleared by Grid Search Button No Page Reload

texts:
Even though there is no page reload, and grid ajax is set to true, the Mage::registry gets cleared when the grid search button is clicked.

I am using a registry variable related to an option type in the grid.

Is there a way to avoid the registry getting cleared in this scenario?

class MyModule_Block_Adminhtml_MyGrid extends Mage_Adminhtml_Block_Widget_Grid
{

        public function __construct()
        {
            parent::__construct();
            $this->setTemplate('mymodule/mymodel/meter/grid.phtml');
            $this->setId('time_settings');
            $this->setDefaultSort('sort_order');
            $this->setDefaultDir('ASC');
            $this->setSaveParametersInSession(true);
            $this->setUseAjax(true);
        }
        ....
        public function getGridUrl()
        {
            return $this->getUrl('*/*/metergrid', array('_current'=>true));
        }


texts: How to add custom column in the product grid while creating the order in the admin in Magento 2?

texts:
I am using Magento 2.3.0

You can see above grid when you try to add products while order creation in the admin.

I want to add a new column called "Stock" in the above grid and I want to display the product's quantity in stock in this column.

How can I do this?


texts: Magento 2.1.3: Overriding of vendor layout file with my custom layout file in Magento 2.1.3 is not working?

texts:
I have created a custom module in Magento 2.1.3 and its layout file is located in

app/code/RP/Testmodule/view/frontend/layout/customer_account_create.xml

but the system loads the layout from

vendor/magento/module-customer/view/frontend/layout/customer_account_create.xml

instead of my custom layout file.
How can I override this vendor layout file with my custom layout file?
My customer_account_create.xml file is
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="customer_form_register">
        <arguments>
            <argument name="template" xsi:type="string">RP_Testmodule::form/register.phtml</argument>
        </arguments>
    </referenceBlock>

</page>

but the module does not take this layout.
I have created the resister.phtml and it is located in

app/code/RP/Testmodule/view/frontend/templates/form/register.phtml

My register.phtml file is

Test

My module.xml file is

app/code/RP/Testmodule/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="RP_Testmodule" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Customer" />
        </sequence>
    </module>
</config>

My di.xml file is

app/code/RP/Testmodule/etc/frontend/di.xml

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

</config>

My registration.php file is

app/code/RP/Testmodule/registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'RP_Testmodule',
    __DIR__
);

These commands are executed successfully

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:clean
php bin/magento cache:flush

But all after that, still it's not working.
Thanks in advance


texts: “Could not save product ”5648“ with position 1 to category 6”

texts:
When I tried to remove the category from the product edit page the following error is getting displayed.

I am saving the product manually via admin end.....


texts: Magento 2.3.0 product image cache not created when resizing images

texts:
I have an issue with Magento 2.3.0 not resizing images from view.xml file in custom theme.

My view.xml:

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_Catalog">
            <image id="cycle_images_new_products_widget" type="small_image">
                <width>600</width>
                <height>600</height>
                <frame>0</frame>
            </image>
        </images>
    </media>
</view>

When i run bin/magento catalog:images:resize it seems to work reporting no errors but the images from the above view.xml file are not generated. No images are 600x600px. Also in the frontend I am getting a 403 forbidden error when I try to access the image url direct. http://www.andrewkurtisdirect.local/pub/media/catalog/product/cache/0ee050c3ffc3555709b9bb6062f4d7e9/a/k/ak_sunset_rocks1.jpg

The folder 0ee050c3ffc3555709b9bb6062f4d7e9 does not exist in my pub/media/catalog/product/cache folder.

Does anyone know why this xml file is not being read when resizing images?

Many thanks in advance.

EDIT

I have just added <constrain>true</constrain> above the <width> element. This produces a This element is not expected error in the frontend, so the view.xml is being read.


texts: How to retrieve an order from the database? Magento version 2.1.0

texts:
Magento 2.1.0
Porto theme

I have a problem with Magento 2.1.0 - it gives the

"Attention

Something went wrong." Error message."

I have not been able to fix that.

Now someone placed an order and I am not able to see it (because of the Error).

How to retrieve order info from the database?

PS: I just found out that a different (not Admin) user account is showing SALES - ORDERS while my Admin account gives the Error. What could be the reason for that?


texts: Magento2 : Add Simple Products to bundle product selection

texts:
I have a bundle product created from Admin Section. Now I am updating inventory of simple products i.e adding products to Magento Catalog Programmatically via CSV file.

I want to add those simple product as a bundle product selections. I have already created its option name "Clothes".

Please help me how I can proceed.

I have searched other question on stackexchange but nothing worked for me so first understand my problem it is different from others(For those who mark questions to duplicate).


texts: Checkout saveBilling generates error due to extractData method not working properly

texts:
In checkout process when I select either "Checkout as a guest" or "Register" and then fill out the proper form, clicking on the button to go to the next step generates error. This is what the exception is caught:

{"error":-1,"message":"The first name cannot be empty., The last name cannot be empty., Invalid email address \"\"."}

The problem is I am inserting all the fields and when I debug using Firebug, these fields show as validation passed fields. So they pass the proper validation on client side, what could be causing this error then? Some kind of server side validation?

Can anyone please give me some solution for this issue? Why Magento is giving this error when all the fields are properly filled up?

Edit: I have debug the Onepage.php files of both my site as well as default Magento setup. The extractData method is returning an empty array in my site, which is causing error during validation because the fields are missing after the data is extracted. Can anyone please help me out here?


texts: How to get url parameter in knockout js in checkout/index/index/#payment page

texts:
I am trying to replace my custom payment method's button called "submit request" to "place order" button when the status is approved.
I send status in URL parameter and now want to get it in knockout and data-bind in .html file and add CSS that if status is approved than "submit request" button is display:none and "place order" button is display:block.
If status is not approved than "submit request" button is display:block and "place order" button is display:none.
my URL is /checkout/index/index/status/approved/#payment.

Any help will be appreciated.


texts: How to Add Additional Options in Magento 2 and convert it into order?

texts:
I need to add my custom detail in cart along with product detail and transfer these details in order too.
I want to use additional option functionality for this.


texts: Magento 2 - Having trouble collecting totals for a custom gift card module

texts:
I'm in the process of adding support for a 3rd party gift card system. These cards will not exist in any way within the context of Magento, and an external web based API will validate/confirm balance/etc.

With that in mind, I simply need a way to alter the final cost of the order by adding one or more gift cards.

I feel like I'm close, but I'm getting very confused by how totals collection works in regards to \Magento\Quote\Model\Quote and \Magento\Quote\Model\Quote\Address\Total, specifically their ->getBaseGrandTotal()/->setBaseGrandTotal()/->getGrandTotal()/->setGrandTotal() methods.

$total->get[Base]GrandTotal() always seem to come back with a null or 0 value, even after calling $total->set[Base]GrandTotal(1234);

Here is my current collect() method, which seems to be not affecting the order total cost at all.

public function collect(
    \Magento\Quote\Model\Quote $quote,
    \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment,
    \Magento\Quote\Model\Quote\Address\Total $total
) {
    parent::collect($quote, $shippingAssignment, $total);

    $baseGrandTotal = $total->getGrandTotal(); //this is always zero!
    $totalGiftCardBalance = $this->_CardSessionHelper->GetTotalAvailableBalanceOfCurrentGiftCards();

    $giftCardContribution = min($baseGrandTotal, $totalGiftCardBalance);
    //this takes the total viable gift card amount and spreads it over multiple gift cards
    //depending on how much balance each one has
    $this->_CardSessionHelper->AllocateToGiftCards($giftCardContribution);

    //$contribution is a negative value determined by the previous allocation
    $contribution = $this->_CardSessionHelper->GetSumOfCurrentGiftCardsContribution();
    $total->setGrandTotal($contribution);
    $total->setBaseGrandTotal($this->_PriceCurrency->convert($contribution));

    return $this;
}

I've had other variations of this method which $quote->set[Base]GrandTotal, and seemed to work for the most part, but trying to work out additional gift card contributions after the fact would result in negative quote total values, or other values that made little sense.

In addition to this, the collection seems to happen multiple times - I presume this is because of both billing and shipping addresses.

Is there a way to get it to work for a billing address only?


texts: Magento 2.3 V1/Search with sortOrders not working in REST API

texts:
Magento 2.3 Search Criteria with REST API, SortOrders not working in V1/Search API.

I am trying to fetch Category products using Magento REST API by below request URL.

http://127.0.0.1/magento230ee/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=category_ids&searchCriteria[filterGroups][0][filters][0][value]=4&searchCriteria[sortOrders][0][field]=name&searchCriteria[sortOrders][0][direction]=ASC

Using Above query I have to get the same result whether a name field is ASC or DESC Order in Query.

Only SortOrder is not working for the above query. How to apply sortOrders filter in product collection using the above query.


texts: Magento2.3.5 Di Compile Breaks custom module admin grid

texts:
I have an issue whether in developer or production when I run php bin/magento setup:di:compile
I get Fatal error: Uncaught Error: Call to a member function setActive() on bool in /var/www/vhosts/dev.test.com/htdocs/vendor/magento/module-backend/Model/View/Result/Page.php:27 Stack trace: #0  When code $resultPage->setActiveMenu('Vendor_Module::entity'); then I get a blank page 200 ok There is nothing in exception.log
If I run php bin/magento setup:upgrade after di:compile then * is ok and the grid displays.
Any ideas.


texts: Changing the layout of the product category page by editing an XML file

texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

On my homepage, I have enabled, from Content -> Pages -> Design, the 2 columns with right bar layout.

The 2columns-left.xml file (app/design/frontend/Company_Name/Theme_Name/Magento_Theme/page_layout/2columns-left.xml):

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>
    <referenceContainer name="columns" htmlClass="row">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="hidden-xs col-sm-3" before="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
            <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional2">
                <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
            </container>
        </container>
        <referenceContainer name="main" htmlClass="col-xs-12 col-sm-9">
        </referenceContainer>
    </referenceContainer>
</layout>

The homepage source code, visible in the browser is:

In order to the same layout for the Product category pages, I went to Products -> Categories -> Design and changed the layout to columns with right bar also. I then saved and cleared the cache.

Still, the left sidebar is missing from the categories page. The source code does not contain:

Where am I wrong? As an alternative to using the admin to make this change, what layout (.xml) file shall I edit my theme (app/design/frontend/Company_Name/Theme_Name/pathToFile)?

The catalog_category_view.xml file in my theme has this code:

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

        <referenceContainer name="columns.top">
            <referenceContainer name="category.view.container" htmlTag="div" htmlClass="category-view" remove="true">
                <block class="Magento\Catalog\Block\Category\View" name="category.image" template="Magento_Catalog::category/image.phtml"/>
                <block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml"/>
                <block class="Magento\Catalog\Block\Category\View" name="category.cms" template="Magento_Catalog::category/cms.phtml"/>
            </referenceContainer>
        </referenceContainer>

        <referenceBlock name="page.main.title">
            <arguments>
                <argument name="id" xsi:type="string">page-title-heading</argument>
                <argument name="add_base_attribute_aria" xsi:type="string">page-title-heading toolbar-amount</argument>
            </arguments>
            <block class="Magento\Catalog\Block\Category\Rss\Link" name="rss.link" template="Magento_Catalog::category/rss.phtml"/>
        </referenceBlock>

</page>

Copying the code from the homepage template to the category template does not work.

What shall I change to the code above to make it display the sidebar?


texts: How to make ajax call in magento admin form

texts:
In my magento admin form, I have added a category field. Based on the selection of category in category field an ajax call should be done.

$category = $fieldSet->addField(
            'category_id', 'select', [
                'name' => 'category_id',
                'label' => __('Category'),
                'required' => true,
                'values' => $this->_selectedCategories->toOptionArray(),
            ]
        );

I have set ajax call for that field

  $url = $this->_urlInterface->getUrl('homepage/ajax/getcategoryurl');

$category->setAfterElementHtml('
                        <script>
                        require([\'jquery\'], function($){
                        var customUrl =
                    $("#category_id").on(\'change\', function () {
                    $.ajax({
                        url: \''.$url.'\',
                        type: \'POST\',
                        data: {category_id: $(this).val(), form_key: window.FORM_KEY},
                        success: function (response) {
                            $("#url").val(response[\'content\']);
                        }
                    });
});
                        });
                        </script>
                    ');

Now how to set url for ajax call?

url: \'<?= $url; ?>\'

I am not getting controller call using this line. How to set $url as a ajax call url in script?


texts: Products being displayed in categories even after removing

texts: I deleted some products from category but these products are still visible in that particular category on the frontend.This products are not linked to that categories. Please give me an advise Thanks


texts: Magento2 model is not getting overriden?

texts:
I want to override the model class vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php via a custom module.

My Test/Kit/etc/di.xml is as follows

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\GroupedProduct\Model\Product\Type\Grouped" type="Test\Kit\Model\Rewrite\Product\Type\Grouped" />
</config>

And the model class is as belows.

app/code/Test/Kit/Model/Rewrite/GroupedProduct/Product/Type/Grouped.php

namespace Test\Kit\Model\Rewrite\Product\Type;

class Grouped extends \Magento\GroupedProduct\Model\Product\Type\Grouped
{
    /**
     * Retrieve array of associated products
     *
     * @param \Magento\Catalog\Model\Product $product
     * @return array
     */
    public function getAssociatedProducts($product)
    {
        if (!$product->hasData($this->_keyAssociatedProducts)) {
            $associatedProducts = [];

            $this->setSaleableStatus($product);

            $collection = $this->getAssociatedProductCollection(
                $product
            )->addAttributeToSelect(
                ['name', 'price',  'special_price', 'special_from_date', 'special_to_date']
            );
//                ->addFilterByRequiredOptions()->setPositionOrder()->addStoreFilter(
//                $this->getStoreFilter($product)
//            )->addAttributeToFilter(
//                'status',
//                ['in' => $this->getStatusFilters($product)]
//            );

            foreach ($collection as $item) {
                $associatedProducts[] = $item;
            }

            $product->setData($this->_keyAssociatedProducts, $associatedProducts);
        }
        return $product->getData($this->_keyAssociatedProducts);
    }
}

What am I missing here?


texts: How to link to a Category inside of a Static Block using XML and Category ID

texts:
I know I can link to any category by using:

Category

But I was wondering if there was a way to do something like this:

Category

I haven't been able to find anything like that. Thank you!


texts:
I am getting an error after compilation. I am using Magento 1.9.0.1.

My website was running too slow so I have complied but after compilation my website (frontend as well as backend) has down and showing the same error. Please help me to rectify the same.

Error: Fatal error: require_once(): Failed opening required '/home/ecomventures/public_html/demo/includes/src/../lib/vendor/autoload.php' (include_path='/home/ecomventures/public_html/demo/includes/src:.:/usr/lib/php:/usr/local/lib/php') in /home/ecomventures/public_html/demo/includes/src/Fontis_Australia_Model_Observer.php on line 23


texts: using library with namespaces in magento

texts:
Im using eBay SDK for PHP from David Sadler https://github.com/davidtsadler/ebay-sdk-examples. That library request to use Composer's autoloader. Code display information like:

/**
 * The namespaces provided by the SDK.
 */
use \DTS\eBaySDK\Constants;
use \DTS\eBaySDK\Finding\Services;
use \DTS\eBaySDK\Finding\Types;

There are two main files in magento for auto loading

“Varien_Autoload” class located at “lib\Varien\Autoload.php”.
Mage.php file located at ‘app/Mage.php’

anyone know the way I have to modify those code to autoload this library file in magento. its the correct way to load libraries?

EDIT

I have another library that provides an autoload with the following configuration:

<?php

require "library/libraryname.php";

$resourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'library'. DIRECTORY_SEPARATOR . 'Resources';
//$resourcePath = "/library/Resources";

define("LIBRARY_RESOURCE_PATH", $resourcePath);

/**
 * Simple autoloader that follows the PHP Standards Recommendation #0 (PSR-0)
 * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md for more information.
 */
spl_autoload_register(function($className) {
    $className = ltrim($className, '\\');
    $fileName = '';
    $namespace = '';
    if ($lastNsPos = strripos($className, '\\')) {
        $namespace = substr($className, 0, $lastNsPos);
        $className = substr($className, $lastNsPos + 1);
        $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
    }
    $fileName = __DIR__ . DIRECTORY_SEPARATOR . $fileName . $className . '.php';
    if (file_exists($fileName)) {
        require $fileName;

        return true;
    }

    return false;
});

Do I have to create one for this new library?. any other option?.


texts:
I have written a small module that has a page on the backend. On a test server it works fine (it works on windows). Once installed on the Battle Server (FreeBSD), while trying to go to the page of the module have a 404 error.

The first thing that came to mind, it's case letters (as developed for Windows).

The configuration of the router is:
config.xml

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <ZM_Background before="Mage_Adminhtml">ZM_Background_Adminhtml</ZM_Background>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

adminhtml.xml

<config>
    <menu>
        <background translate="title" module="background">
            <title>Media</title>
            <sort_order>50</sort_order>
            <children>
                <items translate="title" module="background">
                    <title>Manage backgrounds</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/zm_background</action>
                </items>
            </children>
        </background>
    </menu>
</config>

In this configuration, I have a 404
but if I change the register on line

<action>adminhtml/ZM_Background</action>

In this case, the URL in the administration panel module has caps that are not very nice.
Help to understand what files you need to check for the register that would fix it.
Thanks.

so, too, is working

<action>adminhtml/ZM_background</action>


texts:
my magento store backend is very slow, how can I speed up admin panel in magento?
I used items in below link but admin panel is still very slow:
https://suyati.com/blog/speed-up-magento-admin-backend/


texts:
my url pattern http://10.0.20.149/mindcomtest1/index.php/api/rest/products?page=1

I am trying to get the product details by hitting this url but getting 404 error any help would be appreciable ??


texts: Is it possible to hide products in magento 2.I tried disabling a product but it's still displayed in the front as "out of stock".I want to hide products to avoid deleting them for good in case i need them some time in the future.


texts: How to add texts to payment step Onepage checkout page

texts:
Which file should i edit to add text underneath all the payment methods. ( I would like to add some return/refund policy).

The URL is

  https://www.mywebsite.com/checkout/#payment


texts: Report "in-stock" configurable products that are actually out-of-stock

texts:
When all of a configurable product's associated products go out of stock, the configurable product's availability doesn't change. It'll stay listed as in-stock until you manually change it. (This is stupid, but default behavior.)

I'm looking to create a page that will list out all of these products for me. Basically, I'd like to create a page that shows all configurable products. Filter that list to show only products with in-stock status. And then filter that to show only ones that don't have any in-stock associated products (maybe with an isSaleable check).

Before I reinvent this particular wheel, has anyone built such a page?

Note: I found the opposite code, which may be helpful to someone: https://gist.github.com/arosenhagen/3844732 - This shows configurable products that are set to be 'out of stock' that have in-stock associated products.


texts: HELP! Magento 2 SMTP setup Could not open socket: stream_socket_client(): Peer certificate not match

texts:
I use Mageplaza SMTP extension to setup the SMTP. When testing the connection, it popped up the follow error. I have already tried some solution online, like trying to modify abstract.php file. There is also an answer saying it maybe caused by shared host, since I am also hosting the website in shared host. But I contacted bluehost, they said my MX is pointing to Google. They won't block anything. Any ideas on this issue?
php version: 7.1
Magento 2 version: 2.3.2


texts:
The issue with both the Canonical and Titles are they do not change on the Brand filter level and I cannot figure out how to change them. For example:

URL: http://shop.crownvisioncenter.com/womens/sunglasses/burberry

Title: Sunglasses | Crown Vision Center

Canonical Tag: //shop.crownvisioncenter.com/womens/sunglasses

Title Should Be: Women's Burberry Sunglasses | Crown Vision Center

Canonical Should Be: //shop.crownvisioncenter.com/womens/sunglasses/burberry

Does any one know how this can be done?


texts: Adding Jquery to block (Still a nooblet)

texts:
I've created a CMS block with basic HTML, but I want to add my own custom Jquery.

I've been working on a timer project, I've done my own timer and the HTML and the styling are all prepared. But the only thing I need is a location for the custom Jquery.

I have no idea where this should go!


texts: Magento 2 / ShipHawk multiple warehouses

texts:
I need to extend the ShipHawk Magento 2 module so that order line items can be shipped from multiple locations.  We are using Magento MSI and I have the functionality built to send the stock inventory to ShipHawk and we receive the shipping back but I need to be able to save this information into Magento for what warehouse each line item should be shipped from according to ShipHawk for each shipping rate displayed to the customer.
The warehouse needs to be saved with the order items I would assume in extension attributes because I will need to send the shipping location for each order line item to NetSuite.
Anyone done this before?  Ideas how to build this?  Has anyone done this before and willing to sell their module?


texts: Send invoice e-mail based on customer group

texts:
I want to send different content in invoice e-mails per customer group.

Suppose, I have two customer groups A and B.
When customer from group A will place a order it should send another e-mail then a customer from group B will place an order .

Is this possible? Please help me how can I perform this.


texts: Magento 2.3: Customer ID from Session Returning NULL with Cache Enabled

texts:
I'm calling the following helper but getCustomerId is returning NULL when I have cache enabled.  If I disable all cache, then I can return the customer's ID.

<?php
namespace Company\Module\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
  private $_customerSession;

  public function __construct (
    \Magento\Customer\Model\Session $customerSession
  ) {
    $this->_customerSession = $customerSession;
  }

  public function getCustomerId()
  {
    return $this->_customerSession->getCustomerId();
  }
}

I've also tried return $this->_customerSession->getCustomer()->getId(); which also returns NULL

Now if I inject the Object Manager instead, I get my desired result and it returns the customerId even with cache enabled:

...
public function __construct(
    \Magento\Framework\ObjectManagerInterface $objectmanager
  ) {
    $this->_objectManager = $objectmanager;
  }

  public function isBrandingCustomer()
  {
    $customerSession = $this->_objectManager->create("Magento\Customer\Model\Session");
    return $customerSession->getCustomerId();
  }
...

So my question is, How can I return the customer's ID from $customerSession with cache enabled and without using Object Manager?


texts: Unable to create product programmatically

texts:
I'm trying to create a simple product programmatically in Magento CE 2.1 but I get this error :

Exception #0 (Magento\Framework\Exception\CouldNotSaveException): Unable to save product

The product is created, but the exception is thrown after the creation, it seems that there is a failing rollback.

Here is my snippet :

$product = $this->_productFactory->create();
$product->setName('A product');
$product->setSku('a-product');
$product->setPrice(12.3);
$attributeSet = $this->_catalogConfig->getAttributeSetId(4, 'Default');
$product->setAttributeSetId($attributeSet);
$product->setWebsiteIds(array(1));
$product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE);
$product->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH);
$product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
$this->_productRepository->save($product);


texts: Magento 2 delete specific product categories

texts: how can I delete specific categories for a product in Magento 2.Forex: I have a product with a,b,c categories, I have some conditions if the conditions meet my categories remains same but if those conditions fail I need to remove b, the category only not a,c categories. How can I achieve that?


texts: Customer not logging in though they registered successfully and details saved in db

texts:
After register with new account, customer_entity table populated with the user details. But in frontend the user not logged in.

When we clear the browser cookies, then the user can able to register and login successfully. After some time this issue again occurring.

form_key available in the registration phtml file.

cookie path and cookie domain also set correctly in the backend.

Still we are facing this issue, Anybody having idea over here?


texts: Custom Block Not Rendering on Checkout Cart

texts:
I want to add a custom block  Below Order Total using a knockout template but unable to render it on the checkout cart page.
Here I have done so far.
1) checkout_cart_index.xml at

app/code/Ishaq/CheckoutTotal/view/frontend/layout/checkout_cart_index.xml

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

        <referenceBlock name="checkout.cart.totals">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="block-totals" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="fee" xsi:type="array">
                                    <item name="component" xsi:type="string">Ishaq_CheckoutTotal/converted_rate</item>
                                    <item name="sortOrder" xsi:type="string">20</item>
                                    <item name="config" xsi:type="array">
                                        <item name="template" xsi:type="string">Ishaq_CheckoutTotal/converted_rate</item>
                                    </item>
                                </item>

                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>

</page>

2) converted_rate.html at

app/code/Ishaq/CheckoutTotal/view/frontend/web/template/converted_rate.html

My Converted rate goes here

3) converted_rate.js at

app/code/Ishaq/CheckoutTotal/view/frontend/web/js/converted_rate.js

define(
    [
        'Ishaq_CheckoutTotal/js/converted_rate'
    ],
    function (Component) {
        'use strict';

        return Component.extend({

        });
    }
);


texts: Join Customer Address custom attribute to Order Address Collection

texts:
I would like to join custom customer/address attributes with the sales_flat_order_address table and sales/order_address_collection resource model.

The attributes are called gmap_lng and gmap_lat, and I set them via:

$address = Mage::getModel('customer/address');
$address->setGmapLng('value');
$address->setGmapLat('value');
$address->save();

I would like to join these attribute values in the sales/order_address_collection where there are matching customer_id values, but I'm not sure how to use join():

$orderAddresses = Mage::getResourceModel('sales/order_address_collection');
$orderAddresses->getSelect()->join(??,??,??);

I have gmap_lng and gmap_lat columns ready to be filled in sales_flat_order_address.

Thanks!


texts: How to display only two products as Cross Sell products in cart page Magento 2.3.2?

texts:
How to show only 2 products as corss sells in the cart view page, irrespective of the product that gets added to cart.

Thanks.


texts: Creating custom customer attribute and getting its value issue in Magento 1

texts:
This is how i created my custom customer attribute

$installer = new Mage_Customer_Model_Resource_Setup('core_setup');

$installer->startSetup();

//$installer->removeAttribute('customer', 'dotmailer_id');
if (!$installer->getAttribute('customer', 'dotmailer_id')) {
    $entityTypeId = $installer->getEntityTypeId('customer');
    $attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
    $attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

    $installer->addAttribute('customer', 'dotmailer_id', [
        'type'     => 'int',
        'input'    => 'text',
        'backend'  => '',
        'frontend' => '',
        'label'    => 'Dotmailer ID',
        'visible'  => true,
        'required' => false,
        'user_defined' => 1,
        'source'   => ''
    ]);
    $installer->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'dotmailer_id', '200');
    $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'dotmailer_id');

    $attribute->setData('used_in_forms', [
        'customer_view',
        'adminhtml_customer',
        'customer_account_edit'
    ])
        ->setData('is_used_for_customer_segment', true)
        ->setData('is_system', 0)
        ->setData('is_user_defined', 1)
        ->setData('is_visible', 1)
        ->setData('sort_order', 99)
    ;
    $attribute->save();
}
$installer->endSetup();

The customer attribute is saved, but for some reason I cannot edit the show on front end part. see img:  . This is my first issue.

The second issue is: I went to a customer I gave a value to this new customer attribute and I save the customer. When I load the customer programmatically, like:

$customer = Mage::getModel('customer/customer')->load(12);
var_dump($customer->getData());

I don't get any values from my new customer attribute. It is not in the list with the rest of the attributes. Why ?

Thx


texts:
In my checkout page suddenly stop working i don't know what is the problem after click Place Order it's keep on loading only.

It's default checkout only not any 3rd party module

What is the problem any idea about that


texts: I have a totally default installation using the Luma theme. When you go to the cart page there is no checkout button. Only a link for "Check out with multiple addresses". I have turned off single page checkout but I don't see why that would make a difference. Any ideas?


texts: Magento2: API with dynamic field in end point

texts:
I want to develop the API with dynamic field in end point so how can i do that?
/V1/customer/group/{groupId}/erp/{erpId}/list


texts: Magento2: How to hide the quantity box for a specific product on the checkout cart page?

texts:
I want to hide the quantity box for a specific products on the checkout cart page.

I have referred this link Magento 2: How to hide quantity box for certain products which has only quantity?

But it is not helping me out.

Any help would be appreciated.


texts:
Notice: Trying to get property of non-object in
  C:\xampp\htdocs\production\app\code\core\Mage\Core\Model\Config.php on
  line 1236

$config = $this->_xml->global->{$groupType.'s'}->{$group};

  Notice: Undefined index: _resource_singleton/core/store in
  C:\xampp\htdocs\production\app\Mage.php on line 255

public static function registry($key)
{

    if (isset(self::$_registry[$key])) {
        return self::$_registry[$key];
    }

    die(self::$_registry[$key]);
    return null;
}


texts: What is a Magento 2 "Web API Integration"

texts:
Per the developer documentation

  Integration style web API’s enable a single web API call to run multiple services at once for a more efficient integration. An example of this behavior can be see in the Catalog where one web API call can create a product; if your payload includes the inventory object and media object then the framework will also create the product’s inventory & media in that one API call.

...

  Create a new integration on Magento Admin. To create an integration, click System > Integration > Add New Integration. Be sure to restrict which resources the integration can access.

It's not all that clear what, exactly, an integration is.  The first documentation snippet indicates an integration is (maybe?) a way to chain multiple API calls in a single HTTP request.  However, there's no syntax example of this.  Also, if I use the information in the second documentation snippet I can create an integration object, but it's not clear what I'm supposed to do with this.  Also, digging into the code, integration objects appear to use a different authentication code path.

Does anyone have a clear idea what these "API Integrations" are, and how they work?


texts: Can we still upgrade magento backend even if the company doesnt release an upgrade to theme?

texts: If we buy a paid theme from a 3rd party which is 2.2.x compatible, and when magento 2.3 gets release, will we still be able to upgrade to 2.3 backend even if the 3rd party company does not provide an update?


texts: How to find what query executes while doing reindexing?

texts:
I have a custom module that added some re-indexing rows in System->Index Management.

Currently its giving some issue. While doing it manually site goes down.

Is there any way to find out what query executes while doing this custom re indexing?

I think there must be any core file where we can print all the queries while doing any re-indexing manually. I am searching for this.


texts:
I want to alterate under specefic conditions the final_price in the front product view (not changing his value but only adding some text).
Ex : Instead of printing 5€ , I will print 5€ HT
In order to do such a thing, I used a preference on
Magento\Framework\Pricing\Render
And this is approximatively what the override does
public function render($priceCode, SaleableInterface $saleableItem, array $arguments = [])
{
    $useArguments = array_replace($this->_data, $arguments);

    /** @var \Magento\Framework\Pricing\Render\RendererPool $rendererPool */
    $rendererPool = $this->priceLayout->getBlock('render.product.prices');
    if (!$rendererPool) {
        throw new \RuntimeException('Wrong Price Rendering layout configuration. Factory block is missed');
    }

    // obtain concrete Price Render
    $priceRender = $rendererPool->createPriceRender($priceCode, $saleableItem, $useArguments);
    $priceHtmlBlock = $priceRender->toHtml();
    if($priceCode == 'final_price'){
        $productId = $saleableItem->getId();
        $product = $this->productCollectionFactory->create()->getItemById($productId);

        $currentStore = $this->helperPro->getCurrentStore();
        $isStorePro = $this->helperPro->isProStore($currentStore->getCode());

        $productAttributeSetId = $product->getAttributeSetId();

        $attributeSet = $this->attributeSetFactory->create()->getItemById($productAttributeSetId);
        $attributeValue = $attributeSet->getAttributeSetName();
        $isCoffee = ($attributeValue == 'Cafe');
        $isAccessories = ($attributeValue == 'Accessoire');
        if($isStorePro && ($isCoffee || $isAccessories)){
            $priceHtmlBlock = str_replace('€','€ HT',$priceHtmlBlock);
        }
    }
    return $priceHtmlBlock;
}

This is working, the html returned has the HT I'm looking for.
The issue is that even after doing that, in front I will still have 5€.
I told myself it might be a cache issue, so I've been setup:upgrade to clean the caches.
And here I saw the HT appearing. I thought it was a win...but as the js continue loading...at some point one of them ignored my modification and setup again the old value without HT.
Any ideas ?


texts:
I'm developing very small modules and would like to put all javascript 3rd party libraries in one place to better maintain/update them and to avoid duplicating across modules.
According to the documentation,"Do not put custom JS files in the lib/web directory".
So the best place is to place them in _core/view/frontend/web/js module ? Make module dependency to it and map js libraries in each others with requirejs-config.js ?
Or am I misunderstanding the magento doc ?

I don't think it is a good idea to place them in my theme as it is not theme related.


texts: How to set Ajax Block Response with as left and content block in Magento

texts:
$myBlock = $this->getLayout()->createBlock('module/admin_productqa_edit');

$myHtml =  $myBlock->toHtml();
$response['blck'] = $myHtml;

above code work perfect. I need Given below value return as ajax response from controller in magento. How to set ajax response in magento

$this->_addContent($this->getLayout()->createBlock('module/adminhtml_productqa_edit'));
$this->_addLeft($this->getLayout()->createBlock('module/admin_productqa_edit_tabs'));

Please Give a perfect solution


texts: Magento 2 custom Theme no css and products loaded in frontend

texts:
I created a new Template based on the Blanco/Luma theme as pointed out in several howto's as in this topic)

Strange thing is that the css and the products (and images) which are available do not load in frontend. So I end up with just plain text.
I tried all solutions mentioned like deleting the static files, running php bin/magento setup:static-content:deploy and made sure the permission on the files are ok.

This is how my frontend html looks like:

<code>
!doctype html>
<html lang="nl-NL">
    <head >
        <script>
    var require = {
        "baseUrl": "http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL"
    };
</script>
        <meta charset="utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="Default Description"/>
<meta name="keywords" content="Magento, Varien, E-commerce"/>
<meta name="robots" content="INDEX,FOLLOW"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Home page</title>
<link  rel="stylesheet" type="text/css"  media="all" href="http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL/mage/calendar.css" />
<link  rel="icon" type="image/x-icon" href="http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL/Magento_Theme/favicon.ico" />
<link  rel="shortcut icon" type="image/x-icon" href="http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL/Magento_Theme/favicon.ico" />
<script  type="text/javascript"  src="http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL/requirejs/require.js"></script>
<script  type="text/javascript"  src="http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL/mage/requirejs/mixins.js"></script>
<script  type="text/javascript"  src="http://site1/pub/static/_requirejs/frontend/MyTemplate/menes1-theme/nl_NL/requirejs-config.js"></script>
            </head>
    <body data-container="body" data-mage-init='{"loaderAjax": {}, "loader": { "icon": "http://site1/pub/static/frontend/MyTemplate/menes1-theme/nl_NL/images/loader-2.gif"}}' class="cms-home cms-index-index page-layout-1column">
</code>

So it looks like all the files are available in the static folder? Why are they not loaded?
When using the Luma theme, the products and css are loaded without any problem? I have all the files in place for the template to work (as in the sample mentioned). Only thing I did not get form that sample was where the mentioned config has to go? In all other howto's I found there was no config mentioned so maybe that might be the problem? I do not have Grunt running on my server. Since the final production server on a hosted environment does not has that available.

Any hints on how to get this right? Magento version is 2.09


texts: Redirect in OnePage Checkout during checkout in "Shipping Method" to shipping provider's web (onepage)

texts:
I'm using OnePage module checkout.

I created my shipping method module. If is my method selected, need to redirect to provider's web. Here customer choose closest place to his shipping address and then it's redirected back to checkout. What's the best way where to do redirection? In controller? Is is even possible (isn't it restricted just to "Payment methods")?

UPDATED:
There seems to be two ways:

Redirect just after "Shipping Method" section and to be returned back to OnePage by provider's web after choosing the place. This requires to hack skin/frontend/base/default/js/opcheckout.js and app/code/core/Mage/Checkout/controllers/OnepageController.php, because when it  goes back to OnePage from providers's web, it needs to:

Save new address (previously choosen in "Shipping" section.
Jump jump to next section ("Payment method") - i.e. skip everything up to "Shipping Method".

Another option seems to be to hack OnepageController.php to do redirect at the beginning of successAction() method.

I also wanted to get inspiration from PayPal modules, which do redirect, but I wasn't succeed.


texts: intermittent jQuery not defined issue when using cycle2 carousel

texts:
I'm new to magento 2 and trying to get cycle 2 working on a custom theme but getting jQuery not defined error every so often.

Sometime the page will load correctly, then other times will throw the jQuery not defined error in the console.

Here is my requirejs-config.js file

var config = {
paths: {
    'foundation': 'js/bower_components/foundation-sites/dist/js/foundation',
    'owlcarousel': 'js/owl.carousel.min',
    'cycle2': 'js/jquery.cycle2.min',
    'cycle2carousel': 'js/jquery.cycle2.carousel.min',

},
shim: {
    "foundation": ["jquery"],
    "owlcarousel": ["jquery"]
}

};

then in the phtml file i have this:


texts: Create Link Dynamically By Customer Group in Customer Account Navigation - Magento 2

texts: I am attempting to add links to certain customer groups that will show on Customer Dashboard. I'm having trouble figuring this out! Help!


texts: can we change catalog search url in magento?

texts:
I want to change the catalog search URL from

www.abc.com/catalogsearch/result/?cat=0&q=test

to

www.abc.com/test.html

Is there any way?


texts: How to add a different class names to a field called status in UI component grid used in front-end in magento 2

texts: I want to add a span tag for a status field which contains different statuses like close,open,order.those status are coming from ui component grid used in front-end.


texts: Execute mixin only when my custom module is enabled from configuration

texts:
I've implemented swatch-renderer-mixin through require-js. It's working fine but I need to only run it when my module is enabled. What's the best way to check it in my mixin.js file?
This is my requirejs-config file:
var config = {
    config: {
        mixins: {
            'Magento_Swatches/js/swatch-renderer': {
                'Vendor_Module/js/swatch-renderer-mixin': true
            },
            'mage/gallery/gallery': {
                'Vendor_Module/js/gallery-mixin': true
            }
        }
    }
};


texts: Add wishlist to my dashboard (customer_account_index)

texts:
I want to add the wishlist in my dashboard in the customer account. Problem is I have to make a new block like this.

<block class="Magento\Framework\View\Element\Template" name="customer_account_dashboard_wishlist" as="wishlisting" template="account/dashboard/wishlisting.phtml" cacheable="false"/>

and then add a new file wishlisting.phtml in the account/dashboard. In the file I have copy pasted the code of original wishlist from this address module_wishlist>view>frontend>templates>item>list.phtml

but still, i am unable to have the wishlist in the account. Anybody can help me in this regard. actually, I did not know how XML works in Magento.


texts: main.CRITICAL: Table "catalogrule_product_replica" does not exist Magento 2

texts:
I have been getting this in my logs and phpmyadmin

main.CRITICAL: Table "catalogrule_product_replica" does not exist

when I try to run these 2 indexes they are failing
php bin/magento indexer:reindex catalogrule_rule
php bin/magento indexer:reindex catalogrule_product

Catalog rule indexing failed. See details in exception log.

I have tried to drop the table and import from backup working database however it still does not reindex. But the error does go away

Any help would be most appreicated as I am stuck for 2 days

thanks


texts: Magento 1 - How to check if a product is new

texts:
From a quick search the only reference I found was on the Magento forums which is suggesting that you have to write some custom code to check if a product is new.

I would have thought there would be a simple isNew() method on the Mage_Catalog_Model_Product which takes into account the Featured dropdown as well as the Set Product As New From Date and Set Product As New To Date fields - but that doesn't seem to be the case?

Are teh custom codez needed?


texts: what is composer.json should be for magento 2?

texts:
From today marketplace start rejects my modules by issues in composer, it's look like:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

The requested package sy/callback 0.1.2 exists as sy/callback[0.1.0, 0.1.1] but these are rejected by your constraint.

Installation failed, reverting ./composer.json to its original content.

[Pipeline] }

[Pipeline] // stage

[Pipeline] sh

[DockerOperationsPHP71Magento22CE] Running shell script

echo Failure

Failure

What is need to do? anybody)

My composer.json is:

{
    "name": "sy/callback",
    "description": "Extension",
    "license": [
        "OSL-3.0"
    ],
    "type": "magento2-module",
    "version": "0.1.2",
    "authors": [
        {
            "name": "Slava Yurthev",
            "email": "slavik-iii@ukr.net",
            "homepage": "https://github.com/SlavaYurthev/",
            "role": "Developer"
        }
    ],
    "autoload": {
        "files": [ "registration.php" ],
        "psr-4": {
            "SY\\Callback\\": ""
        }
    }
}

UPDATE:

Magento Support Answer:

  Hi Slava,

  We have identified a bug within our install automated testing and
  pushed a fix to production this morning. We are going to rerun the
  tests today for affected extensions (I added your extension to this
  list). You will see a separate email from us that will say either that
  you passed or failed (for a valid reason). No action is required on
  your part. Just be on the lookout for the email.


texts: Magento 1.9 coupon code being applied but total not updating

texts:
I have a simple 20% discount coupon code setup in a Magento store. In the cart when the coupon is applied the discount amount is shown but the grand total does not update e.g.

Subtotal £23.95

Discount - £4.79

Grand Total £23.95

I have checked the 'Mage_Tax' module is enabled, re-indexed everything but it still isn't working. Any help would be much appreciated.


texts: Magento2 : Create Dynamic URL by controller

texts:
I need the url structure like this :

From this url :- http://localhost/magento27/review/product/view/id/936/

To this url :-  http://localhost/magento27/women/review/love-this-product/936

women :- Category-Name
love-this-product :- Title of the Review
936 :- Id of review

How to create this dynamic url with controller?

Please help me.

Thanks.


texts: Css file is generated in pub/static folder but looking at source file in browser it is not listed

texts:
After deploying my theme I see that the mycustom-m.css file is generated at /pub/static/frontend/Vendor/mytheme/en_US/css/mycustom-m.css, but it does not make any changes. Looking at the source file in browser I realized that it's not listed, however I have below code in default_head_blocks.xml

<head>
        <css src="css/mycustom-m.css" order="100" />
</head>


texts:
I want to change my url to the endpoint of slug on categories.
Ex:

  www.example.com/level1/level2/level3.html

should be like this:

  www.example.com/level3.html


texts:
How to sort attribute options color properties in Magento 2.3.5 alphabetically with code? How can I create a module or plugin that will sort attribute color properties alphabetically? Image below. Need to create a sort button that when hit will sort the color attribute list. Or something similar to that. Thanks for any help!
I know I can sort drag and drop from this page. But I want to create a button that will sort on push.


texts: How to debug Reports > Products > Products Ordered collection?

texts:
I found that Magento Reports module is very tricky and confusing to debug.

Though I got that the Reports > Product > Products Ordered collection is generated from Mage/Adminhtml/controllers/Report/ProductController.php soldAction, I cannot seem to get query or data for debugging purposes when I change it's Grid's (Mage_Adminhtml_Block_Report_Product_Sold_Grid) _prepareCollection to below.

protected function _prepareCollection()
    {
        parent::_prepareCollection();

        $debugCollection = $this->getCollection()->initReport('reports/product_sold_collection');
        $size = $debugCollection->getSize();
        $debug = $debugCollection->debug();
        //or
        $debugQuery = $debugCollection->getSelect();
        //or
        $debugData = $debugCollection->getData();
        $this->getCollection()->initReport('reports/product_sold_collection');
        return $this;
    }

All functions getData(), debug() & getSelect() seem to be undefined in that module class hierarchy.


texts: Give access to all (virtual) products with one subscription

texts:
I'm just discover Magento and I asked a question.
I'm looking for a way to give access to all products of the store with a subscription.

Products are files. I would when a client buy a subscription, he can download files attached but for all the products of the store.
The goal is client doesn't make an order each time he would download files.


texts: Some products not showing in listing page and search - Magento 1.9

texts:
I have an issue on my website: some products are not showing in category page and search. I have created new product it is also not showing in category page, but is showing for a brand page i have extension "aitmanufacture".

For example i have a category called "DEMO" it has 40 products, but it's showing only 30 products remaining 10 products not showing. i have reviewed all the options like qty,status,visibilty and backend also category page it's showing 40.. it's seems everything fine but it's not showing in frontend.

Help please.