texts:
How to create SOAP API for custom_module in Magento 1.9.x?

I have just started learning magento.

I tried to create an api for my custom module, in this with help of SO & ME, I tried like below localhost/modules/api_custom_module.php

$soap = new SoapClient('http://example.com/magentomodules/api/soap?wsdl=1');
$sessionId = $soap->login('admin', 'custom_module');
$result = $soap->call($sessionId, 'module.list');
$soap->endSession($sessionId);

It returns a string value

I have tried

localhost/modules/api/soap/?wsdl ->it shows some xml format.

When I tried in localhost/modules/api_custom_module.php, it returns string!

I would like to know:

which one is correct format?
what is the difference between these two results?

Thanks


texts:
I am building a webshop with cosmetics and hair-face care products. But I want to help my (mostly men) customers to create a "box" where they can put in some products. After they purchased it, I want to mail the customer (after a month) that his products from the box are ready for him.
Example:
Customer1 places 2 shampoos and 3 day-creams in his box. And he fills in that he uses this order for a month. Then after 3 weeks my shop has to mail the customer:

Hi! Are you running out of products yet? Your box is ready! (LINK)

What's the most easy way to to this? Or is there a extension I can use?


texts: Removing/Hiding Review tab on product pages

texts:
I'm trying to remove the review tab that appears on product pages and I have added in the two reference blocks below in catalog_product_view.xml.

<block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="product/view/review.phtml"/>
<referenceBlock name="product.info.review" remove="true" />
<referenceBlock name="reviews.tab" remove="true" />

However this has not just removed the review tab but also the Description and Additional Information Tabs. Is there a way of just removing the review tab and nothing else?

My Magento version is 2.2.4


texts: Magento 2 and M2Epro Ebay Listing Inventory Synchronisation Issue

texts:
I am facing problem between Magento 2 and M2Epro Ebay Listing Inventory Synchronisation. Inventory in not sync between M2epro ebay listing.

I have checked synchronisation settings and those shows correct. But still inventory is not correct on M2Epro Ebay Listing.

Now I am writing a code as per this tutorial to observe product and update inventory.

Github Location for M2Epro - https://github.com/m2epro/magento2-extension

But I am getting error that

Uncaught Error: Class 'Ess\M2ePro\Model\PublicServices\Product\ObjectChange' not found

Below is my code -

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$modelFactory = $objectManager->create('\Ess\M2ePro\Model\Factory');
$model = $modelFactory->create('PublicServices\Product\ObjectChange');
$model->observeProduct($id);

Can anyone help me to fix this.

Is there any other way to fix inventory synchronisation issue ?


texts: Bundle Product Price is Not Updating On Product Page - near to add to cart button. When Selecting Options

texts:
I have created a bundle product with 2 options.

One option is a dropdown menu (required).

The 2nd option is a checkbox (required).

When I select my options the price in the right column is not updated.

Once added to cart the price reflected is correct.

Magento version is 2.2.7

Any ideas?

(I have overrides luma theme)


texts: How can I disable a plugin in a module from another module?

texts:
I've installed a vendor module which as a plugin in its di.xml.

What I intend to do is to write my own module to disable the plugin in that vendor module as I wanted to have my own functionalities for a particular part. Although I can modify that module's di.xml by setting its disabled attribute to true, since it's a vendor module, I try to avoid modifying it directly.

How can I disable a plugin in module A from another module B?


texts: Subtotal with Discount in Shopping Cart Price Rule

texts:
I'm trying to do something that I'm not sure is possible in Magento, at least it's not working for me currently anyway.

We have a customer who receives a variable rate of discount on all products based on how much they spend PER ORDER.  For example, if they spend more than £100 - they get 25% off.  If they spend £150 they get 30% off, if they spend £200 they get 35%.

In isolation this works fine, using the "Subtotal" condition.  Where it stops working is when other rules that can also apply are factored in.

We have a product that has a "Buy X get Y free (discount amount is Y)" rule on it - to give customers who buy 3 of the product the third product free.  This means if they buy product A for £30 each (£90 subtotal), they get a discount of £30..

The problem I'm having:

Scenario 1 (good):

Customer has £75 of product to their basket
Customer not entitled to discount (<£100)
Customer has £125 of product to their basket
4. Customer entitled to 25% discount (>=£100 and <£150)

Scenario 2 (bad)

Customer has 5 of product A (£30 each) in basket, equalling £150 subtotal
Customer receives discount of £30 (3 for 2 rule)
Magento gives customer 30% discount, because it thinks they are over £150 threshold, but in reality they are under due to other rules.

I tried to solve this by implementing a "Subtotal after Discount" condition using code from this page: https://stackoverflow.com/a/16808826 - but this just results in the rule factoring ITS OWN DISCOUNT into the rule!

Is this possible in Magento (CE 1.7.0.2)?


texts: when user click on placed order, order pdf will generate and attached it to user's order email

texts:
I want the following actions.

When any user clicks on "Place Order" on the checkout page,  A pdf of this order will be automatically generated. And this pdf is automatically attached to email "Your Main Website Store order confirmation" and send it with this email. So User can directly see or download order pdf from an email account.

I tried many free extensions But did not found a suitable free extension. I found that after a click on "Place Order" button, I have to generate pdf and send its link or attached pdf file in email. But I did not found a code of place order.

Any help will be appreciated. Thank you.


texts: I need to create a Custom Module for update fast QTY (increase or decrease) in stock. My customer don't want to open each product and go to inventory and type the current stock and save. For this I made a custom template, but now I cant get this done.


texts:
Scenario:
I'm running some script that changed some attribute values for some products.
Because of performance reasons, I split this into batches.

Problem:
But each time I'm done with a batch the reindexing starts for the products that belong to that batch.  Indexes are set to "real time".

Desired result:
I want to disable the reindexing during the execution of my script.
But I don't want to set the reindex mode to 'schedule' because my script can take a while and any other operations done via admin need to still trigger the indexing for those specific products.

Main Question:
How can I tell magento at the start of my script "Don't reindex anything during this script, no matter on how the index mode is set!!" ?

Note: The script is a magento command executed either via cli or cron.


texts:
How can i Get a product list order by relevance  like the front office?

I want sort my search by name, price and relevance like the frontend.

The first two work perfectly but when $searchOrder is by relevance does not work properly. Always is the same result and different of frontoffice

<?php
$searchOrder  = "relevance";
$searchDirection = ($searchDir == "desc") ? SortOrder::SORT_DESC : SortOrder::SORT_ASC;

$this->_searchCriteriaBuilder->addSortOrder($searchOrder, $searchDirection);
$searchCriteria = $this->_searchCriteriaBuilder->setCurrentPage($page)->setPageSize($pageSize)->create();
$products = $this->_productRepository->getList($searchCriteria);
$products = $products->getItems();
?>


texts: How to remove default filter by store (Purchase Point) in sales_order_grid.xml in magento 2?

texts:
In magento report sales_order_grid.xml has filter by store_id.
<filters name="listing_filters">
            <filterSelect name="store_id" provider="${ $.parentName }">
                <settings>
                    <options class="Magento\Store\Ui\Component\Listing\Column\Store\Options"/>

All Store Views

                    Purchase Point
                    <dataScope>store_id</dataScope>
                    <imports>
                        <link name="visible">ns = ${ $.ns }, componentType = column, index = ${ $.index }:visible</link>
                    </imports>
                </settings>
            </filterSelect>
        </filters>

I want to remove this filter. How to do that?
If can not remove this filter. Can I add css class or style for this filter to display none it?
Please help me,
Thank you so much,
BienHV


texts: Get value from sales_flat_invoice_item table

texts:
How to get sku from sales_flat_invoice_item table?
Which model is use for this table?


texts: Unable to access magento without /index.php/ in the URL

texts:
I have fully downloaded a magento 1.9.1 instance and it's DB which was running on a server into my computer and trying to get it up and running using WAMP server. everything looks fine except that I can't browse any page in both front-end and back-end unless I put /index.php/  in the URL. (if I don't, I get the 404 error)

I have tried enabling rewrite url module in WAMP,and clearing cache but that didn't help at all.

Is there anything I can do to get this fixed?

I notice I don't have the .htaccess file on my machine. Can this be the reason? If yes, do I have to place htaccess file in every single folder or just the root folder of magento?


texts: Sign up (guest checkout) issue in Magento 2

texts:
I have added customer_register_succes event for guest customer account creation during guest checkout.
After the successful order when the user sign up by my event and observers call in which I load order for that guest user.

I have added event and observer for sign up and login of customer

<event name="customer_register_success">
    <observer instance="YX\Customer\Observer\RegisterSuccess" name="customer_register_succes"/>
</event>

<event name="customer_login">
    <observer name="customer_login_observer" instance="YX\Customer\Observer\CustomerLogin" />
</event>

Observer code

 class RegisterSuccess implements ObserverInterface
{

protected  $customlogger;
protected  $tempblock;
protected  $customerHelper;
protected $_blockFactory;

public function __construct(
    \YX\Catalog\Block\OrderHelper $orderHelper,
    \YX\Customer\Helper\CustomerHelper $customerHelper,
    \Magento\Framework\View\Element\BlockFactory $blockFactory

)
{
    $this->_blockFactory = $blockFactory;
    $this->tempblock = $this->_blockFactory->createBlock('YX\Catalog\Block\OrderHelper');
    $this->customerHelper = $customerHelper;

}
public function execute(\Magento\Framework\Event\Observer $observer) {

    if (!($this->customerHelper->isCustomer())){

        $customerID = $this->customerHelper->getCustomerId();
        $orderId = $this->customerHelper->getOrderId();
        $this->tempblock->guestToCustomer($orderId,$customerID);

    }
  }
}

  getCustomerId function

 public function getCustomerId(){
    $customerId =  $this->customerSession->getCustomer()->getId();
    return $customerId;
}

  getOrderId function

 public  function  getOrderId() {

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
    $connection = $resource->getConnection();

    $customerSession = $objectManager->create('Magento\Customer\Model\Session');

    if ($customerSession->isLoggedIn()) {
        $customer_email = $customerSession->getCustomer()->getEmail();
        $order_collection = $objectManager->create('Magento\Sales\Model\Order')->getCollection()
            ->addFieldToSelect('entity_id')
            ->addAttributeToFilter('customer_email', $customer_email)
            ->addAttributeToFilter('customer_is_guest', 1);

        foreach ($order_collection as $data){
            $order = $data->getEntityId();
            return $order;
        }
    }
}

  guestToCustomer function

public function guestToCustomer($incrementId,$customerId)
{

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('Magento\Sales\Api\OrderRepositoryInterface')->get($incrementId);

 if ($order->getId() && !$order->getCustomerId()) {
     $order->setCustomerId($customerId);
     $order->setCustomerIsGuest(0);
     $this->orderRepository->save($order);
  }
 }

I am getting this error

An ID is needed. Set the ID and try again.

I am not able to figure out what's happening, and when I login with the just created account I can see my orders as I have events and observer for login also.

It works for login, not for sign up process.
and after this, the first time user(new user) sign up process gives me same error.

Despite that error I even check the customer_entity table and it has customer entry.

select  * from customer_entity order by  created_at desc limit 1;


texts: Product Name is null after left join with custom table via Event Observer

texts:
I am making use of Marketplace  extension and wanted to show seller name after product name in Category list page. I have used "catalog_block_product_list_collection" events

<event name="catalog_block_product_list_collection">
    <observer name="add_seller_info_product_list_collection" instance="Vendor\Page\Observer\AddSellerInfoListCollection" />
</event>

And Observer Class

namespace Vendor\Page\Observer;

class AddSellerInfoListCollection
implements \Magento\Framework\Event\ObserverInterface
{
    protected $_objectManager;
    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Framework\ObjectManagerInterface $objectManager){
        $this->_objectManager = $objectManager;
    }

    public function execute(\Magento\Framework\Event\Observer $observer){
        $collection = $observer->getCollection();
        $seller = $this->_objectManager->create(
            'Magento\Catalog\Model\ResourceModel\Product\Collection'
        )->getTable('customer_grid_flat');

        $sellerProduct = $this->_objectManager->create(
            'Magento\Catalog\Model\ResourceModel\Product\Collection'
        )->getTable('marketplace_product');

        $sellerProfile = $this->_objectManager->create(
            'Magento\Catalog\Model\ResourceModel\Product\Collection'
        )->getTable('marketplace_userdata');

        $collection->getSelect()->joinLeft(
                $sellerProduct.' as seller_product',
                'e.entity_id = seller_product.mageproduct_id'
            );

        $collection->getSelect()->joinLeft(
                $seller.' as seller',
                'seller_product.seller_id = seller.entity_id',
                array('seller_name'=>'seller.name')
            );

        $collection->getSelect()->joinLeft(
                $sellerProfile.' as sellerprofile',
                'sellerprofile.seller_id = seller.entity_id',
                array('seller_shop_url'=>'sellerprofile.shop_url')
        );
        return $this;
    }
}

I get proper results when a product is associated with some seller, but if there is a product not associated with any seller then all product attributes ( like name, url, etc) are not loaded.


texts: New theme/magento install - Fatal error: Call to a member function toHtml() on a non-object

texts:
I have recently set up a test server with magento 1.6 files copied from the live server, after getting it to work I uploaded the new theme files via FTP that I wanted to work with, with cache/compiler disabled etc.

Upon having installed it, and login back into magento back-end, I enabled to new theme package in system > config > design and imported the themes static blocks / CMS pages, and cleared cache just to make sure..

Now I am getting a blank page on my website except for this error message:

  Fatal error: Call to a member function toHtml() on a non-object in /data/sportnor/public_html/multifitness.dk/app/code/core/Mage/Core/Model/Layout.php on line 529

I've done some research now on the error message, and the fix that seems to have worked for many people doesn't seem like an option for myself, since page.xml is not present in:

\app\design\frontend\default\themename\layout\

Can someone please help me to identify as to what the problem might be? I've tried several things, problem still persists, if the information given is too vague, please let me know and I will provide with whatever I can.

Quick info:

Theme is "Ultimo"
Magento version 1.6.1.0
Currently hooked up to a DB with many products
All modules disabled /caching/compiler too etc.


texts:
Slider is not displaying for me in magento 2, i have attached my code here only the image is displaying slider is not working i hve attached my code for the reference
Slider is not displaying for me in magento 2, i have attached my code here only the image is displaying slider is not working i have attached my code for the reference
Slider is not displaying for me in magento 2, i have attached my code here only the image is displaying slider is not working i have attached my code for the reference


texts:
I have a store in three languages, and I installed an extension which have lines of code such as:

<?php echo $this->__('Email Address') ?>

And then I have this string translated in each of the three languages. This is working fine.

But then I want to add some new strings to translate. I opened up Mage_Adminhtml.csv under app/locale/es_ES (for the Spanish case), and found there the translation for 'Email Address' and the other strings that are working. So, at the end of the csv file, I added a new line with this text:

"Please login","Por favor, inicie sesión"

And then, in my .phtml file, I include <?php echo $this->__("Please login") ?>. But then I don't get any translations, I only get this string (Please login) no matter what language is chosen.

I saw on other posts that there are different ways of translating but this one seemed the most straigthforward. Could you please tell me what am I missing or doing wrong?

Thank you in advance :-)


texts: How removing ANONYMOUS blocks from layout?

texts:
There is a block in /customer/account/create page named ANONYMOUS_55. It is created by Mage_Customer_Block_Widget_Taxvat. I would like to remove this block from layout but both remove or unsetChild methods are not working. Any ideas why?

This is the code I used in local.xml:

<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account_create>
    <reference name="customer_form_register">
        <remove name="ANONYMOUS_55" />
    </reference>
</customer_account_create>
</layout>


texts: Can't view customers from backend in multi website configuration

texts:
I'm testing a multi site configuration to better understand Magento functioning.
I tried to create customers using the browser as well as a REST API call.
However, when I login in the backend, I'm not able to see the customers I've created. I know they do exist and that the registration process was succesfull, since I'm able to login in the frontend using their credentials.
The odd thing is that I can get the new customers' details using REST API calls and I see them in the new customer section in the Dashboard, but there is no sign of them under the All customers menu.
I've checked all the filter options and they are all off.


texts: Magento 2: Get product attribute’s select option id,label for configurable product

texts:
How to get an option value based on the option id in Magento, or get an option id based on the option code ?

Example: how to get the color attribute option id 10 from the label "Red", and get the value "Red" if the option id is 10 ?


texts:
I'm a newbie around here!

Is there any way for me create a combination of 2-3 products and creates a set?

say. Sofa Module A, B, C all selling separately and have they're individual SKU's

I want to create SOFA combo A.

I tried group product, didn't seem to work?
bundle or Configurable?


texts:
How we can create custom Eav entity and model in magento2. I want to create a custom module where new attributes/fields can be created by user. I will use it to show the details in the grid in admin panel.

I am unable to find any tutorial or reference for this.


texts: Track down what's disabling the Magento cache

texts:
As it often happens, you log into your Magento Back-end and you see that a cache has been disabled.
Is there a way to track what is disabling the cache so that we can fix the problem - if there is one?


texts: Replace index.php from subcategory url in cms page

texts:
I have created a cms page for categories which list all the subcategories of that current category. My issue is i am getting index.php appended when i click on subcategory links from that cms page. Other than that i have removed index.php from entire website. SEO friendly urls are enabled.

 my htaccess file-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.php [L]
RewriteRule . /index.php [L]
</IfModule>

When i click on category from navigation menu , the url I am getting is -

 magento.com/category1.html

But , from cms page , the Url I am getting is -

magento.com/index.php/catgeory1/subcategory.html

Why index.php is getting appended when i click on category link from cms page?

What am i doing wrong ?

 $_helper = Mage::helper('catalog/category');
 $category = Mage::getSingleton('catalog/layer')->getCurrentCategory();

 $categories = $category->getCollection()
            ->addAttributeToSelect('*')
            ->addAttributeToFilter('is_active', 1)
            ->addIdFilter($category->getChildren())
            ->addUrlRewriteToResult();

 //To get category url -
         echo $_helper->getCategoryUrl($category);


texts: Recently viewed products on show in sub-categories

texts:
I have the problem that the recently viewed products block only appear when I'm in one of my sub-categories and not in my parent category.
I haven't worked with Magento before, so I don't know where to look.
I did however find product_viewed.phtml, but it doesn't look like there is anything in the file, that defines that it should only be showed in sub-categories. Where else should i look?
Below is my product_viewed.phtml file.

<?php if ($_products = $this->getRecentlyViewedProducts()): ?>

        <?php echo $this->__('Recently Viewed Products') ?>

        <?php foreach ($_products as $_item): ?>

<a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName() , 'name') ?>

        <?php endforeach; ?>

<?php endif; ?>


texts: Magento 2 - Move swatch options after product name in product details page

texts:
I want to move my swatch option after product name. If anyone have idea how to do?

Please let me know.


texts: Magento 2 How to add custom CSS to HTML Template?

texts:
I have a custom html template where I have classes.
On layout I have added my css like this:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="css/application.css" />
    </head>
    <body>
        <referenceContainer name="content">
            <block class="Vendor\Application\Block\Main" name="application_send" template="Vendor_Application::application.phtml"/>
        </referenceContainer>
    </body>
</page>

And inside PHTML i'm using a javascript component in order to render html template
Just like this:
 <div id="port-form" data-bind="scope:'port-form'">
      <!-- ko template: getTemplate() --><!-- /ko -->
      <!-- ko template: template2--><!-- /ko -->
      <!-- ko template: template3 --><!-- /ko -->
        <script type="text/x-magento-init">
        {
            "#port-form": {
                "Magento_Ui/js/core/app": {
                  "components": {
                        "port-form": {
                            "component": "Vendor_Application/js/port-app-form",
                            "quote_data": <?= /* @escapeNotVerified */ $data ?>,
                            "quantities": <?= /* @escapeNotVerified */ $quantities ?>
                        }
                    }
                }
            }
        }
        </script>

It's not taking any effect
I get this error:
Refused to apply style from '.../en_US/css/application.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled

Greetings


texts: Magento 2.3.2 - Admin product price - use 3 decimals / stop rounding too 2 decimals

texts:
Issue: Rounding product price issues when using prices excluding tax

Example:

Product price including tax should be 3.95, we use 21% tax rate.

Product price excluding tax on product is entered as 3.265 which is automatically converted to 3.27 by Magento admin. 3.27 * 1.21 = 3.9567 which is rounded to 3.96 by Magento. But we need the price to be 3.95 on the frontend.

Is there a way to have for example 3 digits on the admin product price?

Tried this but nothing happens / or is changed

Magento2 - admin price input's are rounding value to 2 decimals


texts: What's the best way to manipulate the product list in the category page?

texts: How can I manipulate the list of products which will be shown on the category page?


texts: how can i have the discounted price for each row?

texts:
The single price of our products will be reduced, if our customers buy a certain amount of our product.

In the cart, for each row, magento will calculate with the base price and at the end, magento will subtract the discount, but that's not what we want. We want the reduced price instead of the base price for each row in the cart, like on the screenshot below.

i hope you can help me, i'm looking for an answer for some hours now, and doesn't find any solution...


texts:
magento 2.1.9

i am currently missing 7 days worth of order reports, we have attempted to use aggrgated data but still no luck. we know we have sales orders on these days


texts:
I installed an extension which works fine on previous versions of Magento 2.2 but does not work on latest versions (e.g. Magento 2.2).

In that extension, they use following code in model to get current order:

$order = $this->_saleCollection->create()->getLastItem();

where _saleCollection is an instance of \Magento\Sales\Model\ResourceModel\Order\CollectionFactory.

I debugged this code and found that getLastItem() is causing problem. Could you guys please suggest me why Magento 2.2 is not properly executing this code and suggest some alternate solution?

This line of code actually runs in several locations:

When customer places an order.
When admin opens any order and clicks "send email".

In both scenarios $order contains current instance of order.


texts: Email layout handle phtml doesn't update in magento 2

texts:
I am developing a little custom Magento 2 extension that sends emails to admins on certain events.

In layout handle's phtml template file I originally made a spelling mistake, which when corrected doesn't show at all ( no change to the phtml file have any effect)

  Template file (view/frontend/email/low_stock_email.html)

{{template config_path="design/email/header_template"}}

The following products are low or out of stock

{{layout handle="low_stock_email_items" items=$items area="frontend"}}

Thank you!

{{template config_path="design/email/footer_template"}}

  Layout XML (view/frontend/layout/low_stock_email_items.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" label="Review Remind Email Order Items List" design_abstraction="custom">

        <block class="Hapex\AdminEmailNotifications\Block\Email\Items" name="items" template="Hapex_AdminEmailNotifications::email/items_low_stock.phtml" cacheable="false"></block>

</page>

  Old template phtml file
  (view/frontend/templates/email/items_low_stock.phtml)

<?php
$products = $block->getItems();
?>

<?php if(is_array($products)): ?>

            Name Product
            SKU

        <?php foreach($products as $product) :?>

                <?php echo $product['name'];?>
                <?php echo $product['sku'];?>

        <?php endforeach;?>

<?php endif;?>

  Updated one (view/frontend/templates/email/items_low_stock.phtml)

<?php
$products = $block->getItems();
?>

<?php if(is_array($products)): ?>

            Product Name
            SKU

        <?php foreach($products as $product) :?>

                <?php echo $product['name'];?>
                <?php echo $product['sku'];?>

        <?php endforeach;?>

<?php endif;?>

Emails still show the spelling mistake


texts: Magento 2 - force customer browsers to re-laod Cache fresh

texts:
we have set up a new Magento 2.3.1 page. We are using Lite Mage Cache.

We were live, but had to do several changes and to deploy the page new multiple times.

Now it seems, that several of our clients are facing problems with the styles, CSS and the Cache in general. Not all, but some.

Does anyone of you know, if there is any way, that I can force that my shop needs to be loaded completely new from the scratch in the clients browsers?

Is there any time stamp, any little code snippet or something like that, which I can include, so that the page will load for all clients completely fresh?

Any help here is highly appreciated.

Warm regards and thanks in advance


texts: Magento 2 backend update attributes on schedule, but never updates

texts:
I have tried to reindex but product attribute still not updated

Please check screenshot given below.


texts: Why stock in inventory is becoming negative even if no backorder is set in magento

texts:
Qty for some products is showing in negative. I didn't allowed any backorder but still I got the order for such products.
My magento version is 1.8.1.0.
Can anyone please help me in debugging this issue for why and how stock went into negative even when I didn't allowed for it!


texts:
Own plugin is not being executed when adding to cart with /guest-carts/:quoteId/items rest api. Nothing is logged.

<preference for="House\Encryption\Api\EncryptionInterface"
            type="House\Encryption\Model\Encryption" />

<type name="Magento\Quote\Api\Data\CartRepositoryInterface">
    <plugin disabled="false" name="Save" type="House\Encryption\Plugin\Save" />
</type>

class Save {

public function beforeSave(\Magento\Quote\Api\Data\CartItemInterface $cartItem)
{
    $om = \Magento\Framework\App\ObjectManager::getInstance();
    $storeManager = $om->get('Psr\Log\LoggerInterface');
    $storeManager->log(100,print_r('aaaaa',true));

}}

Thanks


texts: where do you set path for static assets in Magento2

texts:
as per magento2 guideline I have changed the documentRoot path to /pub/ folder as well changed the directory in env.php as
'directories' => [
    'document_root_is_pub' => true
]

now the Magento is correctly being served from pub directory.
but all static assets still having the path of mymagento/pub/static/...
if I remove the pub from the static url it works fine, though I am still need to removed static file signature added as well.
I have tried to change the rewriteBase in .htaccess file both in pub folder as well in the pub/static folder, but that doesn't seems to help.
where else I need to update in any configuration?
I have already done
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
php bin/magento cache:clean

anything else please suggest.


texts: Magento 2 How to move product option wrapper from FORM?

texts:
How to move product option wrapper from FORM?

When I am moving option wrapper form then add to cart is not working and when changed custom option values then the price is not updating

<container name="col9_product_page" label="Page col9 Content" htmlTag="div" htmlClass="col-sm-9">
                        <container name="custom_product_view" htmlTag="div" htmlClass="product-view single_product"/>
                        <container name="custom_product_price_addtocart" htmlTag="div" htmlClass="custom_product_price_addtocart"/>

                </container>

<move element="custom_media" destination="custom_product_view" />
<move element="product.info.addtocart" destination="custom_product_price_addtocart" />

and when add to cart and option wrapper both are in FORM then add to cart working and price is also changing when select custom options


texts: Magento 2: loginById does not update the header welcome message

texts:
I'm having an issue where my "Default welcome msg!" does not get replaced with the customer name as which I'm logged in. I'm calling loginById() on the customer session in my own controller, and the dropdown next to it shows "My Account", "My Wish List" and "Sign Out", so that works alright as far as that goes.

The code I'm using is:

class Login extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $session;

    /**
     * @var \Magento\Framework\Stdlib\Cookie\PhpCookieManager
     */
    protected $cookieManager;

    /**
     * @var \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory
     */
    protected $cookieMetadataFactory;

    /**
     * Login constructor
     *
     * @param \Magento\Customer\Model\Session $session
     * @param \Magento\Framework\Stdlib\Cookie\PhpCookieManager $cookieManager
     * @param \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory
     * @param \Magento\Framework\App\Action\Context $context
     */
    public function __construct(
        \Magento\Customer\Model\Session $session,
        \Magento\Framework\Stdlib\Cookie\PhpCookieManager $cookieManager,
        \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory,
        \Magento\Framework\App\Action\Context $context
    ) {
        parent::__construct($context);

        $this->session = $session;
        $this->cookieManager = $cookieManager;
        $this->cookieMetadataFactory = $cookieMetadataFactory;
    }

    /**
     * @return \Magento\Framework\Controller\Result\Redirect
     */
    public function execute()
    {
        /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT);
        $resultRedirect->setUrl($this->_redirect->getRefererUrl());

        try {
            $customerId = 1;

            $this->session->regenerateId();
            $this->session->loginById($customerId);

            if ($this->cookieManager->getCookie('mage-cache-sessid')) {
                $metadata = $this->cookieMetadataFactory->createCookieMetadata();
                $metadata->setPath('/');
                $this->cookieManager->deleteCookie('mage-cache-sessid', $metadata);
            }

            $this->messageManager->addSuccessMessage(__('Successfully logged in '));
        } catch (\Exception $exception) {
            $this->messageManager->addErrorMessage(
                __('An error occurred while processing your login. Please try again later.')
            );
        }

        return $resultRedirect;
    }
}

When I try the same action for a second time (after first logging out) the header gets updated with my customer name and everything seems to be working as it's supposed to.

I checked how Magento is handling the login behavior and as far as I can see I'm basically doing the exact same thing (except for using loginById instead of authenticating the customer).


texts:
How to change the product list 'desc' direction?

Now Old product is default.

I want to change is new product position is default > ?product_list_dir=desc

using Magento Version 2.2.4

thank you!


texts: How to display a timer countdown from a static block

texts:
I want to display a timer countdown on a HOME page like a banner.

I found the question Timer countdown in product view page, but I don't know how to use it for the home page.

Where do I put this code and how do I use them?:

PHP code:

<?php $end_datetime='your end date and time';
    $date =  date("Y/m/d H:i:s", strtotime($end_datetime));

    $endstr = date(strtotime($date));

    $nowstr = Mage::getModel('core/date')->timestamp(time());
    $now = date('Y/m/d H:i:s', $nowstr); ?>

JavaScript code:

function getTimer(dt, no)
{
    var end = new Date(dt);
    var now_date = new Date(no);
    var _second = 1000;
    var _minute = _second * 60;
    var _hour = _minute * 60;
    var _day = _hour * 24;
    flag_time = true;
    timer = '';
    setInterval(function(){showRemaining();}, 1000);

    function showRemaining()
    {
        var date = no;
        var now = new Date(date);
        var de= now.getTime();

        if (flag_time) {
            timer = de;
        }
        var d = new Date(timer);
        currentYear = d.getFullYear();
        month = d.getMonth() + 1;

        var currentDate = d.getDate();
        currentDate = currentDate < 10 ? '0'+currentDate : currentDate;

        var hours = d.getHours();
        var minutes = d.getMinutes();
        var seconds = d.getSeconds();

        minutes = minutes < 10 ? '0'+minutes : minutes;
        seconds = seconds < 10 ? '0'+seconds : seconds;
        var strTime = hours + ':' + minutes+ ':' + seconds;
        timer = timer + 1000;
        var now_time = currentYear + '/' + month + '/' + currentDate + ' ' + strTime;

        var now = new Date(now_time);
        var distance = end - now;

        if (distance < 0) {
            if (distance > -3)
            {
                location.reload(true);
                return;
            };

            clearInterval(timer);
            document.getElementById('countdown').innerHTML = 'Completed';

            return;
        }

        var days = Math.floor(distance / _day);
        var hours = Math.floor((distance % _day) / _hour);
        var minutes = Math.floor((distance % _hour) / _minute);
        var seconds = Math.floor((distance % _minute) / _second);

        if (days < 10)
            {days = '0' + days;}
        if (hours < 10)
            {hours = '0' + hours;}
        if (minutes < 10)
           { minutes = '0' + minutes;}
        if (seconds < 10)
            {seconds = '0' + seconds;}

        if (days==00)
        {
            dytext = '';
        }
        else if(days==1)
        {
            dytext = ''+ days +' Day  ';
        }
        else
        {
            dytext = ''+ days +' Days  ';
        }

        if (hours==00) {
            hrtext='';
        }
        else {
            hrtext = ''+ hours + ''+ ":";
        }

        if (minutes==00)
        {
            mintext='';
        }
        else {
            mintext = ''+ minutes +''+ ":";
        }

        sectext = ''+ seconds +'';
        document.getElementById('countdown').innerHTML = dytext + hrtext +  mintext + sectext;
        flag_time = false;
    }

For more information, I'm using Magento CE 1.9.2.4 and Ultimo with the Infortis theme.


texts: How to add image upload to description field in product edit?

texts:
I added tinyMCE in textarea for description field in product edit form, but image upload is not showing. When i open default editor everything is working good. What is wrong with my code?
My code:

        tinyMCE.init({
        mode : "exact",
        elements: "description",
        theme : "advanced",
        plugins: "inlinepopups,safari,pagebreak,style,layer,table,advhr,advimage,emotions,iespell,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
        theme_advanced_buttons1 : "magentowidget,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_path_location : "bottom",
        extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
        theme_advanced_resize_horizontal : 'true',
        theme_advanced_resizing : 'true',
        apply_source_formatting : 'true',
        convert_urls : 'false',
        force_br_newlines : 'true',
        doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'

    });

Thanks for help


texts: Payment credit card fields not visible in safari browser in Magento 2.2.5

texts: I'm working on a project in Magento-2.2.5 but on checkout the payment method add cards and other fields does not appear. This issue only occurs in safari browser, in other all browser it works fine. If someone please help me in this, it's really a head-ache. I'm not finding anything what new I can do because I can't even change the default code, it's working well in other browsers. please tell me if it's a browser conflict ? please help, thanks in advance.


texts: How to add extra container to page header in Magento 2

texts:
I am working on a new theme which is based on the Luma theme. I need to add a extra container to page header.my problem is that I can't identify how/where to add this.

Can anyone advise on what page i need to edit for this?

See the reference image


texts: How To Debug Magento Mystery Error on saveOrderAction() When All Debugging Is Enabled and No Error Message?

texts:
As title says all Magento debugging is enabled, and in php.ini all debugging is enabled, and mysql debugging is enabled. Error messages show fine in general. I can call for example a method that doesn't exist and it shows the error fine. The issue is: How do you debug an error when nothing is in the response and there is no error message?

I am clicking on place order on checkout and it just loads and then the button shows again, and looking in Chrome network to view the response, and there is none. I have tried debugging with xdebug following the execution, and on $this->getOnepage()->saveOrder() is where it seems like execution stops, but no error message or any clue as to why it doesn't work (like maybe a mysql integrity violation message).

Has this happened to any of you? How did you find the error?


texts: Use or purpose of magento2-base folder in vendor/magento

texts:
Can anyone please let me know what's the use of magento2-base folder under vendor/magento directory? Most of the time, some search results show the error message obtained from this directory.

Note : I want to know magento2-base folder under vendor/magento directory and not the view base area of working like adminhtml and frontend.

What's the actual purpose of magento2-base folder under vendor/magento directory?


texts: Magento 2 how to get get product ID in after plugin?

texts:
please help, I'm struggling with this.

I'm using this plugin

public function afterAddProduct($subject, $productInfo, $requestInfo = null)

I'm trying to get the product Id of the product in this way:

$productId = $subject->getId();

$productId = $productInfot->getId();

none of this works, i'm getting nothing, when I print with echo I get this:

Product ID:

I'm struggling a lot with this, I could get the product ID with beforeAddProduct in this way, but I must use afterAddProduct because is the only plugin that fits my solution.

Greetings!


texts: How to get categories detail from product item added in cart

texts:
I want to get categories details like name and id from the product item which are added the in cart.

please help out in getting data of checkout cart product and i want to use it in my custom module every time i try to getting data it gives me null by using

$this->_cart->getQuote()->getItemsCollection();


texts: Exception: MySQL error when trying to re-index catalog_product_flat

texts:
Was updating my indexes and noticed that one had failed, upon further investigation it looks like catalog_product_flat throws the following exception:

  exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1005 Can't create table ie2837g324t34t43r87g.sql-4416_38f7 (errno: 121 "Duplicate key on write or update")' in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php:228

Does someone have a statement I can run to resolve this error?
or
Should I drop the catalog_product_flat table and re-index to recreate it?

EDIT:
Just tried running the repair tool and it says

I know I'm not the only one to have this because Google leads to links back to the old magento forum or people post that they fixed the issue but didn't outline what they've done.


texts: How to create map Pick up Location input in Frontend. Magento2

texts:
I want to create a pick up input type in frontend where the user will select the location in map n then I'll get Latitude and Amplitude.

Like you can see from the image. How can I create this? thanks


texts:
Insecure  call. Found on line # 1 in file:
  www.mydomain.something/index.html is preventing the secure padlock

One site I have not use CloudFront so I changed the base URL to ..https://mydomain.something and that worked.

I have another site which uses CloudFront so the URLs are different each base URL is set using www.randomlettershereruegherh.cloudfront.something and not  {{unsecure_base_url}}

If I change the base URL by adding https will I have to change the other URLs as well for example from:

http://randomlettershereruegherh.cloudfront.net/skin/

to:

https://randomlettershereruegherh.cloudfront.net/skin/

Thanks in advance


texts:
I know this is an old question with a lot of answers, most of them suggest editing the menu template but that does not work for me. There is no need to explain why, let's say I'm a bit OCD about doing things the "right" way.
This question may serve as material for others in need. Here goes.
Starting with Magento 1.7 the top menu is built using an event: page_block_html_topmenu_gethtml_before. This is used by the Mage_Catalog module to add the categories. I want to use that.  For this I've created an observer in my module like this:

<global>
    <events>
        <page_block_html_topmenu_gethtml_before>
            <observers>
                <my_observer>
                    <class>mymodule/observer</class>
                    <method>addItemsToTopmenuItems</method>
                </my_observer>
            </observers>
        </page_block_html_topmenu_gethtml_before>
    </events>
</global>

In the Observer.php class I have

public function addItemsToTopmenuItems($observer){
    //get the menu object: //Type Varien_Data_Tree_Node
    $menu = $observer->getMenu();
    //get the tree object in the menu //type Varien_Data_Tree
    $tree = $menu->getTree();
    //get current page handler
    $action = Mage::app()->getFrontController()->getAction()->getFullActionName();
    $brandNodeId = 'category-node-brand';
    //set the node id, label and url
    $data = array(
        'name' => Mage::helper('catalog')->__('Brands'),
        'id' => $brandNodeId,
        'url' => Mage::getUrl('brands'),
        'is_active' => ($action == 'brands')
    );
    //create a node object
    $brandNode = new Varien_Data_Tree_Node($data, 'id', $tree, $menu);
    //add the node to the menu
    $menu->addChild($brandNode);
    return $this;
}

My observer has some other code that adds all the brands as sub-items of the Brands menu  but there is no need for that here.
This works perfectly and adds a menu Brands as a last item in the menu.
The issue is that I want this as the first menu and my observer is called after the observer in Mage_Catalog that adds the categories. Since there is no way (not that I know of) to sort the order of the observers on an event ...I have a problem
[EDIT]
As @Benmarks suggested I made the Mage_Catalog module depend on my module and now my menu item is the first in the list. But I still have to add menus between the categories and at the end. Creating a new module would probably solve the problem with the items at the end of the menu, but I still have an issue with the ones between categories,
[/EDIT]
So basically my question resumes to "(How) can I move around child nodes of a Varien_Data_Tree_Node in a Varien_Data_Tree object?"
Please don't suggest adding the Brands as the first category in the category tree. This is not an option (like I said...my OCD about these things).


texts:
I'm trying to add an alternative image for all config product images. To do so I extended Magento\Catalog\Block\Product\Image. For some reason $product->getMediagalleryImages() always returns the same gallery for all products in the collection though. Is this the correct way of loading a media gallery for a product in M2?

<?php
namespace Ac\Catalog\Block\Product;

use Magento\Framework\View\Element\Template\Context;
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Gallery\ReadHandler;

class Image extends \Magento\Catalog\Block\Product\Image
{
    protected $_productModel;
    protected $_galleryReadHandler;

    public function __construct(
        Context $context,
        Product $productModel,
        ReadHandler $galleryReadHandler,
        array $data = []
    ) {
        if (isset($data['template'])) {
            $this->setTemplate($data['template']);
            unset($data['template']);
        }

        parent::__construct($context, $data);

        $this->_productModel = $productModel;
        $this->_galleryReadHandler = $galleryReadHandler;
    }

    public function getSrcAlt(): string
    {
        $product = $this->_productModel->load($this->getProductId());
        if (strpos($product->getTypeId(), 'configurable') === false) {
            return '';
        }

        $i = 0;
        $this->_galleryReadHandler->execute($product);
        foreach ($product->getMediaGalleryImages() as $image) {
            if (++$i < 2) continue;
            return sprintf('data-src-alt="%s"', $image['url']);
        }

        return '';
    }
}


texts: Fatal error: Uncaught Error: Call to a member function getTypeId() Magento 2.3.0

texts:
Show Error after click ship only one product

Fatal error: Uncaught Error: Call to a member function getTypeId() on null in /var/www/vhosts/xyz.com/httpdocs/vendor/magento/module-inventory-shipping-admin-ui/Model/IsOrderSourceManageable.php:71 Stack trace: #0 /var/www/vhosts/xyz.com/httpdocs/vendor/magento/module-inventory-shipping-admin-ui/Observer/NewShipmentLoadBefore.php(81): Magento\InventoryShippingAdminUi\Model\IsOrderSourceManageable->execute(Object(Squareup\Omni\Model\Sales\Order\Interceptor)) #1 /var/www/vhosts/xyz.com/httpdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): Magento\InventoryShippingAdminUi\Observer\NewShipmentLoadBefore->execute(Object(Magento\Framework\Event\Observer)) #2 /var/www/vhosts/xyz.com/httpdocs/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\InventoryShippingAdminUi\Observer\NewShipmentLoadBefore), Object(Magento\Framework\Event\Observer)) #3 /var/www/vhosts/xyz.com/httpdoc in /var/www/vhosts/xyz.com/httpdocs/vendor/magento/module-inventory-shipping-admin-ui/Model/IsOrderSourceManageable.php on line 71


texts:
Im trying to add custom JS in my new theme.
I managed to add custom css in default_head_blocks.xml
Like this:

<css src="css/customtheme.css" />
<css src="css/styles-m.css" />
<css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
<css src="css/print.css" media="print" />

Now i tried to do the same with javascript:

<script src="js/javascript.js" />

To test it i added this code in js/javascript.js:

alert('test!');

But sadly nothing. What is the corrrect way to include javascript in a custom magento 2 theme?

Thanks in advance,

-Kevin


texts:
I am trying to use the Magento REST API for a client to get details of customers, and orders, etc. I have setup a REST Consumer and I am trying to obtain an oauth access token and having issues. I have found a API call http://clients_magento_shop/api/rest/integration/access/token in the documentation, passing the username and password in the body, however I am getting the following error "Request does not match any route" - its like the API resource doesn't exist.

The application I am building will be a background task, so having the user login to Magento to authorize the request token isn't an option. So I have tried to fake a login and authorization by GET and POST operations through C#. This works great on a standard Magento setup but because the client is using a hosting single signon provider, I cant get to the login page to obtain the Form-Key, which is part of the login POST. Therefore I am stuck.


texts: SearchCriteria vs Collection - Query Performance Difference

texts:
I am trying to refactor get category data method. Initially, it was written with Collection filter. Later I refactored with the search builder interface.

When I tried to compare the querying time, I found the Collection query seems to be faster.

Here is a performance difference.

Can we assume that filtering through the collection factory is faster than a search criteria builder?

1st collection method

2nd search criteria

Code snippet

\Magento\Framework\Profiler::start('category-collection-timer');
$collection = $this->_categoryCollectionFactory->create()->addFieldToFilter('is_feature',1)->addAttributeToSelect(['name', 'is_active', 'parent_id', 'image'])->setStoreId($this->_storeManager->getStore()->getId())->setPageSize(8)->setCurPage(1) ;
\Magento\Framework\Profiler::stop('category-collection-timer');

Code snippet

\Magento\Framework\Profiler::start('category-list-timer');
            $featuredFilter=$this->filterBuilder->setField('is_feature')->setValue('1')->setConditionType("eq")->create();
            $activeFilter=$this->filterBuilder->setField('is_active')->setValue('1')->setConditionType("eq")->create();
$group1=$this->filterGroupBuilder->addFilter($featuredFilter)->create();
$group2=$this->filterGroupBuilder->addFilter($activeFilter)->create();
            $searchCriteria=$this->searchCriteriaBuilder->setFilterGroups([$group1,$group2])->create();
$searchCriteria->setPageSize(8)->setCurrentPage(1);
$categorylistresults=$this->categoryList->getList($searchCriteria);
$categories=$categorylistresults->getItems();
\Magento\Framework\Profiler::start('category-list-timer');


texts: How to enabel/disable a shipping method based on Order Subtotal?

texts:
I am learning Magento and trying to create a shipping method that appears only when the subtotal of the cart is over than $100.

I tried to getSubTotal() in function collectRates(), then return false if the return value smaller than 100. However, it always returns 0. I guess it had not been calculated at that step, is that true?

And is there any other way I can do what I wanted?

Please help... Thank you a lot!


texts: custom module local > etc > config file not working magento

texts:
I am new to magento development.Routes end with 404 page

It end with 404 page not found but if I move xml tags for routes to Adidas_CasualShoes.xml routes start working. it look like my local module configuration file is not working.

How I can debug and resolve this issue.


texts: Get Countries and related Cities REST API

texts:
I have a form in my mobile app for shipping information. I am looking for REST API to get countries and its related cities.

I found only an API:

V1/directory/countries

How can I get cities for each country ?


texts: Magento 2 | Create custom customer attribute as a dropdown

texts:
I want to create a custom customer account which should be displayed as dropdown in frontend (customer registration) and backend (edit customer).

I only was able to create a "normal" custom attribute.

Anyone knows how I can do that?

Thanks!


texts:
I have dynamic content in my block which is cached so I exclude this block from cache in the easiest way. I've created cache.xml which looks like:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <placeholders>
         <my_category_view>
            <block>catalog/category_view</block>
            <placeholder>MY_CATEGORY_VIEW</placeholder>
            <container>Custom_Package_Model_Container_Category_View</container>
            <cache_lifetime>86400</cache_lifetime>
        </my_category_view>
    </placeholders>
</config>

and i've created container:

class My_Package_Model_Container_Category_View extends
  My_Page_Model_Container_Abstract
    {
           const PREFIX = 'MY_CATEGORY_VIEW';
    }

and it works great. the block is excluded from FPC, but the problem is that after refreshing the page I've got exception.

  Fatal error: Call to a member function getChild() on a non-object

in this line:

$platform_filter=$this->getLayout()->getBlock('enterprisecatalog.leftnav')->getChild('platform_filter');

any idea how to fix that? I've spent 2 days on it and still cannot resolve it.


texts:
It seems like since today morning UPS rates are not loading. When I enable the UPS debug I get the following in result

    2019-01-07T11:24:09+00:00 DEBUG (7): Array
(
    [request] => Array
        (
            [accept_UPS_license_agreement] => yes
            [10_action] => 4
            [13_product] => SKU1
            [14_origCountry] => US
            [15_origPostal] => 07647
            [origCity] =>
            [19_destPostal] => 60605
            [22_destCountry] => US
            [23_weight] => 12.9
            [47_rate_chart] => Customer Counter
            [48_container] => 00
            [49_residential] => 01
            [weight_std] => lbs
        )

    [result] => \<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
\
\
\<TITLE>Error 404--Not Found\</TITLE>
\
\
\\

\
\
\\

\\
Error 404--Not Found\

\\	\

\

\
\
\\\\
From RFC 2068 \Hypertext Transfer Protocol -- HTTP/1.1\:\

\\\
10.4.5 404 Not Found\

\\
\The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.\
\
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.\\

\\	\

\

\
\

    [__pid] => 7111
)

I tried with multiple Magento1 project and I got the same result.
Is this known issue or did someone receive this kind of issue ?


texts: How to Customize Magento 2 header layout with luma theme

texts:
I use Magento 2 with luma theme and trying to change the header layout but I don't know the best way to do that.

ie. I want the logo in div with some styles and the navigation in another div and so on.

How to achieve this?


texts: Magento 2.1.8- How to disable or remove images from all products in the frontend?

texts: I don't want to show any image...small, thumbnail or any on both catalog and product details page at the frontend, and in the cart or in any other component. I'm using default theme - Luma and navigated to a path <magento dir>/vendor/magento/theme-frontend-luma/etc and watched the file view.xml there. I want to remove or disable all the <media> and <image>, and <var> also has something like image gallery n image pan parameters. Is there anything programmatically or Layout xml from admin panel in the design it can disable? In the medicines or vaccination, you have nothing to display in the images, just a name is sufficient in the catalog display. So I want to remove the default Magento images.


texts: What's the simplest way to handle special pricing and wholesale tiered pricing?

texts:
So here are the requirements:

Support for special pricing (we do sales a couple times a year)
Support for wholesale pricing by customer group
Support for configurable and simple products.

Seems simple enough, but here are some of the complications:

Initially I used Tiered Pricing to accomplish wholesale pricing - works great for breaking down pricing by customer group and quantity.  But it's broken for configurable products.

So I did something similar to what Simple Configurable Products does which is just to always add the Simple product to the cart whenever a customer adds a configurable to the cart.

But then I stumbled onto another problem, which is that in our case - and I'm not sure if this is normal for wholesale workflows or not - we need wholesale pricing to kick in across different products.  So for example, someone buys 4 units of Product A and 2 units of Product B, since they're buying more than 6 units and are in the wholesale customer group, they need to get the wholesale discount.

So at this point I switched over from doing Tiered Pricing to simply using Shopping Cart Price Rules to accomplish the same discount based off of the product category and the customer group.

But now I have a problem when a product has a special price, because now the wholesaler will get their wholesale discount stacking with the special price, which we don't want.

It would be great if I were using Tiered Pricing b/c Magento already has that case handled natively - it picks the lower of the two if both Special Prices and Tiered Prices are used.  But I can't do that because of the above issues.

So what I'm planning to do now is simply use Shopping Cart Price Rules for the sale pricing and avoid using Special Prices altogether.  The downside there is that I won't get my nice original price / final price per product that I can use to show the original price striked-out with the sale price in bold.

Is there a simpler way of implementing the business logic I'm getting at?  And/or on a less technical and more business level (that's allowed here right?) - is any of this business logic unnecessary / overkill for standard wholesale workflows?


texts: How to Make Class or module to support M 2.1.7 and M 2.2.4 version in Magento 2

texts:
I have one custom module which is working fine for M 2.1.7
in that module, I extend \Magento\Bundle\Model\Product\Type

in M 2.2.4 they added a new class for core file and passed to __construct

that is Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier
is a new file or class in M.2.2.4 and used in \Magento\Bundle\Model\Product\Type::__construct

but in M 2.1.7 above class is not used and also not exists

what is the best approach so that my extended class should support both the version that is (M 2.1.7 and aM 2.2.4)?

Note:- I cannot  use Plugin because I need to modify the logic in _prepareProduct() which is protected


texts:
I have a live and testing servers. I have cloned my live website to the development stack and have some problem when trying to access it.

I have edited the local machine hosts file and mapped the DNS, however when trying to access the website it was redirecting to the live website. I managed to fix this by editing 4 rows in my core_config_data table for my development site:

web/unsecure/base_url       -> http://dev.mydomain.com

web/secure/base_url         -> http://dev.mydomain.com

web/unsecure/base_link_url  -> http://dev.mydomain.com

web/secure/base_link_url    -> http://dev.mydomain.com

However, if I navigate to the dev.mydomain/admin and try to log in, it gives me error that the username or password is incorrect or the account has been temporary disabled.

I had similar problem with Magento 1 and fixed it by either commenting out these lines in app/code/core/Mage/Core/Model/Session/Abstract/Varien.php:

$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath()
    // 'domain'   => $cookie->getConfigDomain(),
    // 'secure'   => $cookie->isSecure(),
    // 'httponly' => $cookie->getHttponly()
);

Or running a query in MySQL client:

 DELETE FROM core_config_data WHERE path = "web/cookie/cookie_domain";
 DELETE FROM core_config_data WHERE path LIKE "web/secure/base%";
 DELETE FROM core_config_data WHERE path LIKE "web/unsecure/base%";

Anyone know how to solve the problem with Magento ver 2.1.8?


texts:
Where to manually download Magento 2.2.2.

I have a Magento 2.1.8 installation and want to migrate, but I use commercial modules that are not compatible with Magento 2.2.4-dev, currently on GitHub.

I am obliged to do the upgrade manually, because the initial web store was built so. The developpers put the Magento Files manually in "app/code".

If you have an Idea how to solve this problem, please give your feedback.

Many Thanks !


texts: How to get same products from rest api as are visible on frontend?

texts:
We would like to use REST API for mobile application where should be the same products as we have on frontend.

There are this conditions (params)

website ID (or store ID) we have multisite
show configurable products which are active and which have min one simple product which is active and which is sellable (qty > 0 or backorders are allowed)
Show simple which are visible individually and which are sellable (qty > 0 or backorders are allowed)
category ID

Is it possible to achieve product list with rest api (GET V1/products) or we should create own api call?

Where I can find all available params for searchCriteria for call

  V1/products?

Where is documented that I can use

  searchCriteria[filter_groups][0][filters][0][field] = category_id for
  V1/products?

Thanks


texts: I was wondering if the Magento trigger the postdispatch observers or not if the current controller action failed to pass the validation?  For example, we have an observer created for action controller_action_postdispatch_customer_account_createpostso if the scenario failed to pass the customer_account_createPost action (i-e may be some validation which Magento handle) so my controller_action_postdispatch will still be executed in the failed scenario or it will only be executed in the success scenario?


texts: Magento 2.2.3 Cron job won't run. Status is missed. One is stuck in running. How to fix?

texts:
I am having an issue with my Magento 2.2.3 using PHP 7.1 My cron jobs are set as follows:

9,24,38,52 * * * * /usr/local/bin/php /home/website/public_html/update/cron.php >> /home/stebbins/public_html/var/log/update.cron.log

1,25,39,55 * * * * /usr/local/bin/php /home/website/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/stebbins/public_html/var/log/magento.cron.log

0,9,39,49 * * * * /usr/local/bin/php /home/website/public_html/bin/magento setup:cron:run >> /home/stebbins/public_html/var/log/setup.cron.log

When I run the group crons via CLI it says they ran as scheduled, but nearly all appear as status "Missed" and "Too late for schedule". There are also 6 instances of the order export job with status of "running". Please see the screen shots below this message for the cPanel cron settings, cron_schedule table, and Magento admin cron settings.

I think this is due to the crons being "stuck", for lack of a better term and I've been reading the documentation at https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html . I am having a really hard time getting this fixed and I'm spinning my wheels, so, I'm posting here to hopefully get an answer.

Should I manually delete all the "running" jobs from the cron_schedule table?
Is there a CLI command for Linux for this?
Am I just barking up the wrong tree and do you have a better fix?

Thanks so much in advance!

---Screen shots below---


texts: Magento 2: change the order of the product page blocks

texts:
I am working on a Magento 2.1.7 shop and  I have created a child-theme of Magento Blank.

On the product page, I need to change the layout so that the product photo stays at the left side of the page and the product info at the right, with both div's floated left.

The catalog_product_view.xml looks like this:

<?xml version="1.0"?>
<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="div.sidebar.main" remove="true" />
    <referenceContainer name="main" htmlClass="col-xs-12 col-sm-12">
    </referenceContainer>
</page>

Doing this:

<?xml version="1.0"?>
<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="div.sidebar.main" remove="true" />
    <referenceContainer name="main" htmlClass="col-xs-12 col-sm-12">
    </referenceContainer>
    <move element="product.info.main" destination="main" before="product.info.media"/>
</page>

brings the photo before the main info but also brings the tabs between them:

What I need is:

How must I change the code above and/or what other files shall I edit to get the desired result?


texts: How can I fetch the data in the quote_item table for a specific item ? I'm trying to get the product name with "gift" at the end.


texts:
Is there a way to load a quote_item directly using current Magento coding standards?

Right now I'm loading the cart and then finding the quote item like so:

$cart_id = $this->getRequest()->getParam('cart');
$item_id = $this->getRequest()->getParam('item');
/** $this->cartItemRepo = Magento\Quote\Api\CartItemRepositoryInterface **/
$items = $this->cartItemRepo->getList($cart_id);
$quote_item = null;
foreach($items as $item){
    if ( $item->getId() && $item->getId() === $item_id ){
        $quote_item = $item;
        break;
    }
}

The above works but I want to clean it up and simplify. I would also like to load using just the $item_id, with no $cart_id.


texts:
I am creating my custom theme and want to remove some default blocks from site. I have tried this code

<referenceBlock name="navigation.sections" remove="true"/>

But it is not working for me.


texts: Where I can find the Magento2 reinforcement exercises?

texts:
I’m taking the magento2 boot camp and I’m watching the supplied videos.
However, I’m struggling to find any reinforcement exercise guide mentioned for example in 1.3.1 or 1.5.1, neither I’m able to find what exercise I should do. Was only able to find the exercise solutions. Wrote to support but still no answer

Anyone knows where I should find it?


texts: can we create two observer with same event in Magento2?

texts:
I need to create one observer after the customer is logged in.

I found this is the event name customer_login

My point is I installed one third-party module for some requirement.
Where that extension has already created that event for their requirement.

I need to create it for some purpose in my own module.

So can I create it in my module? Is that is allowed to create the same event multiple times?


texts: How to get product list and create product in fronend Magento 2?

texts:
In magento 2, I want create page allow user create product and get list product be created by user. How to I can make it? Any suggestion?
Many thanks.


texts: Reindex catalog rules eats up all the RAM

texts:
I'm working on magento 2.1.9 with 1500 configurable products that leads to ~30k simple products. Unfortunaly our customer doesn't apply a percentage of discount over the products, but set a "new price" amout for every configuration (not simple) so we have ~1000 catalog rules linked to each configurable SKU.

when we had 300 configurable products  reindexing the catalog price rules took 3 minutes, and less than 2GB of ram, now, to avoid out of memory we allocated 10GB of ram for the script, and it takes 20minutes to complete. We also had to switch reindexing on "schedule" since saving a single product rule was leading to 20minutes delays (and timeouts)

it seems ram usage is proportionally related to the number of products and rules, but that means when we'll have 5k configurable products we'll have to allocate 40GB of ram, and it seems a bit too much, just for reindexing the price rules...

can someone please tell me if there is something wrong with the reindexing process, or if this beavior is normal?

PHP Fatal error:  Allowed memory size of 5293211648 bytes exhausted (tried to allocate 20480 bytes) in /***/magento/module-catalog-                                            rule/Model/Rule.php on line 346

thanks,


texts: Fatal error: Call to a member function getData() on a non-object in base/default/template/email/order/shipment/items.phtml on line 30

texts:
I am trying to add SUBTOTAL, SHIPPING, GRAND TOTAL in shipping order email.

I have added the following code in

  base/default/template/email/order/shipment/items.phtml

<?php
    $_totalData = $_order->getData();
    $_sub = $_totalData['subtotal'];
    $_grand = $_totalData['grand_total'];
    $shipping_amount = $_order->getShippingAmount();
?>

In the same file echo the data's, code following

         SUBTOTAL

         &#8377; <?php echo number_format($_sub); ?>

         SHIPPING

         &#8377; <?php echo number_format($shipping_amount); ?>

         GST

         &#8377;
         <?php
            $sub = number_format($_sub);
            $gst_tax = 0.03;
            $gst = $sub*$gst_tax;
            echo round($gst);
            ?>

         GRAND TOTAL

         &#8377; <?php echo number_format($_grand); ?>

I am trying to Preview the mail in admin->Transactional Emails->shipping email it is showing an error like

  Fatal error: Call to a member function getData() on a non-object in /home/mw/public_html/app/design/frontend/base/default/template/email/order/shipment/items.phtml on line 30


texts: Change markup used for product options in 1.9.x

texts:
I'd like to overwrite the way this file works:

  app\code\core\Mage\Catalog\Block\Product\View\Options\Type\Select.php

I thought all I had to do was copy it to:

  app\code\local\Mage\Catalog\Block\Product\View\Options\Type\Select.php

That does not appear to be working. Is there another option available?  My goal is just to change the HTML that is used here.


texts: Custom Grid Date filter format problem on search

texts:
I'm trying to format the display and also the datepicker value when selecting the date in Filter for my custom grid. Now the display works fine the only problem is when I filter it, it doesn't work as expected. Example I selecte a date from Feb 18, 2021 to March 17, 2021. Now in the filter it works great as it's displaying as 18/02/2021 and 17/03/2021. But the result is different. It seems Magento is interpreting in as 02/18/2021 and 03/17/2021 hence the result is wrong. Now I have this in my xml
<column name="date_paid" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
  <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
      <item name="filter" xsi:type="string">dateRange</item>
      <item name="sortOrder" xsi:type="number">5</item>
      <item name="dateFormat" xsi:type="string">d/MM/Y</item>
    </item>
  </argument>
  <settings>
        Date Paid
        <sortable>false</sortable>
        <draggable>false</draggable>
        <filter>dateRange</filter>
        <dataType>date</dataType>
  </settings>
</column>

And I also tried this
<column name="date_paid" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
  <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
      <item name="filter" xsi:type="string">dateRange</item>
      <item name="sortOrder" xsi:type="number">5</item>
    </item>
  </argument>
  <settings>
        Date Paid
        <sortable>false</sortable>
        <draggable>false</draggable>
        <filter>dateRange</filter>
        <dataType>date</dataType>
        <dateFormat>d/MM/Y</dateFormat>
  </settings>
</column>

But all of this is producing a wrong result. Now when I try to remove the parameter dateFormat the result is correct.
How do I tell Magento to only format the display but the way it submit should be like the default? I was thinking that will be the only way to achieve what I want. I just want it to display in a d/MM/Y format


texts: Mage::Log - Write to a Custom Database table

texts:
I have two question regarding Mage::Log.

We are working on an application using Magento. We would like to write programming errors to custom database table. Is it possible to do the same using Mage::Log.

Is it recommended to write the error log to a database table. Or should we continue using the exception.log and system.log. We have added some try catch block in our code, so if there are any exceptions occurred, then would like write it to a DB table or to log files. Which is the best practice to follow.


texts: magento ERR_EMPTY_RESPONSE unable to add product or do any changes in backend

texts:
i am unable to save product after i installed my theme, it keeps on loading "Please wait" for long time and does not saves at all with below error

i get below error in console :

POST http://www.mywebite.com/index.php/admin/catalog_product/validate/id/61/key/xxxxxxxxx/?isAjax=true net::ERR_EMPTY_RESPONSE

and when i tried to debug network request i see below

http://www.mywebite.com/index.php/admin/catalog_product/validate/id/61/key/xxxxxxxxx/?isAjax=true

Failed to load response please guide me how to fix this error

2:Also when u try to save to do any setting i get below error in browser

No data received

ERR_EMPTY_RESPONSE

Is it server error or magento error


texts: I am trying to remove block block-layered-nav from website. I have looked through the website and found people wanting to remove the catorgies, price ect but not the block. Can someone point me in the right direction please.


texts: How can i export fields like category name not category id via Dateflow-profiles export

texts: I need to get my all products category name, actually dataflow profiles return category id only, how can i get category name not category id.


texts: Setting multiple checkbox option selections on cart item

texts:
I have a product in my store with radio and checkbox custom options. using below JSON encoded string to add that item with it's options to shopping cart within my mobile app.

{
 "cartItem": {
    "qty": 1,
    "sku": "margherita",
    "quote_id": 134,
    "product_option": {
        "extension_attributes": {
            "custom_options": [
              {
                "option_id": 15,
                "option_value": 67

              },
              {
                "option_id": 16,
                "option_value": 70

              },
              {
                "option_id": 16,
                "option_value": 71

              }
            ]
        }
    }
  }
}

but cart doesn't remember all checkbox selections, only the last one - say, with option value 71 in this example (16 is checkbox option id here).

Any suggestions how I can encode options into cart item string for cart to be able to carry all checkbox option selections?

This is original blueprint cart item JSON string from Magento's doc:

{
"cartItem": {
"item_id": 0,
"sku": "string",
"qty": 0,
"name": "string",
"price": 0,
"product_type": "string",
"quote_id": "string",
"product_option": {
  "extension_attributes": {
    "custom_options": [
      {
        "option_id": "string",
        "option_value": "string",
        "extension_attributes": {
          "file_info": {
            "base64_encoded_data": "string",
            "type": "string",
            "name": "string"
          }
        }
      }
    ],
    "bundle_options": [
      {
        "option_id": 0,
        "option_qty": 0,
        "option_selections": [
          0
        ],
        "extension_attributes": {}
      }
    ],
    "downloadable_option": {
      "downloadable_links": [
        0
      ]
    },
    "giftcard_item_option": {
      "giftcard_amount": "string",
      "custom_giftcard_amount": 0,
      "giftcard_sender_name": "string",
      "giftcard_recipient_name": "string",
      "giftcard_sender_email": "string",
      "giftcard_recipient_email": "string",
      "giftcard_message": "string",
      "extension_attributes": {}
    },
    "configurable_item_options": [
      {
        "option_id": "string",
        "option_value": 0,
        "extension_attributes": {}
      }
    ]
  }
},
"extension_attributes": {}
}
}


texts: Why blank space appear in body layout in magento 2?

texts:
Blank space shows top a product details page, Please someone help to how to recover it.

Update:

I realized  i had a mistake in below file

  vendor/magento/module-catalog/view/frontend/templates/products/onegraph/general.phtml


texts: Magento 2 - WorldPay for Business checkout error

texts:
I have an issue while trying to checkout using the WorldPay payment method. WorldPay checkout working fine with Pound and Euro currency only, not with other currencies like USD, PKR etc.

When I change the currency to Pound or Euro from currency switcher from frontend and checkout, WorldPay works fine but not other currencies.

Any configuration and M2 setting issue?  Need help


texts: Magento 2: Should we use API in setup as best practice?

texts:
Some time ago I opened an issue on magento2 about a possible problem I've spotted in Magento EavSetup class.

In the discussion that follows some Magento devs are saying that for module setup (InstallData and UpgradeData) one should not use Magento Setup classes but the Magento APIs.

For instance: to add an attribute during setup:upgrade we should not use EavSetup but AttributeManagementInterface.

Now I'm a bit confused.

I always taught that those kind of things are what the Setup classes are for. But if we shouldn't use it, why the setup mechanism is implemented the way it is? Why they pass a Setup class to the install/upgrade method if then we should not use it?

How do you do this kind of things? Do you use APIs as they recommends?


texts: How get the product SKU in XML magento 1.9

texts:
I want to create a product XML file like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
    <stocks>
        <product>
            <sku>883503536128</sku>
            <eansku>883503536128</eansku>
            <stock>982</stock>
        </product>
    </stocks>
</root>

How can this be done?


texts: How to get product list by attribute code?

texts:
I want to create non CMS page that show the product list by attribute code.

and I want a dynamic url based on attribute product list.

EXAMPLE :

www.myWeb.com/brand/syamaira.html will show the product list of syamaira's attribute.

www.myWeb.com/brand/apple.html will show the product list of apple's attribute.

NOTE : I've created www.myWeb.com/brand/ index controller.

I don't know what should I write in my index.phtml file.


texts: Magento 1.7.0.2: Transactional Email Not Editing

texts:
I am Using Magento 1.7.0.2. When I tried to edit transactional email template, I got this error Decoding failed: Syntax error.
How to Solve it.

Note:
The only particular template is not loading. Other templates are able to edit.


texts: Magento 2 : Store value in a variable via knockout loop in html

texts:
I am new to KO, in my html file I am printing a value like this -

And its working fine . But what I want is, I want assign all values of loop to a variable and want to print after loop. Like we do in php-

foreach($data as $key=> $index){
    if($key==0)
        $var = $index['value'];
    else
        $var .= ' '.$index['value'];
}

echo $var

Want to do the same in KO's html file using above KO loop.

Please help me in this.

Thanks


texts: cron isn't working properly. Cron_schedule table only contains one row (enterprise_refresh_index)

texts:
I'm experiencing a weird cron issue in Magento ver. 1.13.0.2. The cron_schedule table only contains one row:

  1 | enterprise_refresh_index | success | NULL     | 2015-08-13 22:37:00 | 2015-08-13 22:37:00 | 2015-08-17 19:29:01 | 2015-08-17 19:29:01

But I'm missing all the others crontabs from Magento core and custom extensions. I setup crontab and I have also tried to run cron.php manually. If I do run it manually the "executed_at" and "finished_at" time will be updated.

If I look into core_config_data table and search for "cron" I only see 2 cron related data sets:

mysql> select * from core_config_data where value like "%cron%";
+-----------+---------+----------+------------------------------------------------+------------------------------------------------+
| config_id | scope   | scope_id | path                                           | value                                          |
+-----------+---------+----------+------------------------------------------------+------------------------------------------------+
|       131 | default |        0 | catalog/productalert_cron/error_email_template | catalog_productalert_cron_error_email_template |
|       937 | default |        0 | crontab/jobs/log_clean/run/model               | log/cron::logClean                             |
+-----------+---------+----------+------------------------------------------------+------------------------------------------------+
2 rows in set (0.00 sec)

mysql>

The module code/core/Mage/Cron is enabled. Further logging is enabled but I don't see any cron related issues in system.log nor in exception.log. Also server logs are empty.

Has anyone an idea what could cause the issue or how to debug it? Thanks!


texts: What is the front-end performance differences of CSS loading types?

texts:
Magento 1.9, comparatively speaking, What are the front-end performance issues between types of loading CSS as:

external
internal
inline
as a style block (CMS blocks).

Thank you so much for your expertise !


texts:
How to remove ajax loader in my code. I want to disable the loader only

function changeValue(url, attribute,coulmnAttr,value){
    var url = url + '?attribute=' + attribute + '&attributeValue=' + value + '&coulmnAttr=' + coulmnAttr;
    new Ajax.Request(url, {
        method: 'get',
        asynchronous: false
    });
}


texts: Magento 2 : Date Custom Option Input on Cart Page

texts:
I have created custom date option for products and its showing perfectly fine on product page. Now, I have to show that fields on cart page to its respective products. In short, users can update custom options on cart page as well.

I want to show above fields on cart page and user should be able to update it.

Thanks in advance.


texts: Search box dropping characters after final dash

texts: When I search by sku that has dashes in it the characters after the last dash drops off when you hit the submit button. May I ask for direction?


texts: What can be deleted (unnecessary items) in 1.9.4 in order to decrease the size of the hosting account?

texts:
Magento 1.9.4

It seems like only a few weeks ago our Magento 1.9.4 account's full cPanel backup was around 13 GB. When I did a cPanel full Backup today - it came to around 26 GB! That seems like a lot for a store with about 3000 customers, 1600 products and and less than 5000 orders. There is no Email in our Email accounts.
The reason I would like to decrease the size is our hosting company will migrate us from Cent OS6 to a Cent OS7 machine and we are trying to make it as easy as possible for them. Are there any areas within Magento that can be deleted to make our account smaller? I have already deleted the Cache folder from within the var directory. Are there Error logs etc. that can also be deleted?


texts: How can I get multiple skus (with images) but only use one base sku

texts:
This is a bad title (feel free to modify it).

I have 75 unique SKUs, lets think of them as socks. Theres 3 different styles, 4 different heal colors, and 5 different body colors. I could probably pick a better example, but whatever. Everyone wears socks.

As you can see, they're all socks so the material, weight, cost, etc is all the same. Only the  image changes. I could create one configurable product and 75 simple products, but that still seems excessive.

If I didn't need an image, custom options would be a no brainer. But since I do, that won't really work. Even if I could attach an image to a custom option, I would still need logic to combine the chosen options into a calculated image.

This is probably a rant, more than anything, but has anyone run into this before? If I should just create the 75 SKUs, let me know if you suggest that.

Thanks


texts: Magento - Use resize() function on written link of a image

texts:
I have this type of link in my tag a and i want to keep the image link express in this way

  Mage::getBaseUrl('media').'catalog/product/H/G/'.$simple_product->getSku().".jpg

i would use resize() function, for example in this mode:

  '(Mage::getBaseUrl('media').'catalog/product/H/G/'.$simple_product->getSku().".jpg)->resize(null,450)'

obviously this does not work.

How can i do?

Thanks


texts: Display dynamic content depending of selected option in dropdown

texts:
I'm developing an extension with a front controller that displays a dropdown with a list of countries. The idea is that when you select a country from the dropdown, the page will display a list of distributors in that country.

EDIT: the code below is almost complete and is fully working. The form posts successfully and everything, I just need help with the filtering of the distributors for each country. I'm just missing a small snippet of code, but I can't figure out how to do it.

The code that I have in my .phtml file is:

distributors by country

                <?php
                //list from the extension with country names
                $mapcountries =   Mage::getModel('gmapstrlocator/gmapstrlocator')->getCollection();
                $mapcountriesArray = array();
                foreach ($mapcountries as $mapcountry) {
                    $mapcountriesArray[] = $mapcountry->getData('country');
                }

                //list from Magento with country names instead of iso codes
                $magecountries = Mage::getModel('directory/country')->getCollection();
                $magecountriesArray = array();
                foreach ($magecountries as $country) {
                    $magecountriesArray[] = $country->getName();
                }

                //display the intersection between both
                $finalcountries = array_intersect($magecountriesArray, $mapcountriesArray);
                sort($finalcountries, SORT_STRING);

                //add blank option to array
                $defaultValue = "Please select your country";

                //list of distributors from the extension
                $distributors = Mage::getModel('gmapstrlocator/gmapstrlocator')->getCollection();
                $distributorsArray = array();
                foreach ($distributors as $distro) {
                    $distributorsArray[] = $distro->getData('country');
                }
            ?>

            <form action="<?php echo Mage::getUrl('distro/selected'); ?>" method="post">
                <?php echo $this->getBlockHtml('formkey'); ?>

                    <?php
                    //create dropdown with the array_intersect of countries in alphabetical order
                    $select = $this->getLayout()->createBlock('core/html_select')
                    ->setName('countrylist')
                    ->setTitle('distributors by country')
                    ->setId('countrylist')
                    ->setClass('countrylist')
                    ->setOptions($finalcountries)
                    ->setValue($defaultValue);
                    echo $select->getHtml()
                    ?>

                        <button type="submit" class="button" title="<?php echo $this->__('Submit') ?>" name="countryform" id="countryform"><?php echo $this->__('submit') ?></button>
                <?php
                    if(isset($_POST['countryform'])) {
                        $countries = $_POST['countrylist'];
                    }
                ?>
            </form>

            <?php

            if(isset($_POST['countrylist'])) {
                //this is the part where I want to display the distributors that belong to each country
                echo "I work";
            }
            else {
                echo "Please select your country from the list to find our distributors by country";
            }
            ?>

Could anyone give me a hand with this?

Thanks.


texts:
On the productpage we want to display a URL below the product images, that navigates to a new page with only the gallery of the product images of the specific product.

Especially for mobile users, so that they can view the productimages better and full width on their mobile device.

What is the best/easiest way to do this?

And also if possible we want to create the URL like this: http://www.domain.com/producturl/gallery

Thanks!


texts: How to add a new product type in Magento 2? (MageStackDay mystery question 1)

texts:
MageStackDay bonus question for 500pts Bounty AND a the possibility of winning a free Z-Ray license for a year. More info can be found >> here <<

The questions are provided by Magento 2 core developer Anton Kril.

Question:

I want to add a new product type to Magento. How would I go about doing this in Magento 2 dev beta


texts: Magento Password Reset Confirmation E-mail translation

texts:
I'm trying to create a Dutch translation for the Password Reset Confirmation E-mail.

What i've tried so far:

In the Magento folder structure, there is a directory holding all dutch e-mail translations: /app/locale/nl_NL/template/email/ however all my attempts to create a simular template for the Password Reset Confirmation E-mail are unsuccesvol.

Has anyone been able to make this work, perhaps for another language? Can someone please set me in the right direction?


texts:
I am going through the RMA process, I have placed 4 orders now with different products, and each time I try to create an RMA, I get the following error message

There are no applicable items for return in this order

Any ideas on what I am doing wrong?


texts: Magento search request in admin is urlencoded

texts: in magento admin panel, in latest search request, cyrilic requests displayed url encoded/ Such as %D1%83%D0%B3%D0%B3%D0%B8. How i can resolve this issue? please help.


texts: Magento 2.3.1 minicart.phtml translations

texts:
I'm trying to translate the string items from
app/design/frontend/<Vendor>/<theme>/Magento_Checkout/templates/cart/minicart.phtml without success.

I have a dictionary already created in app/design/frontend/<Vendor>/<theme>/i18n/es_ES.csv and I tried collecting all the strings using:

php bin/magento i18n:collect-phrases --output="app/design/frontend/<Vendor>/<theme>/i18n/es_ES.csv"

The .csv file doesn't collect the string for the translation. What am I missing?


texts: Why does M2 place all CSS in inline  tags in the header?

texts:
I've set up a site and I must have some strange configurations, because ALL applied styles on the entire site are coming from inline  tags in the header:

If you check the markup it comes from this element with a strange ID:

I have never seen anything like this in M2 yet.

How and why is this happening?


texts:
I'm still a Beginner in Magento and I was given a task to upload/create 600 Categories and have a hierarchy up to 4th subcategory. I've been searching for a while now, and most return paid extensions. Would someone be kind enough to help me perform this or point me to a guide? So far I have found a random script; it ran well with no errors yet still didn't create any category.

Thanks in advance


texts: Magento2.3 how to add custom option of product when create order programatically?

texts:
I am using Magento2.3 I need to how to add custom option of product when create order programmatically?

I used below code for add custom option to product but it is not working

$product = $om->create('\Magento\Catalog\Model\Product')->load(5);

    $cart = $om->create('Magento\Checkout\Model\Cart');
    $params = array();
    $options = array();
    $params['qty'] = 1;
    $params['product'] = 5;

    foreach ($product->getOptions() as $o)
    {
        foreach ($o->getValues() as $value)
        {
            $options[$value['option_id']] = $value['option_type_id'];

        }
    }

    $params['options'] = $options;
    $cart->addProduct($product, intval($params));

above code using after getting this error below

Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: A server error stopped your order from being placed. Please try to place your order again. in /var/www/html/testproject/vendor/magento/module-quote/Model/QuoteManagement.php:368 Stack trace: #0 /var/www/html/testproject/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteManagement->placeOrder('87', NULL) #1 /var/www/html/testproject/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteManagement\Interceptor->___callParent('placeOrder', Array) #2 /var/www/html/testproject/vendor/magento/module-braintree/Plugin/OrderCancellation.php(63): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}('87', NULL) #3 /var/www/html/testproject/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Braintree\Plugin\OrderCancellation->aroundPlaceOrder(Object(Magento\Quote\Model\QuoteManagement\Interceptor), Object(Closure), '87') #4 /var/www/html/testproject in /var/www/html/testproject/vendor/magento/module-quote/Model/QuoteManagement.php on line 368

Please help me if any one know about this thanks for in advance.


texts: Display format of site and admin panel not working

texts: I am pretty new to magento and was trying to update quantity from magento admin. Not sure what went wrong format, css stopped working. Nothing working on Magento Admin also. I can login to admin but when i try to click any button it goes in loop. I have attached screenshot please help here .enter image description here.