texts: Magento 1.9.1 swatches not display after enabled

texts:
Currently i just upgrade to magento 1.9.1 and using the guide from

http://www.magentocommerce.com/knowledge-base/entry/ee1141-ce191-configurable-swatches

i have upload 2 png file namely Black and White to [your Magento install dir]/media/wysiwyg/swatches.

But under my webpage, it is still showing me a dropdown box instead of swatches? Is it because of the theme that i use which is not compatible to magento 1.9.1 swatches ?

Under my configurable products, the image i have also label to White and Black. What can be wrong.

Many Thanks


texts: How to get product count in minicart but not their quantity

texts:
app\design\frontend\test\product\Magento_Checkout\templates\cart\minicart.phtml

  <a class="action desktop showcart" href="<?php /* @escapeNotVerified */ echo $block->getShoppingCartUrl(); ?>"
   data-bind="scope: 'minicart_content'">
    <?php /* @escapeNotVerified */ echo __('My Cart'); ?>

Can anyone brief me??


texts: new product type image of bundled product - children product price not insert in table sale_flat_quote_item and sale_flat_order_item

texts:
I created a new product type image of bundled product and everything is work except the children product cannot insert the price in to database table salt_flat_quote_item and sale_flat_order_item. This turned out to give some problems in the order in the backend cannot show children price of this product. Do i have to call a function to get my children price?

this is my config file

<catalog>
<product>
<type>
  <formula translate="label" module="bank">
    Formula Product
    <model>bank/product_type_formula</model>
    <composite>1</composite>
    <allowed_selection_types>
      <simple/>
      <virtual/>
    </allowed_selection_types>
    <price_model>bank/product_type_formula_price</price_model>
    <index_data_retreiver>bank/catalogIndex_data_formula</index_data_retreiver>
    <index_priority>40</index_priority>
  </formula>
</type>
<options>
  <formula>
     <types>
        <select translate="label" module="bank">
           Drop-down
        </select>
        <radio translate="label" module="bank">
           Radio Buttons
        </radio>
        <checkbox translate="label" module="bank">
           Checkbox
        </checkbox>
        <multi translate="label" module="bank">
           Multiple Select
        </multi>
     </types>
  </formula>
</options>

Do I have to create more config or anything to extends bundle product.

Thank you very much.


texts:
I need to generate in one of my custom module a link to a category edit page in the backend.
So I generate the url like this:

 $url = Mage::helper('adminhtml')->getUrl('adminhtml/catalog_category/index', array('id'=>$category->getId()));

or like this:

 $url = Mage::helper('adminhtml')->getUrl('adminhtml/catalog_category/edit', array('id'=>$category->getId()));

I get a correct url in both cases:

ROOT/admin/catalog_category/index/id/10/key/<security-key-here>/
//and
ROOT/admin/catalog_category/edit/id/10/key/<security-key-here>/

But when the page loads, for a split second I see in the edit form the data for my category or the category I previously edited and then there is an ajax call that clears my form and I'm on add mode. ('New Root Category').  The <title> tag of the page contains the correct category name.  On the left side tree, the correct category is selected.

The ajax call that clears the form is made to

`ROOT/admin/catalog_category/edit/key/<security-key-here>/?isAjax=true`

So there is no id parameter in the ajax call. I guess that's the problem.
How can I make this work?
This seams like a bug to me. I stand corrected. Based on David's answer this seams like a feature.

But I recall this working correctly in a really old version (don't remember which).
I tested on ce-1.7.0.2 and ce-1.8.1.0 and the result is the same.


texts: Magento 2 saving category with incorrect store_id

texts:
After Migration of Magento 1.9 to Magento 2

Some categories have duplicated values (different store_id) on our database. (i dont know if this problem ocurred in Migration)

In a category:

Category Name: Battery

attribute_id=50
store_id=0
value="cms_block_1"
entity_id=3

attribute_id=50
store_id=1
value="cms_block_1"
entity_id=3

When saving this category on Admin (changing an attribute, ex), this value is change in just one store:

attribute_id=50
store_id=0
value="cms_block_2"

Context:

We have an separate docker container for Admin. Admin has in ip: (x.x.x.x) and Frontend (y.y.y.y) but they share the same DATABASE.

So in frontend, Magento get store_id=1 and in when editing a product on backend they get store_id=0.

How this problem can be solved?


texts: Magento 2 apply promotion with specific dates without coupon code?

texts:
Is this possible? It appears that you can auto-generate codes and have them expire within a certain date range. That appears to work fine.

Additionally, magento docs says you can add a specific coupon and have it start and end at anytime.
http://docs.magento.com/m2/ce/user_guide/marketing/price-rules-cart-coupon.html

Although this has never worked for me because the to and from range are always grayed out when i try this? Perhaps i'm doing something wrong?

Although it would be nice to know how to work specific coupons within a date range. I would be happy knowing that we can apply a promotion without any time of coupon just for a specific time period. Hope that makes sense. I look forward to your responses. Thank you.


texts: Hit a curl request at the time of add to cart in magento 2?

texts:
I want to hit an external curl request at the time of add to cart click in magento 2.
Based on that result product will be added or not in cart How will i hit curl on add to cart click ?


texts:
I had created tag called test in Magento but its default url is like tag/product/list/tagId/1/ but i need the url  to be like the tag/test.

I tried magento-tag-url-rewrite-and-generate and magento-tag-url-rewrite, but it returns 404 page not found on accessing the url like tag/test.

Please Help Me.

Thanks in Advance


texts: Modify tax rate on cart quote items and recalculate

texts:
I have a category of products which (legally) need to have their tax rate changed when you are ordering more than a certain quantity. I have extended the various tax models to get this working when you add a new product to the cart, but I am having problems when the user updates the quantities in the cart or adds additional products which tip the quantities already in the cart over the threshold amount.

Problem 1:

First of all, I'm not 100% which event(s) to observe. I've tried the following;

checkout_cart_save_after (based on this -> https://stackoverflow.com/questions/14362702/magento-programatically-update-cart-via-event)

checkout_cart_update_items_after (based on this -> https://stackoverflow.com/questions/5104482/programmatically-add-product-to-cart-with-price-change)

sales_quote_save_before (based on this -> https://stackoverflow.com/questions/7638858/magento-recalculate-cart-total-in-observer)

Problem 2:

I am able to access the quote items from the cart, there are loads of ways to do that it seems.  I am also able to iterate through the individual items in the cart, update properties of those items and then save the items (at least temporarily).  However, I am not then able to
save the quote and recalculate the taxes in the checkout.

Part of the reason is that whilst I can access the cart quote, I am not sure which method to use to be able to write to it.

What I Have Tried:

What I've tried in terms of accessing the contents of the cart has depended on the event I've observed but I've tried all of the following;

1.
$item = $observer->getQuoteItem;

2.
$cart = Mage::getSingleton('checkout/cart');
$cartItems = $cart->getCart()->getItems();

3.
$cart = $observer->getData('cart');
$quote = $cart->getData('quote');
$cartItems = $quote->getAllVisibleItems();

4.
$cartHelper = Mage::helper('checkout/cart');
$cartItems = $cartHelper->getCart()->getItems();

5.
$quote = Mage::getModel('checkout/cart');
$cartItems = $quote->getItems();

The one that seems to be at least allowing me to access the quote, run through them and update the items is

6.
$quote = Mage::getSingleton('checkout/session')->getQuote();
$cartItems = $quote->getAllVisibleItems();

This allows me to update each quote item when I iterate through (I believe using magic setters as I can't find any corresponding methods).  I was hoping to be able to update the Tax Class ID for the quote item and then recalculate the taxes.  If I use the following (where $taxClassId is different to the one already used by each quote item);

$item->setTaxClassId( $taxClassId );
$item->getProduct()->setIsSuperMode(true);
$item->save;

And then log the results;

Mage::log($item->debug(), null,'taxobserver.log', true);

It shows that I have indeed updated this quote item and changed the tax ID.  However, if I then follow through and try to save the modified quote;

$quote->setTotalsCollectedFlag(false)->collectTotals();
$quote->save();

And then debug again;

Mage::log($item->debug(), null,'taxobserver.log', true);

My changes have not been saved, the quote item change has been reset and the cart totals are not recalculated.  Starting to wonder if finding a tall building to jump off might be the solution for this one.


texts: Is there any extension available for Wechat share in Magento2?

texts: Is there any Magento 2 extension available for wechat share?


texts: What is Difference Between Field, Argument and Item in Magento 2

texts:
I am not cleared about field,argument and item. Also I don't know why we use it.

Xml code is:

<field name="allow_shipping_method">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">Magento\Shipping\Model\Config\Source\Allmethods</item>
            <item name="config" xsi:type="array">
                <item name="formElement" xsi:type="string">multiselect</item>
                <item name="source" xsi:type="string">myform</item>
                <item name="dataScope" xsi:type="string">allow_shipping_method</item>
                <item name="label" xsi:type="string" translate="true">Allow Shipping Method</item>
            </item>
        </argument>
    </field>

I already study some articles but I am not cleared all about this.

Articles Links:https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html

Magento 2 pass argument in class from ui component


texts: How customize cart view page in magento 2

texts:
I tried to create a layout and phtml template and a block for add something to cart view page.

I added something, but When I want to choose referenceBlock the content disappear.

Actually I'm going to add some column like price and number to cart table view, but I think it could not find the block! I appreciate any help of you

Here is my code:

  MagenCheckout/CheckoutField/Block/Productpoint.php`

<?php

namespace MagenCheckout\CheckoutField\Block;

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

   public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    array $data = [])
    {
       parent::__construct($context, $data);
    }
}

  MagenCheckout/CheckoutField/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="MagenCheckout_CheckoutField" setup_version="0.0.8">
    <sequence>
        <module name="Magento_Customer"/>
    </sequence>
</module>

  MagenCheckout/CheckoutField/view/frontend/layout/checkout_cart_index.xml

<?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">
   <body>
    <referenceBlock name="checkout.cart.form">
        <block class="MagenCheckout\CheckoutField\Block\Productpoint" name="cart_item_addional_info" template="MagenCheckout_CheckoutField::checkout/cart/productpoint.phtml"/>
    </referenceBlock>
   </body>
</page>

  MagenCheckout/CheckoutField/view/frontend/templates/checkout/cart/productpoint.phtml

<p>
   <?php echo 'Your Discount'; ?>
</p>

  MagenCheckout/CheckoutField/registration.php

<?php

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


texts:
I have below JSON Data for rest API
{"region_id":"475","city":"city","item":[{"qty":"1","weight":"","price":"10.0000","sku":"test"}]}
and i wann to create api class

I do like this

/**
 * @api
 * @param string $city
 * @param string $region_id
 * @param array $item
 * @return [].
 */
    public function estimate($city,$region_id,$item);

But return Class array does not exist also I use string [] and I get the same error. How I can pass an array as parameters?


texts: Where is the location of function which is called by this link "admin/catalog_category/tree/store/17/id/588/?isAjax=true"

texts:
I am working on multi website sub admin functionality.When i go to manage categories page and switch between websites an ajax call is working for the same.Which is call lime this link

admin/catalog_category/tree/store/17/id/588/?isAjax=true

i want to get where function is written for this.


texts: Duplicate order confirmation emails when checking out with PayPal Express

texts:
We are having an issue with duplicate order confirmation emails being sent when customer's checkout with PayPal Express.  We are using Magento 2.2.5

Here's what I've found so far, bare with me as I provide some context.  We have an issue with the FROM not being set on emails since 2.2.4, so we applied this fix suggested in the bug report found here.  This works and our emails were once again sending, but now we've noticed that customer's who checkout using PayPal receive duplicate confirmation emails.  When I disable the module, they no longer receive duplicate emails, however the emails often are rejected by mail servers because of the missing FROM.  If I take the code from that module and modify the core files directly, the FROM gets properly set and the customer only receives one confirmation email.

So why then when I use this module am I receiving duplicate emails?

I ran the code through xdebug placing a breakpoint at the start of the function in the following overwrite.

<?php

namespace TMP\MageFix224\Rewrite\Sales\Model\Order\Email;

class SenderBuilder extends \Magento\Sales\Model\Order\Email\SenderBuilder
{
    /**
     * Configure email template
     *
     * @return void
     */
    protected function configureEmailTemplate()
    {
        $this->transportBuilder->setTemplateIdentifier($this->templateContainer->getTemplateId());
        $this->transportBuilder->setTemplateOptions($this->templateContainer->getTemplateOptions());
        $this->transportBuilder->setTemplateVars($this->templateContainer->getTemplateVars());
        /*Send From Email Issue #14952*/
        $this->transportBuilder->setFromByStore(
            $this->identityContainer->getEmailIdentity(),
            $this->identityContainer->getStore()->getId()
        );
    }
}

When I completed a checkout, this chunk of code was ran twice in seemingly two separate calls.  Here are screenshots of the call trace

This happens every time you checkout with PayPal, but again if I disable the module I mentioned at the top, and run xdebug with a breakpoint in the original class function call, I do not see this behavior.  And if I copy and paste the code needed for the fix into the original core files, I also do not see this behavior.

So here is where I'm stuck.  I'm not sure why Magento is repeating a whole request just because I have a module that overwrites a core file using a preference in a di.xml file.


texts: Magento - How can I disable cache for widget or block

texts:
I need some help on caching issue in CMS block.

I have developed a new product slider for store front that displays latest products in the home page this works great when cache is disabled but when i enable the cache add to cart button is not working, as all the formkey is cached in the block. (P.s. Magento FPC and compilation are enabled)

The widget config as:

{{widget type="catalog/product_widget_new" display_type="all_products" show_pager="1" products_per_page="5000" products_count="5000" template="catalog/product/widget/new/content/new_grid.phtml"}}

Then I include it in the home page like:

<block type="wrapper" name="section.no1">
    <action method="setContainer">
        <container>1</container>
    </action>
    <block type="cms/block" name="best_deals" >
    <action method="setParams">
        <params>class="best_deals"</params>
    </action>
    <action method="setBlockId">
            <block_id>best_deals</block_id>
        </action>
</block>

I have tried..

<action method="setCacheLifetime"><s>0</s></action>

and

<action method="setCacheLifetime"><s>null</s></action>

even..

<action method="unsetData"><key>cache_lifetime</key></action>
<action method="unsetData"><key>cache_tags</key></action>

None of them take effect. Perhaps I'm missing something?

Update:
I solved the issue by adding $this->setCacheKey(uniqid()); to my template file.


texts: Segregate products in categories according to popularity

texts:
I would like to segregate "out of style" items to go at the bottom of each category, all dependable on the popularity of the product or sold amount.

Basically, the most selling products to be at the top of the category.

Is there any easy way of doing it? What are the options?


texts: Start new quote session after completing order programmatically

texts:
I am trying to create order programmatically by extending Mage::app() into my external folder.

I can able to create an order successfully. But after creating an order my quote is not getting expired. Next order is also created with same quote_id.

To avoid this I tried below,

            $order->sendNewOrderEmail();

            $quote->setIsActive(0);
            $quote->save();

But this remove the whole record from sales_flat_quote table.

How can I start next order with new quote?


texts: how to use value of jquery variable in phtml file in magento2

texts:
I want to use variable in phtml file which is in jquery. I want to use this abc variable in phtml file. How to use it?

var abc = $('#limiter option:selected').val();


texts: Why does Magento 2 use PHP to compile less files?

texts:
What I don't understand is that since the .less files are already going to be compiled during development through Grunt, why does Magento 2 still uses oyejorge/less to compile less files through PHP?

Other than the themes, are there anywhere else in Magento that uses .less css files?


texts: Magento 2.x I want to check cart price rule is eligible or not without quote, quote item or product

texts:
I have a collection of cart price rules. Now I want to validate the rule without a quote, quote item, or any product. If it's valid then I want to do some customize based on it, or not then I want to skip that rule.
Thanks in advance.


texts: Magento 2 - Update foreign key default to null in UpgradeSchema

texts:
I created a foreign key in install schema for my custom table like this:

$custom_table->addColumn(
    'customer_id',
    \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
    null,
    ['nullable' => false,'unsigned' => true],
    'customer_id'
);

I set the nullable to false, now I want to make this foreign key column can take null as its value.

How can I set this in UpgradeSchema?


texts:
I want to echo an attribute only if the specific product is in an category.
I use this code on the productpage.
So I need a line that checks if the product is inside a category and if so, that do this.
I tried this, but that did not work:

<?php $yourCatIds = array(1,2,3...);
$productCats = $_product->getAvailableInCategories();

if (count(array_intersect($yourCatIds,$productCats))) {
    <?php echo($_product->getData('attributecode')) : ?>
}
?>

EDIT:

<?php $yourCatIds = array(235);
$productCats = $_product->getAvailableInCategories();

if (count(array_intersect($yourCatIds,$productCats))) {
    echo '
' . $_product->getData('i_processor_family_2196_1') . '
';
echo '
' . $_product->getAttributeText('i_processor_family_2196_1') . '
';
}
?>

How can I change this code by adding
 and  tags?

What code do I need for this?


texts: How to improve Performance of website according to google new Algorithms

texts: Recently google has changed and updated its algorithms for SEO, that is why GTmertix changed its reporting.


texts: ui components and dataProvider file for a simple upload file functionality in your custom module

texts:
In my module there is a link for an import and then the user should arrive to something like this:

Where they are able to upload a file and then click the import file button and then that file updates some products.

I'm struggling with the ui_components and DataProvider files.

I don't even know if a DataProvider should be needed for something like this but if I don't include it in ui_components then it throws an error.

All of my import logic is done in an importFile.php that should get called by the submit_url.

ui_component/module_form.xml:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">module_form.stores_form_data_source</item>
            <item name="deps" xsi:type="string">module_form.stores_form_data_source</item>
        </item>
        <item name="label" xsi:type="string" translate="true">Store Information</item>
        <item name="config" xsi:type="array">
            <item name="dataScope" xsi:type="string">data</item>
            <item name="namespace" xsi:type="string">module_form</item>
        </item>
        <item name="template" xsi:type="string">templates/form/collapsible</item>
    </argument>
    <dataSource name="stores_form_data_source">
        <argument name="dataProvider" xsi:type="configurableObject">
            <argument name="class" xsi:type="string">Module\Path\DataProvider</argument>
            <argument name="name" xsi:type="string">stores_form_data_source</argument>
            <argument name="primaryFieldName" xsi:type="string">file_id</argument>
            <argument name="requestFieldName" xsi:type="string">file_id</argument>
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="submit_url" xsi:type="url" path="module/path/importFile"/>
                </item>
            </argument>
        </argument>
        <argument name="data" xsi:type="array">
            <item name="js_config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
            </item>
        </argument>
    </dataSource>
    <fieldset name="stores_main">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string"/>
            </item>
        </argument>
        <field name="import">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">stores</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                    <item name="previewTmpl" xsi:type="string">module/file-preview</item>
                    <item name="required" xsi:type="boolean">true</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

I'm not sure how Module\Path\DataProvider should look like. I thought there would be one created in the products module: Magento\Catalog\Model\Product\DataProvider but there isn't.

Any ideas?


texts: Admin new order create payment methods not showing

texts:
If we create new order from admin, we are not able to see the payment methods http://prntscr.com/fonc01

But while when order from frontend, payment methods are showing fine.

can any help me on this issue.

thanks


texts: how to make noindex nofollow for login page

texts:
I want to make noindex nofollow for login page, i tried

 <customer_account_login translate="label">
        <label>Customer Account Login Form</label>
        <!-- Mage_Customer -->
        <remove name="right"/>
        <remove name="left"/>
      <!--   <remove name="header"/>
        <remove name="footer"/> -->

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
        </reference>
        <reference name="head">
            <action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action>
        </reference>
    </customer_account_login>

But it is not working, can any one suggest how to make no index no follow for login page


texts: How can i add a extra form on checkout page?

texts:
I would like to be able to add some forms in the checkout page, saving the information in the BD. I have Magento 2.2.4

How could I do it? Where is the file that I would have to modify?

Thanks!


texts:
Update

This is not a duplicate of this.
I've referenced that question, but it didn't give me what I looking for.

I need to create a file with specific data on customer. I tried few methods I found on here, but no luck. I need to get information as follows,

    <Adress>
        <StreetAddress1></StreetAddress1>
        <StreetAddress2></StreetAddress2>
        <City></City>
        <Country></Country>
        <County></County>
        <PostCode></PostCode>
    </Adress>

I need to get these info using ObjectManager. I lnow it's not the best way, bou for now, I only able to use it.

Update
I need to call these from external file, not as a module or a plugin. So I cannot use any block methods. Only possible way if for me is using the Object Manager directly. But the problem is all the methods I've tried failed.

This below is the code from the answer you guys said my question is duplicate of,

$customerId = $_POST["customer_id"];
$customer = $this->_customerRepository->getById($customerId);
$addresses = $customer->getAddresses();

but since I'm on outside PHP script, I cant use $this->_customerRepository or $customerRepository . I'm relatively new to Magento. So I'm not sure how to get things done most of the time.


texts:
I wanted to work on my magento site today and I couldn't get into the admin panel. When I login I get the following screen:

It looks like it doesn't load the content or something I think. Is someone familiair with this problem?

Thanks in advantage!

Bjorn


texts: Custom field in onepage checkout - how to save to database

texts:
I am trying to add a custom field containing the deliverydate to the checkout of Magento. However I have problems saving it. I have added the field to the shipping_method page and set up an observer in the config.xml:

<frontend>
    <events>
        <controller_action_predispatch_checkout_onepage_saveShippingMethod>
            <observers>
                <mymodule_deliverydate>
                    <type>model</type>
                    <class>mymodule_deliverydate/observer</class>
                    <method>saveDeliverydate</method>
                </mymodule_deliverydate>
            </observers>
        </controller_action_predispatch_checkout_onepage_saveShippingMethod>
    </events>

</frontend>

Also, the quote to order conversion is set up in the config.xml:

<global>
....
<fieldsets>
            <sales_convert_quote>
                <deliverydate>
                    <to_order>*</to_order>
                </deliverydate>
            </sales_convert_quote>
        </fieldsets>
</global>

I have added a field deliverydate to the sales_flat_order table ( and sales_flat_quote but Im not too sure if that was necessary) and set up the observer function like this:

public function saveDeliverydate($observer)
    {

    $order = $observer->getEvent()->getOrder();

    $deliverydate = Mage::app()->getRequest()->getPost('deliverydate');

    if(!empty($deliverydate))
    {
        $order->setDeliverydate($deliverydate);
    }
}

However when the order has been placed, the field is empty in the database. What am I missing?


texts: How to Add A Widget Instance to Specific CMS Pages

texts:
In the backend under Widget instances it is possible to add a widget to certain pages, for example to specific categories.

How can I add one instance to some specific CMS pages?

In the Layout Updates section I choose Page -> Specific Page, but I can only choose "CMS Pages (All)" -  there is no option to choose - for example - certain page identifiers.


texts: magento show product detail page for logged only

texts:
i want to show product detail page to logged in user only how can i do this ?? user will be redirected to login page if he is not logged.

I guess if any way so that i can do it via created a custome .phml file and called it to header of product info (custom deign of category section )


texts:
I have the following custom xml inside of my Magento_theme > layout > default.xml

<referenceBlock name="top.links">

            <block class="Magento\Framework\View\Element\Html\Link" name="contactus.link"  after="my-account-link">
                <arguments>
                    <argument name="label" xsi:type="string" translate="false">Contact Us</argument>
                    <argument name="path" xsi:type="string" translate="false">contact-us</argument>
                </arguments>
            </block>

            <block class="Magento\Framework\View\Element\Html\Link" name="aboutus.link" after="contactus.link">
                <arguments>
                    <argument name="label" xsi:type="string" translate="false">About Us</argument>
                    <argument name="path" xsi:type="string" translate="false">about-us</argument>
                </arguments>
            </block>

            <referenceBlock name="register-link" remove="true" />
            <referenceBlock name="authorization-link" remove="true" />
            <referenceBlock name="wish-list-link" remove="true" />
            <reeferenceBlock name="my-account-link" remove="false" />

        </referenceBlock>

Im removing blocks and adding custom ones in.

What I'd like to to is add a class to the two custom blocks - aboutus.link and contactus.link - how do i go about doing this? Or can it not be done with xml.


texts:
I cannot login to Magento 2 admin due to the fact it is installed on 127.0.0.1:8080. This is an imported site and not a fresh install.

I have changed cookie domains to reflect the correct paths but still no admin access.

Anyone have any ideas?


texts: Fatal error: Class 'Mage_Inspiresettings_Helper_Data' not found Tried a lot, but still the error comes

texts:
Fatal error: Class 'Mage_Inspiresettings_Helper_Data' not found in
  /home/inpxcare/public_html/brandz/app/Mage.php on line 547

Currently my Data.php contains

<?php

class Magik_Inspiresettings_Helper_Data extends Mage_Core_Helper_Abstract {}
{

    protected function _loadProduct(Mage_Catalog_Model_Product $product)
    {
        $product->load($product->getId());
    }

        public function getLabel(Mage_Catalog_Model_Product $product)
    {
        $html = '';
        if (!Mage::getStoreConfig("inspiresettings/inspiresettings_labels/new_label") &&
            !Mage::getStoreConfig("inspiresettings/inspiresettings_labels/sale_label") ) {
            return $html;
        }

        $this->_loadProduct($product);

        if ( Mage::getStoreConfig("inspiresettings/inspiresettings_labels/new_label") && $this->_isNew($product) ) {
                        $html .= '
 '.Mage::getStoreConfig('inspiresettings/inspiresettings_labels/new_label_text').'
';
                }
                if ( Mage::getStoreConfig("inspiresettings/inspiresettings_labels/sale_label") && $this->_isOnSale($product) ) {
                        $html .= '
 '.Mage::getStoreConfig('inspiresettings/inspiresettings_labels/sale_label_text').'
';
                }

        return $html;
    }

        protected function _checkDate($from, $to)
    {
        $date = new Zend_Date();
        $today = strtotime($date->__toString());

        if ($from && $today < $from) {
            return false;
        }
        if ($to && $today > $to) {
            return false;
        }
        if (!$to && !$from) {
            return false;
        }
        return true;
    }

        protected function _isNew($product)
    {
        $from = strtotime($product->getData('news_from_date'));
        $to = strtotime($product->getData('news_to_date'));

        return $this->_checkDate($from, $to);
    }

        protected function _isOnSale($product)
    {
        $from = strtotime($product->getData('special_from_date'));
        $to = strtotime($product->getData('special_to_date'));

        return $this->_checkDate($from, $to);
    }
}

Added the class in /app/code/local/magik/Inspiresettings/etc/config.xml without space and case-sensitive

<global>
      <helpers>
        <Inspiresettings>
          <class>Magik_Inspiresettings_Helper</class>
        </Inspiresettings>
      </helpers>
    </global>

Code in app/Mage.php on line 547 is

/**
     * Retrieve helper object
     *
     * @param string $name the helper name
     * @return Mage_Core_Helper_Abstract
     */
    public static function helper($name)
    {
        $registryKey = '_helper/' . $name;
        if (!self::registry($registryKey)) {
            $helperClass = self::getConfig()->getHelperClassName($name);
            self::register($registryKey, new $helperClass);
        }
        return self::registry($registryKey);
    }


texts: How to change currency symbol OR add own currency

texts:
Is there a way to add an own currency? Like "Points".

I tried to write a plugin to intercept after \Magento\Directory\Model\PriceCurrency::getCurrencySymbol but it seems, that this method is not used to format price for frontend.

My Plugin looks like

class PluginAfter
{

/**
 * @param string $interceptedInput
 * @param string $interceptedOutput
 *
 * @return string 'Points'
 *
 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
 */
public function afterGetCurrencySymbol($interceptedInput, $interceptedOutput)
{
    die('getCurrencySymbol'); // not triggered

    return __('Points');
}

So i tried to intercept \Magento\Directory\Model\PriceCurrency::getCurrency
but there is no option to set new currencysymbol

Any suggestions?


texts: Adding Country of Origin and HS Code to email Invoice?

texts:
I'm trying to style all of our company's order, invoice and shipping email.
I need to add "Country of Origin" and "HS Code" attributes on to the invoice email.

How can I put these custom attributes in the email templates?


texts: Magento 1.9.3.4 PHP Fatal error: Call to a member function refund() on null

texts:
When I am about to issue a credit/refund, I go to the Invoice > Credit Memo and try to > Refund Online, then I receive a fatal error 500.

Looking in error_log this is the record:

  PHP Fatal error:  Call to a member function refund() on null in
 /app/code/core/Mage/Sales/Model/Order/Payment.php on line 693

Here is the code in question from that file: (starting from line 680-703)

    if ($gateway->canRefund() && $creditmemo->getDoTransaction()) {
        $this->setCreditmemo($creditmemo);
        $invoice = $creditmemo->getInvoice();
        if ($invoice) {
            $isOnline = true;
            $captureTxn = $this->_lookupTransaction($invoice->getTransactionId());
            if ($captureTxn) {
                $this->setParentTransactionId($captureTxn->getTxnId());
            }
            $this->setShouldCloseParentTransaction(true); // TODO: implement multiple refunds per capture
            try {
                $gateway->setStore($this->getOrder()->getStoreId())
                    ->processBeforeRefund($invoice, $this)
                    ->refund($this, $baseAmountToRefund)  //LINE 693 joell
                    ->processCreditmemo($creditmemo, $this)
                ;
            } catch (Mage_Core_Exception $e) {
                if (!$captureTxn) {
                    $e->setMessage(' ' . Mage::helper('sales')->__('If the invoice was created offline, try creating an offline creditmemo.'), true);
                }
                throw $e;
            }
        }
    }

Appreciate any input


texts: I Need details about virtual products(examples) in magento2 and how to user(customer) use that product after purchase?

texts:
I learned and understand about the simple,configurable,grouped,bundle and downloadable products but the I need some clarification about the virtual product in magento2.
I understand the downloadable product that is selling a link(E-book,song,video...etc) after purchase customer link to download the product.
But I don't know about Virtual-Products?
I Need to know---customer After purchase any Virtual-products How to use that product?


texts: How to create REST API in magento after configuring REST Roles , OAuth Consumers and Users with that role?

texts:
I am not that much aware of API. I have created REST Roles and OAuth Consumers. After that i have created New user and assign that role to that user.

I know that I need to create one php or xml file.

But I don't know how to start and where to start.

I need to create API for following cases for third-party app:

1... Product Master

1) Fetching the product data from E-comm site.
-> First time the product information from the E-commerce site will be downloaded using the service in 3rd Party app database.

2) Product management.
-> Product will be directly downloaded and cloned into the database of 3rd Party app CMS. Manually 3rd Party app will map the products with the categories.

3) Service call identification
-> Service call identification to be done with the timestamp. Every time when 3rd Party app requests the product data will pass the timestamp sent by the E-commerce site from previous call. Using this E-commerce site will identify which products were shared in last call and will only pass the updates post last timestamp.

2... Order Request

1) Order processing
-> 3rd Party app will complete the order processing along with the payment on app. Service call will be made to E-commerce site indicating that respective order has been placed for x products.

2) Order log
-> 3rd Party app will store the log of each order for future reference.

3... Order Tracking

1) Order tracking
-> Once the order is processed at E-comm site (received from the 3rd party app) E-commerce site should consume the service provided by the 3rd party app to share the tracing information along with mail body.

2) Sharing tracking information with buyer
-> 3rd party app will be sharing the information received using the service on email as a notification to the user.

3) Manual tracking
-> 3rd party app user may choose to check the delivery status real-time using the app.

Please help or give some useful hint asap.


texts: Currency symbol is changing but value does not change

texts: In my work the curreny symbol is changing when i change the currency but the value remains same


texts: Please suggest best solutions for API Authentication in magento 2

texts:
I am using OAuth based authentication,

But Its Showing

{“message”:”Consumer is not authorized to access %resources”,”parameters”:
{“resources”:”Magento_Customer::customer”}

I am getting above error, Please try to resolve it

We are using below code

Please check screenshot

or you can see answer 6 code for OAuth-based authentication

Magento 2 REST API usage with examples


texts: Magento2 Multiple Blocks returns same object

texts:
{{block class="Class_path" name="xyz" template="Package_Module::file.phtml" id="6"}}

{{block class="Class_path" name="xyz" template="Package_Module::file.phtml" id="7"}}

{{block class="Class_path" name="xyz" template="Package_Module::file.phtml" id="8"}}

I have used these three blocks in my CMS page but when I get the id, I am always getting 6

What I understand from this is my first block is stored or cached and its always returned

I changed the block name to different values but got the same result.

I changed the values to this and still getting the same result.

 {{block class="Class_path" name="xyz1" template="Package_Module::file.phtml" menuid="6"}}

 {{block class="Class_path" name="xyz2" template="Package_Module::file.phtml" menuid="7"}}

 {{block class="Class_path" name="xyz3" template="Package_Module::file.phtml" menuid="8"}}


texts:
Our category URL in the backend is empty. But our sites work fine with the value that was there before. If I create a new category then I do see the URL key value. What can be causing this?

New category=URL key
Old category=no URL key empty

We investigated catalog_category_entity_varchar and saw that many category values were duplicated on a lower (store hierarchy) level. Strange.

Help or clues appreciated


texts:
I have been having problems with my URL's once six months ago and again now, but before it was issues in daylilies for sale. Now this time its for products under daylilies for sale. I am getting numbers as suffix in my products URLs like

http://www.decadentdaylilies.com/daylilies-for-sale/shades-of-havana-18.html
when the URL should read
http://www.decadentdaylilies.com/daylilies-for-sale/shades-of-havana.html

not Same product with different number for different category:

May I know the reason for that? How it is being done? And What part of Magento does that?


texts: Error when trying to install extension from Marktplace

texts: I got this error when trying to installa an extension from markteplace


texts: Magento 2 How to Disable product status if salable quantity is zero?

texts:
I want to disable the product in frontend when its saleable quantity is Zero.
please help me about this?


texts: The variables for a UI library component are not found

texts:
I want to use UI library _tooltip.less component. I have a custom checkout.less file where I'm importing the component this way

@import "source/_tooltips.less";

However for some reason the the lessc compiler throws an error because it can't find variables. Here is the error.

  NameError: variable @color-white is undefined in
  /Users/dmitry/Code/MyMagento/var/view_preprocessed/pub/static/frontend/MyTheme/default/en_US/css/source/lib/variables/_tooltips.less
  on line 10, column 23:
  @tooltip__background: @color-white;

Please advise. Thanks


texts: Where is "Row total" defined in the Magento code?

texts:
On the sales order view screen in the backend of Magento 1.9, the products are listed as well as any discounts, GST etc. I need to know how this row total figure is calculated but am having trouble finding the file where this figure is calculated.

Does anyone know what file the calculation for "Row Total" is defined?


texts: Coming from PrestaShop to Magento CE: How to handle links already in Google/Bing Index?

texts:
So I want to exchange my PrestaShop installation for Magento CE.

I currently have more than 600 pages in the Google & Bing Indexes, managed by using XML sitemaps and the Google/Bing Webmaster Tools.

Using Magento will result in a different URL format (and I don't even want to keep the PrestaShop URL scheme), so all already indexed pages will have to be updated or redirected.

What is the best solution to handle this without loosing page ranks and negative side effects?


texts: How to set custom price for quote item in checkout_cart_add_product_complete event

texts:
I have two event observer in my custom module :

// 1st : checkout_cart_product_add_after
    $item = $observer->getQuoteItem();
    $item->setIsNew(true);

// 2nd : checkout_cart_add_product_complete
    $quote = Mage::getSingleton('checkout/cart')->getQuote();
    $quote_id = $quote->getId(); // quote_id
    foreach($quote->getAllItems() as $quote_item)
    {
        if($quote_item->getIsNew() == true)
        {
            $item = $quote_item;
        }
    }
    // here I want to set custom quote item price and tried below code but it is not working
    $item->setCustomPrice($current_tour_price);
    $item->setOriginalCustomPrice($current_tour_price);
    $item->getProduct()->setIsSuperMode(true);
    $item->save(); // updated

I want to set custom price to quote item in checkout_cart_add_product_complete event.

If I am using the code setCustomPrice and setOriginalCustomPrice in checkout_cart_product_add_after event then it is working.

But I need quote_id as well with dynamic price for some other use and I can't get quote_id in checkout_cart_product_add_after event, so I am using checkout_cart_add_product_complete event.

How to set quote item custom price in event checkout_cart_add_product_complete?

EDIT :
With $item->save() it save custom price for quote_item but on change currency custom price not going to update.

I also tried https://stackoverflow.com/a/38243913/4073217 but it is not working in my case.

How to set custom price for quote_item which work with currency change?


texts: Order data not showing in observer function

texts:
I am trying to create a handler for the Order place event using which I need to send the order data to some other table. I have created a module with config.xml and observer.php file. The handler function is called when order is placed, but the $observer objects does not return any order data.

My Sm/Sx/etc/config.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Sm_Sx>
            <version>0.1.0</version>
        </Sm_Sx>
    </modules>
    <global>
        <helpers>
            <Sx>
                <class>Sm_Sx_Helper</class>
            </Sx>
        </helpers>
        <events>
            <sales_order_place_after>
                <observers>
                    <Sm_Sx_Model_Observer>
                        <class>Sm_Sx_Model_Observer</class>
                        <method>create_sx_order</method>
                    </Sm_Sx_Model_Observer>
                </observers>
            </sales_order_place_after>
        </events>
    </global>
</config>

My Sm/Sx/Model/Observer.php is:

class Sm_Sx_Model_Observer
{
    public function __construct()
    {
        //Just constrcutor for fun :-)
    }

    public function create_sx_order(Varien_Event_Observer $observer)
    {

        $data = $observer->getData('Order');

        echo "<pre>";
        print_r($data);
        echo "</pre>";
        exit;

        return $this;
    }
}

I have tried using:

$data = $observer->getOrder();

And

$data = $observer->getEvent()->getOrder();

But nothing works. Any help would be greatly appreciated.


texts: Layered navigation $_filter->getHtml() returns empty string

texts:
I have the attributes correctly configured to be displayed for layered navigation. The attribute names are showing but the "attribute values" are not. $_filter->getHtml() simply returns empty strings (see pic).

I have an multi store and on my other stores the layered navigation is showing just fine. Magento 1.8.1.0


texts:
for example i have 3 product attributes color ,size ,location.

i do not want to enter product name instead of it should save combination of color,size,location.

product name. 'red color small in new york'

i need to use observer or plugin or back end model?

<?php
namespace Vendor\Module\Plugin;

class ProductName
{
    public function beforeSetName(\Magento\Catalog\Model\Product $product, $name)
    {

            return [$product->getColor().$product->getSize().$product->getLoc()];

    }

}


texts: Rewrite getProductUrl in product_viewed.phtml

texts:
How to rewrite getProductUrl() in template/reports/product_viewed.phtml ?

I tried using config.xml:

    <blocks>
        <catalog>
            <rewrite>
                <product_abstract>Vela_Product_Block_Product_Abstract</product_abstract>
            </rewrite>
        </catalog>

And

<?php
class Vela_Product_Block_Product_Abstract extends Mage_Catalog_Block_Product_Abstract
{
    public function getProductUrl($product, $additional = array())
    {
        return "weleeeh";
    }
}

but doesn't work.


texts: Magento 2 DOM validation exception when in developer mode

texts:
I'm running Magento 2.2.1 and Infortis Ultimo 2.5.1. When I'm in developer mode and I attempt to access a product page on the front end, I get the exception.

  Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'htmlTag': [facet 'enumeration'] The value '' is not an element of the set {'aside', 'dd', 'div', 'dl', 'fieldset', 'main', 'nav', 'header', 'footer', 'ol', 'p', 'section', 'table', 'tfoot', 'ul'}.
  Line: 1159

  Element 'referenceContainer', attribute 'htmlTag': '' is not a valid value of the atomic type 'htmlTagType'.
  Line: 1159

  Element 'referenceContainer', attribute 'htmlClass': [facet 'pattern'] The value '' is not accepted by the pattern '[a-zA-Z][a-zA-Z\d-_](\s[a-zA-Z][a-zA-Z\d-_])*'.
  Line: 1159

This is because the htmlTag and htmlClass attributes in app/design/frontend/Infortis/base/Magento_Catalog/layout/catalog_product_view.xml are not being set.

<!-- Reset attributes of main containers -->
<referenceContainer name="product.info.main" htmlTag="" htmlClass="" before="-" />
<referenceContainer name="product.info.media" htmlTag="" htmlClass="" after="product.info.main" />

When switching to production mode the page renders correctly as expected with no errors. I've tried running the following commands:

php -d memory_limit=512M bin/magento cache:clean
php -d memory_limit=512M bin/magento cache:flush
php -d memory_limit=512M bin/magento setup:upgrade
php -d memory_limit=512M bin/magento setup:di:compile
php -d memory_limit=512M bin/magento indexer:reindex

Error is still appearing when in developer mode as described above.


texts: How to create Add to cart button using Custom Module in Magento 2

texts:
I want to create Add to cart button using Custom module in product page,listing page and other page.Please advise me how to create this functionality.

Any help would be appreciated...

Thanks...


texts: How is js loaded and removed in Magento 2?

texts:
Inevitably, I'm trying to improve our Magento 2.3.0 Pagespeed score. Most of the damage is being done by the excess of unneeded/unwanted js files.
Is there any simple way to remove js such as calendar.js, tooltip.js etc? It appears tooltip.js is loaded by jquery-ui.js but I can't find where calendar is loaded using grep, any suggestions please?
I expect deleting/renaming the unwanted js files will result in errors at best and a non functioning website at worst?
Thanks


texts:
I searched through a number of posts but didn't quite see any specific to what I'm looking for - or at least not with a sufficient answer to what I need.

We are going to be selling a product with an option for a customization (imprinting).  Imprinting requires selecting a color and a font for the imprint, but the color and font are only relevant if the customer wants to add imprinting to the product.

Is it possible (using the existing Magento 2 gui tools) to have an option that will only display when another option is selected to a particular value, or will this have to be codified or otherwise done with an aftermarket plugin?

Another thing I considered was that I saw it supports both 'related products' and 'upsell' options. Presumably I could create a parallel configurable product description 'with' imprinting default and show it as some kind of an up-sell option on the product 'without' imprinting or the extra two options. But this leaves me to wonder if there is any kind of 'duplicate' or 'clone' product to create the starting point for the 'upsell' version without having to enter all the [shared] information again manually?


texts: Magento 2.3 - Getting error while sending mail n localhost

texts:
I have used the correct email id and password. Also, on the less secure option in there.

  error: true message: "5.7.8 Username and Password not accepted. Learn
  more at ↵ 5.7.8  https://support.google.com/mail/?p=BadCredentials
  s1sm36837704pgv.87 - gsmtp ↵"

I have added configuration as below ;

I have used below link to set up send mail functionality https://www.magepal.com/help/docs/smtp-magento/?utm_source=smtp&utm_medium=github#installation


texts: Newsletter subscribe confirmation plugin [Magento 2]

texts:
I'm writing a small plugin that intercepts the Subscriber class (Magento\Newsletter\Model\Subscriber), fetches the subscriber email address/id and pushes it further to our api.

This works well when the 'Need to Confirm' option is set to 'No'. However, when I enable the double opt-in and the confirmation email is sent and clicked, Magento completely ignores the 'SubscriberPlugin' file, even though it still actually uses the main, original class 'Subscriber' (proved by placing error_log(FILE) in the original class file).

I know that when a user clicks the confirmation link, the method triggered in the Subscriber class is confirm. With that knowledge I've added a new method afterConfirm to the SubscriberPlugin file, but that for now will do nothing, as like mentioned above, Magento is ignoring the plugin file when a user confirms subscription.

Any ideas?


texts: Can't change magento attribute frontend properties

texts:
I've added a custom attribute: year and have imported some products that use that attribute. I now want to change the Used in Layer Navigation from Filterable to No, but every time I save, it just pushes me to the attributes list page and the change isn't saved. Tried changing other fields - same issue. It's not a System attribute.

How do I fix this/get around it?


texts: how to get all coupon code which can apply on cart page in magento 2

texts:
How to get all coupon code which can apply on cart page in magento 2

$getRules = $objectManager->create('Magento\SalesRule\Model\Rule')->getCollection();

using the above code i get the all list of coupon codes. I want to display coupon code which can apply


texts:
I have created a custom tab in Sales Order View in Magento admin panel.
On clicking the tab, I need to fetch the details from a table called as "sales_flat_sub_order".


texts: How do i remove unused css from magento 2 homepage?

texts:
I am not getting good performance when i audit my website with chroome lighthouse. I am getting few errors like
- Remove unused CSS
- Ensure Text Remain Visible during web front load
- Minimize main threat work

Please anybody help  me fixing these little things.


texts: Region dropdown based on country dropdown at the product detailed page

texts: Hi i want to display  state drop down based on country select in magento product from in admin can any one please given an idea how to do this. i have googled it but in vain.


texts: How to change colour based on selection?

texts:
I was wondering how to change the image being displayed to a specific colour when it is selected?

I tried changing the labels but that didn't work out. Is there some settings in the system that I have to change?


texts:
I have created a grid and in one of the columns I want to show the full path of the product url that we can go to the product currently i did this in grid.php:

protected function _prepareCollection()
    {
        $store = $this->_getStore();

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

            ->addAttributeToSelect('url_key');
//some code
}

and for the index I used it :

   protected function _prepareColumns()
    {

     $this->addColumn('link',
            array(
                'header'=> Mage::helper('catalog')->__('link'),
                'index'=>'url_key'
        ));
//somecode
}

is there any clean way so that instead of just the url key i will have the whole url in there?
I want it to be www.domain.com/urlkey rather than just the url key


texts: SQL to get customer emails by attribute set of products bought

texts:
@I would like to export a list of customer emails who have bought a product belonging to a specific attribute set.

Im unsure on where to gather the customer email informaiton from


texts:
I have tried so many times to create a simple way by creating CMS block to show the "Free Shipping Eligible Message for Adding Certain Amount in Cart" but I didn't get it yet.

Could you please help me out how I can show the Free Shipping Eligible Message on Checkout Page in top. Please check my images and please give the clear instruction with files and code here.

Thanks in Advance


texts: magento 2 Warning: Illegal offset type in xxxx\vendor\magento\module-catalog\Model\CategoryRepository.php on line 133

texts:
I am enable magento 2 admin cache then product view page not working show warning but i am disable cache then working fine,
warning see the following screenshot
Warning: Illegal offset type in xxxxxx\vendor\magento\module-catalog\Model\CategoryRepository.php on line 133


texts: I want to upgrade our Magento 2.1.0 instance to 2.1.4. Unfortunately I can't use the System Upgrade from the backend and I can't use composer. Both aren't working because of old TLS versions or old CURL versions. Because of various reasons I can't do anything about this. Is it possible to upgrade Magento 2 manually by simply downloading the archive and overwriting the files?


texts: How to export all URL rewrites in a CSV?

texts:
I would like to export all my URL rewrites in a CSV, via Magento 2 admin panel I can't do it. I followed this guide below but I didn't find anything native.
https://docs.magento.com/user-guide/marketing/url-rewrite.html
How could I export it via CSV directly from the database?


texts: Magento 2 How can I show custom options on product list page

texts: I am trying to display custom options in product list page. Can any one give me idea how can I achieve this?


texts:
I am watching this error in my nginx(fpm-php7.1.web.log) file.Can anyone help me why this is error occurs and how we resolved it.
The complete error is:
[31-Aug-2020 04:21:05 UTC] PHP Fatal error:  Uncaught Error: Class 'Magento\Framework\Stdlib\Cookie\PublicCookieMetadata' not found in /home/www/comptoirdespros.com/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array)
#1 vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Framewo...', Array)
#2 /vendor/magento/framework/Stdlib/Cookie/CookieMetadataFactory.php(54): Magento\Framework\ObjectManager\ObjectManager->create('Magento\Framewo...', Array)
#3 vendor/magento/framework/Session/SessionManager.php(217): Magento\Framework\Stdlib\Cookie\CookieMetadataFactory->createPublicCookieMetadata()
Magento Version: 2.2.6


texts:
I'm trying to reduce the number of request, so I take a look only and these are the solution to move the media folder:

Use a file server
Use a CDN
I have no clue on how to achive the first method and I doubt I can even use it on a shared server, so I have unseccessfuly adopted the second one.
I don't understand how CDN works, but I have tried to set up one to store the media folder
Server structure:

mysite.com
  public_html
    shop -> magento folder
      media

What I have done:

Created a subdomain called: media.mysite.com with root in public_html/shop/media
CNAMED it to mysite.com
Activated Cloudflare,result:

CNAME   media.farmaciacaloini.com   points to media.farmaciacaloini.com.cdn.cloudflare.net

Magento->Admin->System->Web->Non Secure

Base Media
URL=http://media.farmaciacaloini.com.cdn.cloudflare.net/media/

Unfortunately I can't see any image ony frontpage


texts: Magento 2 - Load custom javascript with requirejs

texts:
The Problem

I want to use custom JavaScript in Products/Inventory/Catalog page to modify the "Add Product" button behavior and hide some fields in product edit form (where the SKU, weight, name, qty, etc, of a product, is shown) as well.

What I've Done

For that reason, I've created an admin theme as described in this question: How to create admin theme for Magento2

The admin theme was successfully created and all static content was generated without problems. After that, I tried to load my custom js in all admin pages by doing the following:

In design/adminhtml/myvendor/mytheme/Magento_Theme/adminhtml/layout/default_head_blocks.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">
    <head>
        <script src="js/customAdmin"/>
    </head>
</page>

In folder design/adminhtml/myvendor/mytheme/web/js/ is customAdmin.js

And in design/adminhtml/myvendor/mytheme/web/requirejs-config.js

var config = {
    "shim": {
        "customAdmin": {
            deps: ["jquery"]
        }
    },
    "paths": {
        "customAdmin": "js/customAdmin"
    }
};

Nonetheless, the js file is not loaded on any admin page.

Does anyone know what could be the problem?

Thanks.


texts: How to override a JS file in lib folder in Magento 2

texts:
I want to override a JS file which lives in following folder

MAGENTO_ROOT\lib\web\tiny_mce\plugins\advimage\js\image.js

I want to override this file from my custom admin theme or by a module.

Any code snippet or how-to will be greatly appreciated.

Thanks.


texts: http://192.241.148.177/admin fails to load css and js so cannot login to admin page

texts:
the site works fine, but we cannot login to the admin page.

Steps taken already:
- cleared cache and session directories
- deleted cache and session directories
- (bravely! - ref https://stackoverflow.com/questions/4280049/how-can-i-fix-the-unsecure-base-url-on-my-magento-installation) removed 8 rows from ..core_config_data, namely all keys with path secure/base EXCEPT the root unsecure/base and secure/base keys.

Inspect element shows "Failed to load resource: ...404" http://192.241.148.177/mage/adminhtml/form.js  which of course should be
http://192.241.148.177/js/mage/adminhtml/form.js

We are not the developers of this page, just the humble hosters moving the site to Digital Ocean.

Thank you in anticipation of your inspired genius.


texts:
With the latest SUPEE-9767 patch, which symlinks are actually affected?

I assume symlinks in /var and /media are ok. What about symlinks in app/etc/modules? Is it just symlinked .phtml template files that are the problem?

Just trying to pinpoint which symlinks may cause issues before patches are applied...


texts: How to clear a column value in quotes table on log in

texts:
I want to be able to clear a custom column like this as soon as I login and I find that a particular SKU is in the cart.:

$quote -> setcolumn('');

How can I achieve this?


texts: In magento2 \Magento\Checkout\Controller\Onepage\SaveOrder controller is fired?

texts: i want know the  \Magento\Checkout\Controller\Onepage\SaveOrder this controller is fired.because i want override this controller.


texts: Magento 2: How to hide shipping method on front end for custom logic

texts: Hi I have create custom shipping method. I have enabled it from back end. Now I want show this only if product custom attribute match some conditions.


texts: Sorting the images at "More Views" on product pages

texts:
I'd like to change the sorting of the images a product has. To achieve this I have typed the order beginning with 0 and up to 6 in the product's image settings. However, even by clearing several caches the new order won't be shown on frontend. A look to the database at the tables catalog_product_entity_media_gallery_value and catalog_product_entity_media_gallery shows me that the settings are saved but it seems that Magento doesn't care that changes have been made.

Have I overseen something? Thanks in advance!


texts: Magento 2.3 want to trace collection object

texts:
I am getting NULL in where condition of product collection query on category page. I want to trace where from NULL getting added.

how can I trace collection query. I have tried debug_backtrace() as well but not helpful.

SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = '1'
 INNER JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE ((NULL) AND (stock_status_index.stock_status = 1)) AND (e.created_in <= 1) AND (e.updated_in > 1) LIMIT 9

any help would be appreciated.


texts: How to overcome timezone problem in Magento?

texts:
I used this method, to add date and time picker in magento backend. Now the input time is getting stored to my database correctly.

The problem is my magento store's timezone is set to Indian Standard time (GMT+05:30), so the time shown in ADMIN GRID, is the input time value (which is in DataBase) + 05:30 Hrs.

phpmyadmin view:

  time in database: 7:15 am and 7:52 am

magento admin grid view:

  time in admin 12:45 pm and 1:22 pm

This doesn't bother me as the countdown timer I display on frontend take the value shown in admin grid. I'm happy. But when selecting the time in date time picker, it shows the GMT, i.e. time stored in Database.

So, the person, who enter the time input should enter a time which is 5:30 hrs in advance to the intended time.


texts:
I have multi store setup and multi web sites for each store.

like
  store 1
     store view a
     store view b
 store 2
     store view c

I want to move  store view b to store 2
is it possible how can achieve it.


texts:
I want to create an order for country US. In Magento we have 2 ways to create an order one on frontent and other from Admin.
We have blocked a particular region Alabama. When we fetch the region collection from country code 'US' the region Alabamais never there.
We want to block any orders coming from Frontent or Admin for this region but we also have created an API for other marketplace where we want to import orders in which we some orders have this region.
How can we solve this problem? Is there a way to create order without region?


texts: Overriding Sales\Block\Order\View Block in Magento 2

texts:
I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page.
Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck.  ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log    :

  Recoverable Error: Argument 2 passed to
  Magento\Sales\Block\Order\View::__construct() must be an instance of
  Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.


texts: Magento 2 add row total column in simple grid

texts:
I have created Simple custom grid without use of UI Component.

now, i need to display total end of the columns.

anyone know how we can add total in custom grid??


texts: How to display list of coupon code in product page in magento 2.2.7

texts: How to display list of coupon code in product page.


texts:
I'm attempting to create custom checkout with the checkout on the cart page and running into an issue where the cart is being duplicated at the bottom of the page. Here is the code:

<checkout_cart_index translate="label">
    <update handle="kom_checkout_onepage" />

    Shopping Cart
    <remove name="right"/>
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/cart-checkout-wrapper.phtml</template></action>
    </reference>
    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/kom_checkout.js</name></action>
    </reference>

    <reference name="content">
        <block type="checkout/cart" name="checkout.cart">
            <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
            <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
            <action method="chooseTemplate"/>
            <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>

            <block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
                Payment Methods Before Checkout Button
                <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
            </block>

            <block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
                Shopping Cart Form Before
            </block>

            <block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
                Payment Methods After Checkout Button
                <block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
                <block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
            </block>

            <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
            <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>

            <block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
        </block>
    </reference>

</checkout_cart_index>

If I remove the block <reference name="content">...</reference> then there is only one cart being shown at the top where I want it. The issue is, that it's not in my layout file now, it's actually being created from the base checkout.xml file. What am I missing?

What I am trying to accomplish is only having one cart show up.


texts: Relation in orders multishipping Magento 2

texts:
I need to work orders with multishipping, but Magento creates one order, each one with different ids, per added shipping.

Magento does have a method to relate all created orders when the order is multishipping? Or just it creates the orders separately and that is it.

The problem is, i'm trying to implement a payment method but as Magento creates several orders, i need to know what orders are from the same "parent" to then updated its status, comments etc


texts:
I have downgrade the magento from ee to ce edition but , while indexing i am facing this issue .does any one have solution for this.

( ! ) Fatal error: Call to a member function getEntityTypeId() on a non-object in /vagrant/app/code/core/Mage/Catalog/Model/Resource/Url.php on line 585
Call Stack
#   Time    Memory  Function    Location
1   0.0043  263432  {main}( )   .../index.php:0
2   0.0086  296440  Mage::run( )    .../index.php:103
3   0.0377  487576  Mage_Core_Model_App->run( ) .../Mage.php:684
4   6.6529  3158576 Mage_Core_Controller_Varien_Front->dispatch( )  .../App.php:365
5   6.6765  3245912 Mage_Core_Controller_Varien_Router_Standard->match( )   .../Front.php:172
6   6.6991  3464208 Mage_Core_Controller_Varien_Action->dispatch( ) .../Standard.php:254
7   11.9966 6641320 Mage_Index_Adminhtml_ProcessController->reindexProcessAction( ) .../Action.php:418
8   12.0678 7160720 Mage_Index_Model_Process->reindexEverything( )  .../ProcessController.php:127
9   12.0755 7221192 Mage_Index_Model_Process->reindexAll( ) .../Process.php:260
10  12.1271 7370056 Mage_Catalog_Model_Indexer_Url->reindexAll( )   .../Process.php:212
11  12.1457 8003408 Mage_Catalog_Model_Url->refreshRewrites( )  .../Url.php:257
12  12.2368 8925424 Mage_Catalog_Model_Url->refreshRewrites( )  .../Url.php:248
13  12.5461 9140848 Mage_Catalog_Model_Url->refreshProductRewrites( )   .../Url.php:255
14  12.5570 9143416 Mage_Catalog_Model_Resource_Url->getProductsByStore( )  .../Url.php:538
15  12.5570 9144040 Mage_Catalog_Model_Resource_Url->_getProducts( )    .../Url.php:1033
16  12.6551 9745384 Mage_Catalog_Model_Resource_Url->_getProductAttribute( )    .../Url.php:997


texts:
HI am trying to install magento 2.3.5 on my linux mint cinammon 19.3 however the instalaltion is succesful but am not able to acess the admin area as well and my frontend css looks totally destroyed
please take a look at the screenshot below

Any help on this this is ,y first time with magento on linux so am facing difficulties thankss


texts:
I was doing a normal updates , never happen with it, and now i get this error with all the products with the update:

Query failed (Got error -1 from storage engine):

            UPDATE
                prom_stock
            SET
                `lastcheck` = NOW()
            WHERE
                dbase_code = 'XXXXXX'
            LIMIT 1

How could fail a query just for make an update to field lastcheck = now() ????


texts: How to display a same website in different language?

texts:
I have completed a website in magento1.9.2.3. Now I wish to have the same site in different languages. How to translate the whole website into different language? Do I have to translate description of each product manually? Is it such tedious task? Kindly someone help me to do that.

Also with little knowledge regarding this I googled for language package of malay.But  It is not available for magento 1.9.


texts:
I want to update all product price by specific percentage from current price.I got the following line of code update price by percentage wise

$products = Mage::getModel('catalog/product')->getCollection()
 ->addAttributeToSelect('price');
 foreach ($products as $product) {

 $product->setPrice($product->getPrice() * 1.03);
 $product->save();
 echo $product->getId()."updated Sucess";
 }

Its working well. But it will take so much time to complete the above process because we have a lot of products in our store. Some times it will return time out error too. So i want to perform this above operation by split those product collections like if we have 1000 products, do this operation by like below

Collect 1st 100 products from product collections
Update price of those products
Then collect next 100 products
Update price of those products

Anybody have an idea to get product collections by some range of ids?

EDIT:

The below accepted answers are the solution of my exact problem. If you want the solution of "To get product collections by some range of ids in magento" this question, please check this post

or refer this SO question


texts: Multi update products quantities using one soap api request

texts:
I tried below code works for single product quantity update in one soap api request but I want to update multi products stock quantities using only one request.

I tried multiple sku in array but not work

$client = new SoapClient('http://example.com/index.php/api/soap/?wsdl');
 $session = $client->login('xxxxx', 'xxxxx');
echo "<pre>";
$sku = 'product1';
$stockItemData = array(
    'qty' => '22'
);

$result = $client->call(
    $session,
    'product_stock.update',
    array(
        $sku,
        $stockItemData
    )
);
print_r($result);


texts: Magento2 Stop abandonment cart email to be fired when quote value is restored

texts:
Magento2, I am using Hosted Pro Paypal. I am having issue where abandonment cart email gets fired when the cart is restored. I want to stop this mail.
For restoring the data I have used below code


texts: How to load address (billing, shipping) by entity_id (address_id)?

texts:
I need to change all addresses (billing, shipping) street attribute. I have only entity_id (address_id) from customer_address_entity_text.
How can I do it?


texts: Getting **guruincsite** malware on my Magento site

texts:
I got guruincsite virus with https://www.magereport.com: I deleted the virus from my database and now it shows there is no security risks.
But when I access to my website browsers are blocking it "The site ahead contains malware".
this is my website http://www.bijouterie-kuypers.com/.
Is there any suggestions for this problem?


texts: Magento 2.2.2 - Adding Product to Wishlist doesn't work when user is not logged in

texts:
Using Custom Theme, when user is not logged in and try to add a product to wishlist, it is served up the login or create an account screen. Once the user logs in, the item user was trying to add to wishlist isn't appearing under My Wishlist in Account Dashboard and it says You have no items in your wish list. So now user has to go back and add.

Although when user is logged in and then try to add a product to wishlist, its working.

How do I add the product upon login?


texts:
I am using Magento 2,
I used the structed data testing tools and all of my 600+ products have 8 warnings of which are some important ones such as image, availability, url

How do I correct this?

Some of the fields such as price, name etc are completed


texts: Hide COD and Check/Money order for specific shipping methods

texts:
Please advise how to use the current solution in order to hide the COD and also the Check/Money Order for some shipping methods? Magento 2.1.6 CE

Previous question relative to this one


texts: M1: cookie issues in example.com and staging.example.com

texts:
On a shared machine, I have two sites running: example.com and staging.example.com. I have a problem where I can't log into the staging admin due to cookie issues.

If I clear all the cookies, I can log into the staging admin, and subsequently the main admin as well, but I get kicked out of staging. Inspecting cookies, they're both set to .example.com. I've tried all possible combinations of cookie domains for the respective site, but none seems to work.

This solution has a similar problem that he solved by forcing his main site to go to www.example.com and setting appropriate cookies (I'm guessing cookie domain values .www.example.com and .devsite.example.com in his case). Is there any other way to make both of these sites work properly in the same browser without the www addition or hacking the code?


texts: Magento 2 call admin controller using ajax

texts:
I'm trying to call a controller located in Vendor/Module/Controller/Admin/CustomController/TestAction but I'm getting an unauthorized error. Below is my code

require(
    [
        'jquery',
        'mage/translate',
    ],
    function ($) {
      $("#generate_menu").on('click', function() {
        $.ajax({
            url : '/admin/vendor_module/CustomController/TestAction',
            type : 'GET',
            data: {
                format: 'json'
            },
            dataType:'json',
            success : function(data) {
                alert('Data: '+data);
            },
            error : function(request,error)
            {
                alert("Error");
            }
        });
        return false;
      })
    }
);

Note: I don't have any .phtml defined because I'm calling this ajax from a js file and I just added a custom button in the catalog/category in the admin. I know my controller is working it's just that I'm getting an unauthorized access error.

Update:
The JS file calling the Controller is in /app/code/Vendor/Module/view/adminhtml/web/js/mycustom.js. I have created a custom button that is located in the catalog->category just beside the save button. When I click this the expected behavior is it will trigger the ajax and the ajax will access the controller. But I get the unauthorized problem


texts: How to disable rating stars from product carousel

texts:
I am using magento 2 porto theme where it has a product carousel and it shows rating stars. I need to disable it from the product carousel.

Can it possible to disable?? Please help...


texts: Get maximum qty discount and discount amount programmatically in Magento

texts: Is that possible to get maximum qty discount and discount amount values from Shopping Cart Price Rules programmatically in Magento?


texts: How to redirect to cart after adding product to cart programmatically

texts:
I want to redirect to cart page after adding the product into cart,
I know there is a provision in config but I have a custom product type and that config is not working for that product.

That configuration setting is working for simple and other products but not for the custom product type.

So Is there any way I can do this thing programmatically using plugins or anything else.


texts: DomainException after clean Docker installation

texts:
I used a Docker configuration for Magento which I found  here. I used the files in the example folder to get myself started. After finishing the installation I went to see if the CLI options are working. They have issues:

sudo bin/magento indexer:info

returns

[DomainException]
Connection "default" is not defined

and

sudo bin/magento cache:flush

returns

[DomainException]
Default website is not defined

after disabling cache with

sudo bin/magento cache:clean

and trying to clean or flush the cache again, the following message appeared:

[Exception]
Notice: Undefined index: websites in /home/goran/Magento_2/magneto2-beeit/src/vendor/magento/module-config/App/Config/Type/System.php on line 248

Also

sudo bin/magento config:show

returns

Configuration for path: "" doesn't exist

I went and checked store_website table and is_default column. There is number 1 in the row for the Main Website, so the default website should be set?

Questions:

What is "default connection" and how to define it?
How to define default website?

Dockerfile / docker-compose.yml - gist


texts: Magento 2 adding extra step whithin checkout

texts: I have made extra step in between shipping and payment steps by using KO. Now I want to add some logic in HTML file and for that I want to run php code so that I can call my model to check my module is active or not that I can easily do in PHTML. Any good suggestion what should I do?


texts: Save the multiselect options in database

texts:
We created some "Brands" [values] in backend.

We have around 10 products in one category with category id = "40".

if we open any brand,  we are displaying all those category products as multi-select option as below image.

but when we select options and click on "save", its not working.

why we want to save is , if we select particular Brand we want to display selected Products in dropdown in frontend as below image

Below code for displaying list of products in multi-select box.

$products = Mage::getModel('catalog/category')->load(40)
    ->getProductCollection()
    ->addAttributeToSelect('*');

$categorylist = array();
$categorylist[] = array(
    'value' => '', 'label' => Mage::helper('sales')->__('Category')
);
foreach ($products as $product) {
    $categorylist[] = array(
        'value' => $product->getEntityId(), 'label' => $product->getName()
    );
}
$fieldset->addField('category', 'multiselect',
    array(
        'label' => Mage::helper('sales')->__('Category'),
        'class' => 'required-entry',
        'required' => true,
        'values' => $categorylist,
        'name' => 'category',

    ));


texts: Setup free shipping for customer group wise in magento2 CE

texts:
How to Setup free shipping for customer group wise in magento2 community edition 2.1.0

I have created a "Cart Price Rule", where i have specified "Customer Group" only Retailer and in the conditions if cart subtotal greaterthan 100, and Actions section Apply to "Percent of product Price discount" and set "Apply to Shipping Amount" to yes.

When test in the front end free shipping is applying to all customers, but i'm looking only for "Retailer" Customer Group.

Please let me know how to achieve this.


texts: How to Disable welcome message in header file in magento 2?

texts: How to disable Welcome message in magento 2.3


texts: How can I add Product count for categories?

texts:
how can I add product count for categories in Magento? I want product count to be placed on sidebar. Tried several ways but failed all the time
Thanks for any help


texts: Magento 2, how to change 'text-box' to 'select-list' of customer edit grid?

texts: Using magento 2.2, admin, customer -> all customer [Edit Panel]. I want to change ZIP control from  text-field to select-list.


texts:
when I use php bin/magento indexer:reindex or php bin/magento cron:run I keep getting this error.

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home/[NAME]/public_html/vendor/magento/framework/Filesystem/Directory/Write.php on line 35

I'm using php 7.2 and Magento 2.3

Any ideas of how to fix this?


texts: Breadcrumbs not showing category on product page

texts:
I do have a question regarding breadcrumbs in Magento 2.3.5.
I do have some categories which are not shown in the menu. Meaning I disabled them for the category menu. This is necessary in my layout because of not enough place to display.
I do access these categories with other links.
So far so good, but in this case breadcrumbs are only showing the productname on the product page and not the category names.
Does somebody have an idea how to change this?


texts: How to determine if an item has discount from catalog price rule

texts:
Any ideas how to make sure the item in the cart / quote was affected by CATALOG price rule (not shopping cart rule)?  There is a similar question without an answer:
Do not apply catalog price rules on a product already on sale


texts: Exception Error: "Memory limit has been reached."

texts:
I'm trying to edit my attributes and only one of the attribute codes is giving me the error: Exception printing is disabled by default for security reasons.

This may be due to the recent up-gradation to Magento 1.9.2. I have checked the report log and it is saying this:

a:5:{i:0;s:30:"Memory limit has been reached.";i:1;s:4517:"

Please help!


texts:
Consider the following loop:

// Determine the final state of orders.
$orders = Mage::getModel('sales/order')
    ->getCollection()
    ->addAttributeToFilter('entity_id', array_keys($orderIDs));
foreach ($orders as $order) {
    // Tally all of an orders items
    $itemIDs = [];
    $iCollection = $order->getItemsCollection()
        ->addAttributeToFilter('product_type', 'bundle')
        ->addAttributeToSelect('entity_id');
    foreach ($order->getItemsCollection() as $item) {
        $itemIDs[] = (int)$item->getItemId();
    }

    // Tally the order items we've already dealt with
    $batchItemIDs = [];
    $batchItems = Mage::getModel('callcenter_fulfillment/batch_item')
        ->getCollection()
        ->addFieldToFilter('item_id', $itemIDs)
        ->addFieldToSelect('entity_id');
    foreach ($batchItems as $batchItem) {
        $batchItemIDs[] = (int)$batchItem->getItemId();
    }

    $order->setData('state', 'complete');
    if ($iCollection->getSize() === $batchItems->getSize()) {
        $order->setData('status', 'complete');
    } else {
        $order->setData('status', 'partially_completed');
    }
    $order->save();
}

This loop leaks memory.  I have dissected the memory leakage, and I have found $iCollection allocates 95k of memory, $order->setData(whatever) at the bottom allocates 18k, and $order->save() at the bottom by itself allocates around 53k of memory.  This is according to memory_get_usage() logged by each part of the code.

Now, I don't have a problem with the amount of memory that's being allocated.  I understand that ORM's have overhead.  However, as far as I can tell, almost none of this memory is being freed on subsequent loops, so memory usage inches higher and higher until the site finally blows up by hitting the 128 megabyte limit.

Why isn't memory being freed here?  Is there something I'm overlooking?


texts: Magento2 : How to add social link in static block in PWA

texts:
I have created one Static block with added below content in and I need to add social links in PWA.

Facebook

Above code is not working anyone have idea how to add URL in PWA ?


texts:
I would like to insert a custom stylesheet from my custom-made Widget. Is that possible?

More specifically, I'm trying to use jquery.fancybox on a specific page and it needs jquery.fancybox.css for a correct visualization. I would prefer to exclude this file from ALL pages and insert it when the widget is actually used.

Thank you


texts: Product image not displaying in wishlist page

texts:
I have created one attribute called imageurl for importing product image url. Product images displaying all the pages except minicart and wishlist page. For displaying product image in wishlist page I made some changes in wishlist/item/column/image.phtml file. But its not working.

<img src="<?php echo $_product->getData('imageurl') ?>" />


texts: Magento 2 one page checkout - Where to edit authentication popup

texts:
Where exactly is the code generating this popup on Luma's one page checkout, so I can add a custom HTML block after "Sign In"?

I tried every place I could think of, but nothing seems to work. The browser console shows that the "Sign In" heading is wrapped inside a "block-customer-login-heading" element. Searching for that element in the Luma template folders brings up the following results:

/vendor/magento/module-checkout/view/frontend/web/template/authentication.html
/vendor/magento/module-customer/view/frontend/web/template/authentication-popup.html

I tried editing each of those files in my child theme, using these paths:

app/design/frontend/My_Vendor/My_Theme/Magento_Customer/frontend/web/template/
app/design/frontend/My_Vendor/My_Theme/Magento_Checkout/frontend/web/template/

(also tried without /frontend, just in case...)

Cleared the cache. No custom block shows.

Is there anywhere else I should be looking or am I just not using the right paths?


texts: How can i rewrite TierPrice Block in Magento2

texts:
I am facing one issue in block rewrite.
I am trying to rewrite
app/code/Magento/Catalog/view/base/layout/catalog_product_prices.xml
I want to Call my own tier_prices.phtml

<code>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd">
    <block class="Magento\Framework\Pricing\Render\RendererPool" name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="default_render_class" xsi:type="string">Magento\Catalog\Pricing\Render\PriceBox</item>
                <item name="default_render_template" xsi:type="string">Magento_Catalog::product/price/default.phtml</item>
                <item name="default_amount_render_class" xsi:type="string">Magento\Framework\Pricing\Render\Amount</item>
                <item name="default_amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
                <item name="prices" xsi:type="array">
                    <item name="special_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/special_price.phtml</item>
                    </item>
                    <item name="group_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/group_price.phtml</item>
                    </item>
                    <item name="tier_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/tier_prices.phtml</item>
                    </item>
                    <item name="final_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\FinalPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/final_price.phtml</item>
                    </item>
                    <item name="custom_option_price" xsi:type="array">
                        <item name="amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/option.phtml</item>
                    </item>
                    <item name="configured_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\ConfiguredPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/configured_price.phtml</item>
                    </item>
                </item>
                </argument>
        </arguments>
    </block>
</layout>
</code>

Can anybody help me regarding this?

Thanks in advance.


texts:
I get the following error message. I am new to Magento and this is my first install. Please help out. Thanks in advance. See detailed error message below.

There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 858614085

a:5:{i:0;s:540:"Error in file: "/homepages/29/d527516279/htdocs/app/code/core/Mage/Tax/sql/tax_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tax_class' already exists, query was: CREATE TABLE `tax_class` (
  `class_id` smallint NOT NULL auto_increment COMMENT 'Class Id' ,
  `class_name` varchar(255) NOT NULL COMMENT 'Class Name' ,
  `class_type` varchar(8) NOT NULL default 'CUSTOMER' COMMENT 'Class Type' ,
  PRIMARY KEY (`class_id`)
) COMMENT='Tax Class' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci";i:1;s:1008:"#0 /homepages/29/d527516279/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /homepages/29/d527516279/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.4')
#2 /homepages/29/d527516279/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.0.4')
#3 /homepages/29/d527516279/htdocs/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /homepages/29/d527516279/htdocs/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /homepages/29/d527516279/htdocs/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /homepages/29/d527516279/htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /homepages/29/d527516279/htdocs/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:10:"/index.php";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}


texts: On setting New Magento 2.4.2 Version Front-end is messy

texts:
On Setting Magento 2 Store with version 2.4.2 my front-end is messy like .
i have removed my var cache folders and pub->static folders and run
 php bin/magento setup:static-content:deploy -f

and then clear cache and given permission but the issue is still there i have checked the .htaccess file it will be there in pub->static
When i check the console it will load the path http://mag24.local/static/version1620651126/adminhtml/Magento/backend/en_US/requirejs/require.js
without pub before the static so it will become messy i think.
Any idea whats the issue and how to solve this ?


texts: What Magento Event Fires when adding to cart a 'last ordered item'

texts:
What event fires when the user is on My Account page and clicks 'Add to Cart' in the 'My Orders: Last Ordered Items' area? Hopefully I am making sense, below is an image from the My Account page and the button I am talking about:

I am attempting to create an observer that will react to this event and remove/change deprecated products from the users order (products we no longer want to sell).


texts: After Creating Custom PDF Save Magento 2.3

texts:
Using dompdf Convert Custom Email Template To Pdf

But After Create PDF I Want to Save That PDF into pub/media/customFolder

  Here My Code :-

Define in email_templates.xml :-

 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="custom_template_id" label="custom_template_id" file="pdftemplate.html" type="html" module="Vendor_Module" area="frontend"/>
</config>

Get Email Template As Html :-

$testTemplate = $this->templateFactory->get('custom_template_id') //template Identifier
                ->setVars($templateVars)
                ->setOptions($templateOptions);

        $html = $testTemplate->processTemplate();

Create PDF :-

$dompdf = new Dompdf();

$dompdf->loadHtml($html); //$html is html of template

$dompdf->setPaper('A4', 'portrait');

$dompdf->render();

file_put_contents('custom_pdf.pdf', $dompdf->output());