texts: Magento2 - How to create category tree structure in custom module admin

texts:
How to create category tree structure in custom module admin section like this,

I'm not able to create like this in my custom module any one please help me.


texts: Exporting products data from one Magento shop to another using web service

texts: Can we export products data from one shop(for example English version of a website) to another shop (french version) using magento web service.


texts: Magento 2 update System Upgrade Status: Update pending

texts:
I'm trying to update Magento from 2.1.4 to 2.1.6 using the browser updater.

When I start the upgrade I get the message:

System Upgrade Status: Update pending

Nothing happens even after waiting an hour. I tried pushing cron jobs through CLI at the same time but it doesn't help.

I've tried going to 2.1.5 first but same thing happens.

Could it be an issue with my cronjobs?

Current setup is:

***** /opt/cpanel/ea-php70/root/etc/php /home/jm/public_html/update/cron.php >> /home/jm/public_html/var/log/update.cron.log

***** /opt/cpanel/ea-php70/root/etc/php /home/jm/public_html/bin/magento setup:cron:run >> /home/jm/public_html/var/log/setup.cron.log

***** /opt/cpanel/ea-php70/root/etc/php /home/jm/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/jm/public_html/var/log/magento.cron.log


texts: Simple product images on product page, search/category and basket pages

texts:
I know people have asked about being able to using a simple product's image on configurable products before but none of the solutions seem to cover everything we're looking for. What we want is to:

Show the selected simple product's image when chosen from the dropdown on the product page (not swatches)
Only show images for colours which are in stock for the additional images/thumbnails
Show the simple product's image in the basket when added
Only show the colour selected from the layered navigation as the product image on the category page

As I say, I've read many other posts which have been similar but don't cover everything. Does there exist an extension which would achieve all this? One that would cover most of it and the rest could be configured separately?

We're running Magento 1.7.0.0

Any help would be appreciated


texts: Magento2: variable email address, order ID, product ID

texts:
I need to set up a script of trusted reviews, which will send an e-mail message to the client requesting an opinion after each order.

After configure script I need to put in success.phtml ( last step checkout with confirmation order).

Here is instruction:

https://www.ceneo.pl/poradniki/Podrecznik-integracji-ZO-platformy

From text:

"UNIWERSALNA INSTRUKCJA INSTALACJI SKRYPTU ZAUFANYCH OPINII"

Script in success.phtml:

<script type="text/javascript">

ceneo_client_email = ‘customer email address’;

ceneo_order_id = ‘order id’;

             ceneo_shop_product_ids =‘product ID’;

   ceneo_work_days_to_send_questionnaire = 3;

               </script>

<script type="text/javascript" src="https://ssl.ceneo.pl/transactions/track/v2/script.js?accountGuid=XXXXXXXX">

</script>

How should I configure this script (what variables should I put in ‘’ tags) to display in ‘’ the data that script required?

@Update Herve,
really thank you for your time. I have install your module and configure all according to your instrucion.

@ Herve update 2
Now code in success.phtml looks ok, now I not get any issue after place order:

But still when I try test work script on ceneo then get issue:

Positive verification of the script failed. Check if it is installed
correctly or contact us at sbt@ceneo.pl


texts: Setting SQL session variables every time modules are installed or updated?

texts: I am trying to install Magento 2 using a Digital Ocean Managed Database(DO).  The issue is that DO does not allow tables to be created without a primary key(via global sql_require_primary_key=1).  They do allow this to be set locally via SET @@local.sql_require_primary_key = 0;, but I cannot think of a way to set this before any/all CREATE TABLE ... run during each and every setup.  I was able to install Magento via a SQL import and setting the session variable, but now even extensions that create tables are erroring out.  Any ideas?


texts: How to write a new module to overwrite tablerate shipping?

texts:
I'm using magento C.E 1.7. I need to write a new module for table rate shipping, since I want to overwrite the already existing table rate shipping as per my requirement.

I need to change Tablerate.php in the following path..
app\code\core\Mage\Shipping\Model\Carrier\Tablerate.php

How can I do it?


texts: how install magento2 on ipage or hostgattor server ? please suggest

texts: Anybody know the answer please describe .Actually we have installed on wamp server on my localhost but not getting how to install on server.


texts: Magento 2: How to get updated minicart products ids after delete or add items

texts:
I am getting product ids of the mini cart from the getCartParam function in Minicart.js
But I am not able to get product ids when we delete or add the items in the mini cart.
Basically need product ids while updating the mini cart.
How to get Items product id from var resultData = customerData.get('cart')(); in minicart.js
Is anyone have an idea about this?
Thanks!!


texts: how can i get total number of customer who bought current configurbale or simple products in last 24 hrs

texts:
I am in Product Detail Page. I want to show how many customers already had bought this product.

$time = time();
$to = date('Y-m-d H:i:s', $time);
$lastTime = $time - 86400; // 60*60*24
$from = date('Y-m-d H:i:s', $lastTime);
$items = Mage::getResourceModel('sales/order_item_collection')
   ->addAttributeToSelect('order_id')
   ->addAttributeToSelect('created_at')
   ->addAttributeToFilter('created_at', array('from' => $from, 'to' => $to));
$soldCount = 0;
foreach ($items as $item) {
   $soldCount += $item->getQtyOrdered() - $item->getQtyCanceled() - $item->getQtyRefunded();
}
<?php if (count($soldCount) > 0):?>

Good Choice...
       <?php echo $soldCount;?>
       people have ordered this in the past 24 hours.

<?php endif; ?>


texts:
After getting data with curl I create new product and save it:

$product = Mage::getModel('catalog/product');
try{
    $product
       ->setSku('testsku1252')
        ...
       ->setPrice(99.99);
    $product->save();
}catch(Exception $e){
    Mage::log($e->getMessage());
}

Well for each product it takes about 1.5 sec to save(). That's kinda problem if importing over 1000 products. Digging in Magento core methods, I found that majority of time goes for caching.

So I'd like to know if there's a way to turn off ALL caching during some code execution, later when all products imported, turn back on and reindex the data. Turning off caching from admin panel doesn't fix the time issue.


texts: How can i add select dropdown side of Mass action Button In Magento 2 Admin Side

texts:
I would like to get the select dropdown button on the side of Action Dropdown,for my custom grid collection at admin end, how can i achieve it,I would like to display the same dropdown beside. For more info please find the below screen shot.
Thanks In advance.


texts: How to create custom breakpoints in magento2?

texts: How can i create custom breakpoint with min and max like @media only screen and (min-width:768px) and (max-width: 1023px)  {...} in my custom theme in magento 2.1 ?


texts: How to send a form key with post data using ajax to a controller in magento?

texts:
Suppose I have an ajax function like this in a separate js file

jQuery.ajax({
    url: "/package/module/index/index",
    type: "POST",
    data: {name: user_name, dob: date_of_birth},//here i want to send a form key used in magento
    success: function(response){
        console.log(response);
    }
});

My controller is like this

Class Package_Module_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction(){
        //stufss to do here
    }
}

In above php controller I want to validate request with a magento form key.


texts: Sort order by category id (or custom order)

texts:
i'm struggling on that simple point. How can I order my catalog search by categories ?

i want to order my catalog search result like this :

Categorie 1 / Category 2 / Category 3

I tried changing order in back and in code, but it doesn't sort by categories... I've override the SearchResult file like this :

    public function setListOrders()
{
    $category = $this->catalogLayer->getCurrentCategory();
    /* @var $category \Magento\Catalog\Model\Category */
    $category->setAvailableSortBy("id");
    $availableOrders = $category->getAvailableSortByOptions();
    unset($availableOrders['position']);
    $availableOrders['relevance'] = __('Relevance');
    $this->getListBlock()->
        setAvailableOrders(
        $availableOrders
    )->setDefaultDirection(
        'asc'
    )->setDefaultSortBy(
        'category'
    );

    return $this;
}


texts: Mini cart remove product option not working form key error issue on magento 1.9

texts: This item is removed successfully. But the page is not redirecting.


texts: Magento2 - How to install Magento Sample data using command line

texts: How to install Magento Sample data using command line?


texts: How to display some module () at a particular page (main)

texts:
Problem

There is properly working custom module (as far as I'm concerned), that outputs map. I need to display it only at main page at the content container.

Now it outputs at every page content container.

What was done

First of all, I supposed, that it is doing by changing extended layout in the theme.

At:

/app/design/frontend/<vendor>/<name>/Magento_Theme/layout/default.xml

was written:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="<Vendor>\Map\Block\Map" name="map" template="<Vendor>_Map::map.phtml">
            </block>
        </referenceContainer>
    </body>
</page>

I saw, that I can control displaying by changing the name, so i tried to use quite a lot of options, that PhpStorm gave me (especially with *.main.*).

The second option was to create custom container and move it, but in process I realised, that I can't select destination at the particular page.


texts: Magento 2: how Magento\Reports\Block\Product\Viewed worked?

texts:
how Magento\Reports\Block\Product\Viewed worked,
how get recently view products by customer id?


texts:
I have installed an extension and return to my admin panel.

I got this error :

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

How can i solve this issue ?


texts: Tables not creating locally but creating fine on the Development server

texts:
I had installed one extension locally which is not able to create tables which are their in that extension sql setup file.but if i upload same extension on the development server the extension creates the tables and works fine.

their is no record for this module in the core_resource table.i checked this

i get the following error

a:5:{i:0;s:101:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'project_client.tablename' doesn't exist";i:1;s:5262:"#0 /var/www/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

Please Help me.


texts: I am not able to reflect the contents added in html head of admin panel in view source code in magento 2

texts:
I have added few script tags in the following path of admin panel:
content->design->configurations->our theme(edit)-> html head->scripts n style sheets.

But it's not reflecting in view page source code. Tried with cache: clean and cache: flush and re indexer command as well.


texts: Plugin / Interceptor on Customer Custom Attribute (M2)

texts:
Is there a way to have a plugin / interceptor on a custom attribute to modify its value regardless of where used on the website?
We have an additional attribute on Customers (is_allow) which returns a boolean.
In some cases (based on other customer information) we need to force the value.
I've tried creating a plugin for afterGetIsAllow() on Magento\Customer\Api\CustomerRepositoryInterface and Magento\Customer\Model\Customer but this doesn't seem to be firing.
This also needs to work anywhere customer data is shown, so API, admin and frontend.
Any help appreciated


texts:
I am having an issue where customers are unable to login after successfully completing the password reset process. I'm on version Magento 1.9.2.

I did receive a success message on the frontend after resetting the password - "Your password has been updated.". I also did not see any errors in the system.log or exception.log after going through the reset password process.

I've tried following the directions in the post below, but had no luck.
http://www.pixelninja.me/magento-password-reset-not-working/

Any help would be much appreciated! Let me know if you'd like any other information.


texts:
Considering a custom Payment Method class extending \Magento\Payment\Model\Method\AbstractMethod: Would somebody kindly explain what do the methods below do?

initialize($paymentAction, $stateObject)
validate()
order(\Magento\Payment\Model\InfoInterface $payment, $amount)
authorize(\Magento\Payment\Model\InfoInterface $payment, $amount)
capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
refund(\Magento\Payment\Model\InfoInterface $payment, $amount)
cancel(\Magento\Payment\Model\InfoInterface $payment)
void(\Magento\Payment\Model\InfoInterface $payment)

Thanks!


texts: Magento: create static block from Product Filter

texts:
I want to create a static block of the default Magento Filterable Product Attributes, like in the picture below.
The problem is not in creating the static block.
What I don't know is how to have the Product Filter showing up in that block in a way that I can add the block to any page I want..

Is this possible or does the Product Filter only show up when there are products on that particular page?

I am using Magento 1.9.2.2 with the standard rwd template.


texts: Configure MAMP PRO to run Magento 2 on Nginx

texts:
I'm trying to run magento 2 with Nginx on Mamp. But I'm always getting error in logs

2021/02/19 12:38:13 [error] 10836#0: *211 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: magento.loc, request: "GET /en_gb HTTP/1.1", upstream: "fastcgi://unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI_php7.3.24.sock:", host: "magento.loc"

I tried to add this params and did nginx reload, it didn't helped. The same error appears.

What I can do to resolve it????


texts: Remove taxes from quote item programatically

texts:
For an US webshop, I need to remove taxes from a quote item for some customers.
I can't use groups because there are in use for a loyalty program.
I have added a customer attribute names "is_tax_exempt".

I have rewritten the following Model : Mage_Tax_Model_Sales_Total_Quote_Tax

In the _aggregateTaxPerRate() function I have modified the code like this :

$customer_id = Mage::getSingleton('customer/session')->getId();
$customer = Mage::getModel("customer/customer")->load($customer_id);

if($customer->getIsTaxExempt() == 1)
{
    $item->setTaxAmount(0);
    $item->setBaseTaxAmount(0);
}
else
{
    $item->setTaxAmount(max(0, $rowTax));
    $item->setBaseTaxAmount(max(0, $baseRowTax));
}

I have tested this code, it's working : tax_amount and base_tax_amount are setted to zero in the database.

My problem is : the price for the cart is wrong.

There is one item in the cart with price : 100$.
The cart price is like :

Subtotal : $100.00

Grand Total Excl. Tax : $100.00

Tax : $6.50

Grand Total Incl. Tax : $106.50

I need to get Tax : 0 and Grand Total Incl/ tax : 0.

I have used the following configuration for tax parameters : http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-tax-config-us

How to do this ? Thank you in advance.


texts:
I searched for an answer, but I didn't find one.
I like to enable js merging and compressing in Magento 2 developer mode.
Is this possible?
I enabled them in admin, but the merging is not working


texts: Shopping cart price rule Label not showing

texts:
I made a price rule:

if 2 items from category 44, then 50% discount.

The price rule works, but for some reason the price rule label is not showing in the frontend.

It might have been my old programmer who have removed it. So is there a place where I can check to see if it's the code that has been altered? - or am I simply misunderstanding the purpose of the price rule label?


texts: htaccess file on Magento director not working

texts:
I need to remove index.php from Magento website url. I have checked https://stackoverflow.com/questions/10474740/how-to-remove-index-php-from-urls. I have followed the same instruction and successfully remove index.php from the url on localhost.

But while on server it is not working. url redirect is working properly but it is showing 404 not found error message. I have alse set up .htaccess file as given in the instruction but it is not working.

RewriteEngine On
RewriteBase /
RewriteRule ^helloworld$ /index.php [NC,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

In my server all file and folder owner is root. Any kind of suggestion would help.


texts:
Is it possibe to run MFTF in parallel? If yes, could you guide me or show me documens related that?

Thanks All


texts: Get category url from custom category attribute

texts:
I have tried to redirect customer to a certain category after successful registration however I couldn't achieve it (even with the help in here, still didn't work stackexchange question)so I changed the plan to sort it out with redirecting the customer using $_SERVER['HTTP_REFERER'] and session variable where I put these in the header.phtml but this time I can't get the category URL for the custom category attribute. Anyone can help?

$session = Mage::getSingleton('customer/session');
if($session) {
    $customerclass = $session->getPasscode();
    if( $_SERVER['HTTP_REFERER'] == 'http://www.localhost.com/customer/account/create/' && $customerclass != ''){

        $categories = Mage::getModel('catalog/category')
                  ->getCollection()
                  ->addAttributeToSelect('*')
                  ->addAttributeToFilter('passcode', $customerclass)
                  ->addIsActiveFilter()
                  ->addUrlRewriteToResult();

        if($categories->count()){
             $url = $categories->getFirstItem()->getUrl();
             Mage::app()->getFrontController()->getResponse()->setRedirect($url)->sendResponse();
             exit;
        }
    }
}


texts: Link configurable swatches to appropriate simple product

texts:
I am using configurable swatches on the product list page.

The default implementation links all the products to the configurable product and shows the default image for the configurable product.

For instance, say you have 3 simple products in your configurable product: yellow, green and blue.

When you click the swatch on the list page for say the blue product, and the listing image changes to show the blue product. Is there a way to update the href so that clicking the blue product links to the configurable product, but pre populated with the blue simple product.

Hope that makes sense :)

Thanks


texts: Returning 500(Internal server error ) when placing order in magento2

texts:
I am a newbie in magento2 and getting a problem when the user placing the order It is returning me 500(Internal server error) I am using one step checkout extension of the mega plaza I am unable to understand what's wrong in my code. Also when I checked error in chrome network console error is in the checkout-information file.

You can check and place an order by this Url. Please help me to resolve this error thanks in advanced.

This is the error I am getting

  jquery.js:10254 POST

    https://magento2.petpanic.gr/rest/default/V1/carts/mine/checkout-information
    500 (Internal Server Error)


texts: Magento 2 Commerce. Is there a cron that runs rabbitmq consumers?

texts:
When cron runs I see a log that informs me that queue consumers failed to start.
Is there a cron that runs rabbitmq consumers?


texts: Can't edit product after install Patch SUPEE-8788

texts:
After installation Patch SUPEE-8788 in my Magento 1.7.0.2 I have an error when I try to edit the product:

  Fatal error: Call to a member function getUploaderConfig() on a non-object in /var/www/html/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php on line 56


texts:
We had a eCheck Order for the first time magento 1.7.0.2 paypal express..I have never had any issue with paypal at all...I contacted paypal : They checked the transaction id in my ipn history and it seems that there was already an IPN being sent for that particular transaction.  and it was sent successfully to our url. It seems that Magento isnt updating the transaction status once it receives the IPN.

What can I do I need to ship this order out today and the status is still Payment Review? We waited over a week for the eCheck to clear and it DID clear in paypals end but in MAGENTO it still is Payment Review.

Please help!


texts: set custom dropdown attribute for customer

texts:
I have create a custom attribute (dropdown) for customer as follow:

$installer = $this;
$installer->startSetup();
$entityTypeId     = (int)$installer->getEntityTypeId('customer');
$attributeSetId   = (int)$installer->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = (int)$installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$installer->addAttribute( $entityTypeId, 'customer_status', array(
    'type'               => 'int',
    'label'              => 'Customer Status',
    'input'              => 'select',
    'forms'              => array('adminhtml_customer'),
    'source'             => 'eav/entity_attribute_source_table',
    'required'           => false,
    'visible'            => 1,
    'position'           => 110,
    'option'             => array('values' => array('Inactive', 'Candidate', 'Certified')),
    'default'            => 'Inactive',
));

$installer->addAttributeToGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'customer_status', 100);

$oAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'customer_status');
$oAttribute->setData('used_in_forms', array('adminhtml_customer'));
$oAttribute->save();

$installer->endSetup();

Attribute created successfully but:

When I create a new customer, the default value is set to none, not
inactive as in my case. How can I make Inactive default.
How can I change the value of this attribute programmatically?

Q#2 Answer:
I was trying to change the attribute value by option text. Digging more into it shows that dropdown have some int value for option like below.

<select id="_accountcustomer_status" class=" select" name="account[customer_status]">
<option value=""></option>
<option selected="selected" value="241">Inactive</option>
<option value="242">Candidate</option>
<option value="243">Certified</option>
</select>

So Now using the following code, I'm able to get the value for required option and save it.

$attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter('customer_status')->getFirstItem();
$attributeOptions = $attributeInfo->getSource()->getAllOptions(false);
foreach($attributeOptions as $attr){
    if($attr['label'] == 'Candidate'){
        $statusValue = $attr['value'];
        break;
    }
}
        $customer->setCustomerStatus($statusValue);
        $customer->save();


texts: Adding cart price to tracking code on success.phtml

texts:
I need to add some tracking code on success.phtml like this:

<img src="https://tracking.tracking.com/lead.php?idClient=12345678&idGroup=12345678&price=I_CANNOT_GET_THIS&idCommande=<?php echo $this->getOrderId(); ?>" alt="" border=“0” />

You will see that I need to find:

&price=THE PRICE OF THE ENTIRE SUCCESSFUL CART

I cannot work out how to get this.

Any help would be very appreciated...


texts: "# varieties" under product catalog list item

texts:
love the helpful resources here. This seems so simple but I'm getting stumped on it.

The concept is simple, I think - each of my items for sale have configurable flavors. One item may have 5 flavors, the next may have 2. I'm not looking to display all of those flavors, but simply include "5 Flavors" or "2 Flavors" under each product on the list page.

Here's my code so far...

                <?php if($_product->isConfigurable()): ?>
                    <?php // get attributes ?>
                    <?php $attributes = $_product->getTypeInstance(true)->getConfigurableAttributes($_product) ?>
                    <?php if(count($attributes)): ?>
                        <?php echo count($attributes); ?> Flavors
                    <?php endif;?>
                <?php endif;?>


texts: Magento 2 - Table report_viewed_product_index slowed down after so many page views

texts:
The table report_viewed_product_index stores the page visits of every users against their user ids.
After 1 year of user, when users have huge data of page views product detail page is slower for some users.
Any kind of help would be highly appreciated.
Edit
I have enabled query log on server, and observed this:

When I open product page there are 6048 queries
After truncating table report_viewed_product_index the queries on product page are just 820
Note: In both cases, query count on report_viewed_product_index are just 5


texts: Left join order grid collection using observer method. Magento 1.9

texts:
I'm trying to add a grid to order listing table following this awesome blog which works if all code copied but I'm unable to customize it. And I want to show the data from my custom table. I've created model, resource model and collection model for my custom table. I have to store the order id from magento file system and order id from payment gateway API in it. My database table looks like this:

Where  storeoid is our system's primary key and orderid is the uniques id sent by the payment gateway API.

I have successfully added a grid in order listing table by using event

  <core_layout_block_create_after>
      <observers>
          <magestyapps_ordergrid_add_columns>
              <class>Myname_Mygateway_Model_Observer</class>
              <method>addColumnsToGrid</method>
          </magestyapps_ordergrid_add_columns>
      </observers>
  </core_layout_block_create_after>

And corresponsing observer for it:

public function addColumnsToGrid(Varien_Event_Observer $observer)
{
    $block = $observer->getEvent()->getBlock();

    // Check whether the loaded block is the orders grid block
    if (!($block instanceof Mage_Adminhtml_Block_Sales_Order_Grid)
        || $block->getNameInLayout() != 'sales_order.grid'
    ) {
        return $this;
    }

    // Add a new column rigth after the "Ship to Name" column
    $block->addColumnAfter('bankoid', [
        'header' => $block->__('Bank Order Id'),
        'index' => 'bankoid',
    ], 'shipping_name');

    return $this;
}

I can see the grid added in backend.
Next I'm trying to load the order grid collection with data from my custom table. I listen to this event:

  <sales_order_grid_collection_load_before>
      <observers>
          <magestyapps_ordergrid_prepare_collection>
              <class>Myname_Mygateway_Model_Observer</class>
              <method>prepareOrderGridCollection</method>
          </magestyapps_ordergrid_prepare_collection>
      </observers>
  </sales_order_grid_collection_load_before>

And it's observer is:

public function prepareOrderGridCollection(Varien_Event_Observer $observer)
{
    $collection = $observer->getEvent()->getOrderGridCollection(); // grid collection

         $orderCollection = Mage::getResourceModel('myname_mygateway/createorder');
        $orderCollection->getSelect()
            ->reset(Zend_Db_Select::COLUMNS)
            ->columns(['soid' => 'storeoid', 'orderid']);

         $collection->getSelect()
             ->joinLeft(['order' => $orderCollection->getSelect()],
                 'order.order_id = main_table.entity_id',
                 ['bankoid']); // just join the grid collection and the another in this case sales/order_coll, I'll have to replace later one.

     return $this;
}

I get error in backend :

  Call to a member function getSelect() on null

If I can do joins and show result by directly using table's name then suggest me that as well. So please help me solve my problem.


texts: How to resolve magento2 module conflictions

texts:
I installed module conflict detector module. I found 4 conflictions in my magento. https://github.com/magefan/module-conflict-detector

Please find attached image for referance. But i don't know how to resolve these conflictions . can any body help me on this? I tried to add sequence in my second module as below.but its not resolved any conflictions.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Soulof_Vincrequest" setup_version="2.0.2" release_version="1.0.1">
    <sequence>
        <!-- Vendor_ComponentB is dependent on Vendor_ComponentA: -->
            <module name="My_RequestToQuote" />
        </sequence>
    </module>
</config>


texts: Can't upload file with ajax and Magento 1.9

texts:
I have a form with 3 input file, and I need to upload their files without reload the page. I use formData object but when I take params in Magento controller it return [native code]...

opcheckout.js :

save: function () {
    var form = $$('#form-doc-popin')[0];
    var formData = new FormData(form);

    if (checkout.loadWaiting != false) return;
    // checkout.setLoadWaiting('review');
    var params = '';
    if (this.agreementsForm) {
        params += '&' + Form.serialize(this.agreementsForm);
    }
    params += '&' + Form.serialize('co-payment-form');
    var validator = new Validation('co-payment-form');

    params.save = true;

    formData.append('params', params);

    if (payment.validate() && validator.validate()) {

        checkout.setLoadWaiting('checkout-step-billing', false, true);

        var request = new Ajax.Request(
            this.saveUrl,
            {
                method: 'post',
                parameters: formData,
                onComplete: this.onComplete,
                onSuccess: this.onSave,
                onFailure: checkout.ajaxFailure.bind(checkout)
            }
        );
    }

OnepageController.php :

    public function saveOrderAction()
{
    if (!$this->_validateFormKey()) {
        $this->_redirect('*/*');
        return;
    }

    if ($this->_expireAjax()) {
        return;
    }

    $result = array();
    //
    // Upload doc if order weapons
    //

    /* get order id */
    $quoteId = $this->getOnepage()->getQuote()->getId();

    $folder = Mage::getBaseDir('media') . DS . 'downloadable' . DS . 'doc_armes' . DS . $quoteId;
    $data = $this->getRequest()->getParams();
    var_dump($data);
    try {
        $uploader = new Varien_File_Uploader('attachment');
        $uploader->setAllowedExtensions(array('doc', 'docx', 'pdf'));
        $uploader->setAllowRenameFiles(true);
        $uploader->setFilesDispersion(false);
        if (!is_dir($folder)) {
            mkdir($folder, 0777, true);
        }
        $uploader->save($folder, $data);
        $newFilename = $uploader->getUploadedFileName();

    } catch (Exception $e) {
        $error = true;
    }

and var_dump($data) return :

I don't know how to get all files...

Thanks for help !


texts:
I want to get order detail with customized some information using order API. I want to override API:
https://example.com/index.phprest/V1/orders
How can I override in Magento 2.3


texts:
I have this button in my custom module:

<a href="<?php echo $this->helper('checkout/cart')->getAddUrl($product);?>"> Add to Cart

But I need to use this one:

<button type="button" title="Add to Cart" class="button" onclick="setLocation('<?php echo $this->getAddToCartUrl($product) ?>')">  Add to Cart </button>

But this not working:

<?php echo $this->getAddToCartUrl($product) ?>

What is the problem?


texts: Error: Call to a member function beginTransaction()

texts:
I have created a custom module "adminform" with some custom fields when i try to save my form data it gives the error

  "Call to a member function beginTransaction()"

I have the following form fields:

protected function _prepareForm()
{
    $form = new Varien_Data_Form(array(
        'id' => 'edit_form',
        'action' => $this->getUrl('*/*/save'),
        'method' => 'post',
        ));

    $form->setUseContainer(true);
    $this->setForm($form);

    $helper = Mage::helper('optfirst_reviewmycompany');
    $fieldset = $form->addFieldset('display', array('legend' => $helper->__('Select Social Icons'),
            'class' => 'fieldset-wide'));

    $fieldset->addField('facebook', 'text', array(
        'name' => 'facebook',
        'label' => $helper->__('Facebook'),
        ));
    $fieldset->addField('google', 'text', array(
        'name' => 'google',
        'label' => $helper->__('Google'),
        ));
    $fieldset->addField('twitter', 'text', array(
        'name' => 'twitter',
        'label' => $helper->__('Twitter'),
        ));
    $fieldset->addField('linkedin', 'text', array(
        'name' => 'linkedin',
        'label' => $helper->__('Linkedin'),
        ));
    $fieldset->addField('yelp', 'text', array(
        'name' => 'yelp',
        'label' => $helper->__('Yelp'),
        ));

    if (Mage::registry('optfirst_reviewmycompany')) {
        $form->setValues(Mage::registry('optfirst_reviewmycompany')->getData());
    }

    return parent::_prepareForm();
}

And following is my Saveaction method in controller:

 public function saveAction()
    {

    //$data = $this->getRequest()->getParams();
if ( $data = $this->getRequest()->getParams() ) {

    $this->_getSession()->setFormData($data);
    $model = Mage::getModel('optfirst_reviewmycompany/review')->setData($data);
    //$model = Mage::getModel('optfirst_reviewmycompany/review');
    print_r($model->getData());

        try {
        $insertId = $model->save()->getId();
        echo "Data successfully inserted. Insert ID: ".$insertId;
        } catch (Exception $e){
        echo $e->getMessage();
        }

    return;
}

Also I have define the model in my configuration file like :

<models>
        <optfirst_reviewmycompany>
            <class>OptFirst_ReviewMyCompany_Model</class>
            <resourceModel>optfirst_reviewmycompany_resource</resourceModel>
        </optfirst_reviewmycompany>
        <optfirst_reviewmycompany_resource>
            <class>OptFirst_ReviewMyCompany_Model_Resource</class>
            <entities>
                <review>

optfirst_reviewmycompany

                </review>
            </entities>
        </optfirst_reviewmycompany_resource>
    </models>

But still no luck with data save to database is there any wrong thing i am doing please check the code and try to find the mistake that where i am doing wrong..

Thanks..


texts:
I'm trying to create one simple thing: Block which is referred by the layout file. But I spend a two hours and still couldn't detect where am I wrong.

Here is the config.xml:

<?xml version="1.0"?>
<config>
<modules>
    <AD_Donations>
        <version>0.0.1</version>
    </AD_Donations>
</modules>
<global>
    <blocks>
        <donations>
            <class>AD_Donations_Block</class>
        </donations>
    </blocks>
</global>
<frontend>
    <routers>
        <donate>
            <use>standard</use>
            <args>
                <module>AD_Donations</module>
                <frontName>donate</frontName>
            </args>
        </donate>
    </routers>
    <layout>
        <updates>
            <ad_donations>
                <file>ad_donations.xml</file>
            </ad_donations>
        </updates>
    </layout>
</frontend>
</config>

Here is a layout file (ad_donations.xml):

<layout version="0.1.0">
<donate_index_index>
    <reference name="root">
        <action method="setTemplate"><template>page/page_one_column_sidebar.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="donations/category" name="donations" as="donations" template="donations/donations_category.phtml" />
    </reference>
</donate_index_index>
</layout>

And here is a AD/Donations/Category.php file:

<?php

class AD_Donations_Blocks_Category extends Mage_Core_Block_Template
{
    public function __construct()
    {
        Mage::log('1111');
    }
}

Here is my controller AD/Donations/IndexController.php:

<?php

class AD_Donations_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }
}

What's wrong here?


texts:
I have created my own custom module. Entity like Block and Page of module cms. Everything ok. My form can save data to db. In my form i have field to set which store to belong. It like cms blog store implement. But after load, store data seem not set in grid
Why it happen? In grid ui column store empty. Grid JSON show store_id empty And in form store data not set. But data in db existed. What did i do wrong? How to make form set data for select store field


texts: How to Override Class without Parent Constructor Magento 2?

texts:
How to override a class without creating parent constructor?
Actually I'm overriding Widget and it works perfectly for 2.2.X versions but for 2.1.X versions it shows me an error Interceptor::escapeHtmlAttr
After searching this error I got that this is the version problem so some files are not available in 2.1.X versions so after that I want to override the class without parent constructor,
 How can I do that???


texts: setup-cron.ERROR: real memory limit 756M but 512M in log

texts:
I am on a shared platform and cannot change php.ini .
However, the hosting platform allows me to set the memory_limit for php, which I have done - 756M. phpinfo() returns both master and local memory_limit of 756M. However, the update.log has the error:
setup-cron.ERROR: Your current PHP memory limit is 512M. Magento 2 requires it to be set to 756M or more...
It seems to me that the check is only looking at the value of memory_limit in php.ini, not the actual memory_limit. Is there a solution available for this?


texts: Customer Now Online show all customer even their last login was 6 months ago

texts:
Why my 'Customers Now Online' page show all customer even their last session was on 6 month ago?
Please suggest.


texts: Magento 2 - Customising Forgot Password email template: How do I overwrite the forgot password email template? Where is it?

texts:
I want to customize the Forgot Password email template. In the admin panel I see it

But in the in the module folder there doesn't appear to be a corresponding template

What is the name of the file so I can overwrite it in my theme?


texts: Why root block render automatically content in Magento 2

texts:
In Magento 1 we have the possibility the add a block in a root block so it will not be displayed because root is not a core/text_list block type (structural block), it doesn't render automatically the content block without calling it in phtml like : getChildHtml(), getBlockHtml(). So we need to call it in phtml to render it.

Example:

local.xml

<catalog_product_view>
   <reference name="root">
      <block type="core/template" name="block.name" template="page/html/file1.phtml"/>
   </reference>
</catalog_product_view>

Here we need to call that block to render it like this:

<?php echo $this->getBlockHtml('block.name'); ?>

But in Magento 2 the root container render automatically the root block why ?

I need like Magento 1, declare my block in xml, this xml doesn't render it, and it's me who must call it where i want.

I don't know if there is an equivalent of root in Magento 2

Example:

<referenceContainer name="root">
    <block class="Magento\Framework\View\Element\Template" name="block.name" template="Magento_Theme::page/html/file1.phtml" />
</referenceContainer>


texts: Magento2 : delete core cookies programmtically

texts:
What is the similar code in Magneto2 to delete core cookies?

$cookies = Mage::getSingleton('core/cookie')->get();
foreach($cookies as $cookieName) {
     Mage::getSingleton('core/cookie')->delete($cookieName);
}


texts: How to keep custom front end cookie from being deleted

texts:
I'd like to capture additional customer information while they are checking out as a guest and store the data in a cookie. The problem I am experiencing is that if the user leaves the checkout page, the cookie is deleted. I'm wondering if anyone knows where this behavior comes from and what I can do to keep this cookie when the session is apparently cleared.

I've added a script in the footer that will create a cookie based on the page the user is on (needs to be the checkout page) and if they are a guest:

Mage::getModel('core/cookie')->set('lead', $customer->getEmail(), time()+31536000, '/');


texts: Saved custom model doesn't returns it's id

texts:
I have a table with only 2 fields: id (primary key) and name. I've created a model for it, repository model.

In my repository model, there is a method save. I'm trying to create a new record in my table, executing:

$model = `$this->modelFactory->create();
$model->setName('some name');
$this->modelRepository->save($model);

Model saves succefully, but, when i try to get an id of created model, it returns null, so i have only name inside of model ($model->getName() => 'some name', $model->getId() => null)

So, how do I get new record id?

P.S. New record appears in DB with correct id.

There is a constructor of resource model:

/**
 * Initialize resource model and define main table
 *
 * @return void
 */
protected function _construct()
{
    $this->_init('catalog_motorbike_vendors', 'id');
}


texts: Getting Country code after international shipping is selected

texts:
Im trying to write an IF statement which takes into consideration the Country Code from the shipping address Selected. For example i have an If statement which checks if a user sub total is over 75 and in a certain customer group, if so then it displays a message telling them they get free delivery this works perfectly well

<?php
if ($sub > 75 && Mage::getSingleton('customer/session')->getCustomerGroupId() == 5 )
{
   echo "Free Shipping";
}

However this only applies to Customer is the UK, So when a customer ask for an estimated delivery cost for a country (using the table Method) it displays the correct price but it is still showing the "Free Shipping" because  "If statement" is still showing True.

Is there a way i can add another IF statement to say if the country code select != UK dont echo the string.

What i need to be able to do.

Take in the country code from the basket after international shipping has been selected and check if it UK.

If you need me to clear up what i mean or need screen shots please just let me know.

If it is possible thank you for your help.


texts: How to get all items of product purchased in Magento 2?

texts:
I would get information on all items of product purchased.
I proceeded by this way but I can not have any information on all items of product purchased :
 <?php

namespace MyTestSpace\productsPurchased\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use MyTestSpace\productsPurchased\Logger\Logger;

class OrderTracker implements ObserverInterface
{
    private $_logger;
    public function __construct( Logger $logger)
    {
        $this->_logger = $logger;
    }

    public function execute(Observer $observer)
    {
        try {
            $order = $observer->getEvent()->getOrder();

            $orderId = $order->getIncrementId();
            $allItems = $order->getAllItems();

            $this->_logger->info('OrderId -> '. $orderId);

            $itemArry = [];
            foreach($allItems as $item){
                $itemArry[]= $item;
            }

            $this->_logger->info('OrderAllItem -> ', $itemArry);

        } catch (\Throwable $th) {
            $this->_logger->info($th->getMessage());
        }
    }
}

In my log file (OrderTracker.log) I obtient "OrderId" but not 'OrderAllItem'!
Here is an example

[2020-06-19 15:15:40] OrderTrackerLogger.INFO: OrderId -> 000000181 []
[] [2020-06-19 15:15:40] OrderTrackerLogger.INFO: OrderAllItem ->
["[object] (Magento\Sales\Model\Order\Item\Interceptor: {})"] []

Can anyone show me how can we get the OrderAllItem ?
Thanks


texts: Magento 2 Admin Product grid filtered by multiple sku

texts: Anyone have an idea how we can achieve this.


texts: Salable Quantity is showing zero in product grid magento 2?

texts:
Actually in my case Salable Quantity is showing zero in product grid Magento 2.3.

Due to this issue, products are not showing in frontend. If anyone has any idea then please tell me.

For this re-indexing is also done but still Salable Quantity is showing zero(0).

Add and update Quantity programmatic but Salable Quantity is showing zero .


texts: How to save the PDF file into Magento root folder

texts:
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoicesSet);
                $this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
'.pdf', $pdf->render(), 'application/pdf');

I am trying to download all invoice in PDF and need to Save in Magento root folder.

But it's downloading in browser only.

Can any one help for this issue.


texts:
It almost seems like Magento is taking the sitemap.xml from cache even though I'm regenerating it.

In the sitemap admin page, I'm pressing generate. But the function generateXml() in app/code/core/Sitemap/Model/Sitemap.php is never called.

Curiously, if I remove sitemap.xml, it will reappear with the old content, generateXml() still not being called.

Is there a caching system which could be responsible for this? Am I using the wrong file or am I assuming the function should be called even though it shouldn't? Any other reasons?


texts: &trade showing up invoices but shows as ™ in products

texts:
I had a slight issue when importing where I couldn't import any products with ™ in the title and it was suggested that I import the products using &trade; instead. This has worked perfectly up until I realized that it's showing up in the generated invoices as &trade; rather than than ™.

Essentially the question is, how can I substitute &trade; in the invoice PDFs located at sales->invoices->invoice->print in the admin panel to ™?

Thanks for any suggestions!


texts: Product editing page (admin panel ) Not working HTTP ERROR 500

texts:
hey guys i was doing import export process for product. now when i go to backend of my old store for product customization . Page is not opening & it shows error . Anyone know how to deal with it Urgent.
This page isn’t Working
rdskingdom.com is currently unable to handle this request.
HTTP ERROR 500


texts: Clearing Full Page Caching on product stock change Magento2 custom product listing page

texts: I want to clear full page caching on my custom product listing page in my module if any product get out of stock. Actually I need to show "out of stock" label on the products that are not in stock but that is not happening due to full page caching and I cannot turn caching off also as it would slow down my page.


texts: Magento2: Custom field in the form not saving values in to the DB

texts:
I have added custom field to admin form using Ui Component.

Here is the XML to add field

<field name="all_keywords">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="dataScope" xsi:type="string">all_keywords</item>
            <item name="label" xsi:type="string" translate="true">All Keywords</item>
            <item name="dataType" xsi:type="string">text</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="source" xsi:type="string">all_keywords</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
            </item>
            <item name="sortOrder" xsi:type="number">25</item>
        </item>
    </argument>
</field>

Field is displayed properly and it's showing data if I modified from db. Button on click on save button data not storing in db. I can see data in controller in post.


texts:
I am trying to create a module with a helper file where I declare functions I can use within my module

I have the module working and I have a helper file at :

Modzinc/Adminmonitor/Helper/Data.php

<?php

namespace Modzinc\Adminmonitor\Helper;

use Magento\Framework\App\Helper\AbstractHelper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper

{

public function successMessage()
{
    return "My messgae here";
}
}

I have a page at Modzinc/Adminmonitor/Adminsuccess.php which is called everytime there is a successful admin login and that all works great the event fires and an email is sent. But when I try and get the message I have declared in my helper I get an error message :

Undefined property: Modzinc\Adminmonitor\Observer\AdminSuccess::$helper in ........../app/code/Modzinc/Adminmonitor/Observer/AdminSuccess.php on line 14

Here is my code for AdminSuccess.php

<?php
namespace Modzinc\Adminmonitor\Observer;

use Magento\Framework\Event\ObserverInterface;
use Modzinc\Adminmonitor\Helper\Data;
use Magento\Framework\Event\Observer;

class AdminSuccess implements ObserverInterface {

public function execute( Observer $observer ) {

    $successMessage = $this->helper->successMessage();
    mail('myemail@me.com','login Successful',$successMessage );

}
}

I am pretty certain my helper is set up correctly but my question is how do you use it in other files within my module. I know I can just declare the function in the same file but I would want to learn how to use it from the helper File as my intention is to keep most of my functions in the helper file as They will be reused throughout my modules files.

Any help would be great


texts: Magento 2: How to show request variable in Layout file

texts:
http://localhost/magento2/module/List/Variable

Here Variable is my dynamic value, which would like to show in Breadcrumb & Title via Layout File.

app\code\Custom\Module\view\frontend\layout\module_list_index.xml

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="page.main.title" display="true">
            <action method="setPageTitle">
                <argument name="title" translate="true" xsi:type="string">e-Trade | List {request var goes here}</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="breadcrumbs">
            <action method="addCrumb">
                <argument name="crumbName" xsi:type="string">Home</argument>
                <argument name="crumbInfo" xsi:type="array">
                    <item name="title" xsi:type="string">List</item>
                    <item name="label" xsi:type="string">List</item>
                    <item name="link" xsi:type="string">{request var goes here}</item>
                </argument>
            </action>
        </referenceBlock>
    </body>
</page>


texts:
I am trying to remove the lower links in Magento. For example using the blank theme it will show:

Privacy and Cookie Policy

Search Terms

Contact Us

Orders and Returns

Advanced Search

To remove the top links I added this to my default.xml

<referenceBlock name="top.links" remove="true" />

Is there a name I am missing? I have tried things like bottom.links, footer.links, ect. Everything I can think of and still no luck. Is it a name space I am missing?


texts: Magento 1.9 How does Magento record "recently viewed products"?

texts: I'm trying to diagnose an issue with the feature Recently Viewed Products. I wonder where does Magento save Recently Viewed Products information, in Database? or in Session?  if the information is saved in Database, which table does it get saved?


texts: Magento 2 - How to load css before style-m.css / style-l.css

texts:
I added bootstrap 4 to magento 2 by putting it in THEME\Magento_Theme\layout\default_head_block.xml. it works, but bootstrap 4 is overwriting magento code.
So how can I load it before the styles-m and styles-l scripts?


texts: Modal popup not working after clearing browser cache

texts:
I am using the bootstrap modal popup to show some content on site on click. First time when I click a link the modal popup works fine, but when I clear my browser cache and click on again on the same link the modal popup does not work.

It only shows the black background.


texts: Magento2->Will Indexing & Cache Via CRON Affect Speed Of the Website?

texts:
I'm using Magento2 & my concern is here:-

If I set CRON for indexing(every 12th minutes) & cache-flush(every hour) will it affect website speed?

is it the right way to use cache via CRON?

What can I set in CRON?

Here is the screenshot:-

http://nimb.ws/L2MuVO

Any help will be appreciated.


texts:
In Magento2, Default checkout validation scrolls to the top after alter message shown by custom function.

How to stop the default scrolling function & to focus on the error field in the form?

The error field inconsistently showing in checkout page.


texts: Magento1.9 - Getting error on save customer address

texts:
I'm getting below error whenever updating customer address from backend and also on saveBilling on checkoput page.

Call to a member function setAttribute() on boolean in /home/public_html/app/code/core/Mage/Eav/Model/Attribute/Data.php on line 80


texts: Magento, Full Page Cache , Memcache and Redis

texts:
I recently installed Full Page Cache by Mirasvit, but I had a couple of issues:

Pages became really static, home page and electronic chart were always the same, same username for everybody, same products. Same happened on the back office. I had to disable it.
Load on the server and CPU consumption is exactly the same, speed is the same

I tried to install Memcache, but I had problem with pages not refreshable, I had to force refresh to see the real page, not the last, even in the backend.

I would like to try Redis.

Any suggestion?


texts:
I have noticed in my /var/log/layout.log

015-04-26T15:23:00+00:00 DEBUG (7): index layout is dumped to var/log/layout/553d02d429a79.xml

2015-04-26T15:23:33+00:00 DEBUG (7): index layout is dumped to var/log/layout/553d02f50654b.xml

2015-04-26T15:24:05+00:00 DEBUG (7): index layout is dumped to var/log/layout/553d031578d24.xml

and so on...

These leads to the generation of hundreds of thousands of .xml's in my /var/log/layout which occupy a lot of hard drive space. Does anyone why are these xml's generated?


texts: Save customer custom attribute image in backend

texts:
When I am save customer custom attribute image from frontend, it should be save in location but not shown in frontend. It shows the broken URL

$session = Mage::getSingleton('core/session');
$customer = $this->getCustomerSession()->getCustomer();

if ($this->getRequest()->isPost()
        && isset($_FILES['company_logo']['name'])
        && ($_FILES['company_logo']['name'] != '')) {
    try {
        $customer->setCompanyLogo($_FILES['company_logo']['name'])->save();
    } catch (Exception $e) {
        Mage::logException($e);
    }
}

I am waiting from last one day. any Comments would be appreciate

Thanks


texts:
I am attempting to display all sub-categories of a parent category on a static block page (e.g. brands will show all sub-categories such as Adidas, Nike etc.). I am having problems at the moment calling the category image. It is the category image I am looking for and not the thumbnail.

Here's my code:

                    <?php
                    //If there are sub categories
                    $categories = $this->getCurrentChildCategories();
                    $categoriescount = $this->getCurrentChildCategories()->count();
                    if ($categoriescount > 0):
                    ?>

                        <?php
                        //Loop through categories
                        foreach ($categories as $category):
                        ?>

                            <a href="<?php echo $this->getCategoryUrl($category)?>" class="cat-image">
                            <?php
                            // If there is a thumbnail set for the category - Display it
                            if($imgUrl = Mage::getModel('catalog/category')->load($category->getId())->getThumbnail()):?>
                            <img src="<?php echo $this->getBaseUrl()."media/catalog/category/".$imgUrl ?>" width="220" height="110" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />
                            <?php endif; ?>

                                <a href="<?php echo $this->getCategoryUrl($category)?>" class="sub-link"><?php echo $category->getName()?>
                                <a href="<?php echo $this->getCategoryUrl($category)?>" class="btn">View All

                        <?php endforeach; ?>

                    <?php else:?>

No Sub Categories

                    <?php endif; ?>


texts:
Is Importing a csv file through a shell script a good idea? Why yes and why not? What are the principal issues?

Thanks!


texts: Two seperate discount amount is not added correctly

texts:
I noticed some weird problem in my cart with discount.

I applied two discounts in my cart. One is for online payment, i.e. 10% and another one is for coupon i.e. 5%. So when I applied these two discounts separately everything works fine. But when both discounts applied together, then there is difference of 0.5%. I mean 10+5=15 i.e. total discount should apply to my cart is 15%, but only 14.5% is reflected in my cart. Why 0.5% is deducted?

There is no tax and other rule applied on website.


texts: Magento is storing orders in UTC time, however I'd like it to be ETC. My server time is ETC already, however I believe I need to set it in magento as well. Where can I do it? Any help appreciated!


texts: How to change html output of method "getItemHtml" in custom theme

texts:
I'm overriding the file Magento_Checkout/templates/cart/form.phtml, I stumbled upon some php code generating html code which I can't find its origin

Here is the code

<?php foreach ($block->getItems() as $_item) :?>
   <?= $block->getItemHtml($_item) ?>
<?php endforeach ?>

So my goal is to change the html output of the function getItemHtml, the block handling the template is @var $block \Magento\Checkout\Block\Cart\Grid

I don't understand how does it works, I guess it's not hard coded and we can change a layout which handle this?

Thanks for reading


texts: Magento + Redis: same config for two different instances - safe?

texts:
Can I use the exact same config for redis for two different magento instances or do they access / write to the same cache?
F.e. I have a "production" and "staging" instance of magento which have their own databases.

Do I need to configure redis different for those, or does redis caching by request uri / does know which cached version (f.e. of the home page) to serve for each instance of magento?


texts:
How to remove the left sidebar based on some condition written in block?
I have to use the same layout xml file. Based on a condition, need to remove a block through coding.
section need to be removed:

 <reference name="left">
   <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
 </reference>

I tried with below code.

Mage::app()->getLayout()->unsetBlock('left.catalog.leftnav');

I didn't get any error but left sidebar still there. can anyone help me? Thanks.

I cant access controller. If i have access for controller, then i can easily do in layout rendering section. So i added my work as module and created block. Now I need to change layout / remove left sidebar.
Or is It possible to change the layout xml from block? Because i have condition statement in block. so i can choose the layout based on the condition.

Can anyone help me to fix this? Thanks


texts: Security Patch SUPEE-10752 Issue with UPS Free Method (1.9.3.9)

texts:
We encountered a problem after SUPEE-10752. When trying to set "Free Method" for "UPS Type" "United Parcel Service XML".
Magento throws an error when any method is selected in "Free Method" drop-down. Error: "Field "Ups Free Method" has wrong value."

I was able fix the error and able to succesfully save the "Free Method" but the configuration page will still show the value as "None" even though the value is set and saved properly to database.
Any advise how to make the field "Free Method" to show the selected method correctly?

<?php

class Mage_Usa_Model_Shipping_Carrier_Ups_Source_Freemethod extends Mage_Usa_Model_Shipping_Carrier_Ups_Source_Method
{
    public function toOptionArray()
    {
//        $arr = parent::toOptionArray();
        $ups = Mage::getSingleton('usa/shipping_carrier_ups');
        $arr = array();
        $isByCode = $ups->getConfigData('type') == 'UPS_XML';

        $methodlist = $ups->getCode('method');
        if ($isByCode) {
          $origin = $ups->getConfigData('origin_shipment');
          $methodlist = $ups->getcode('originShipment',$origin);
        }

        foreach ($methodlist as $k=>$v) {
            $arr[] = array('value'=>$k, 'label'=>Mage::helper('usa')->__($v));
        }

        array_unshift($arr, array('value'=>'', 'label'=>Mage::helper('shipping')->__('None')));
        return $arr;
    }
}


texts:
My magento websites are hosted on Heartinternet who suffered a power meltdown to their servers last week and everything shut down unexpectedly creating further chaos. After everything was back, even after trying repair database and performing a few others things, I still receive the following error and my the store is unavailable:

SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine, query was: INSERT INTO `log_visitor`

Even when I go and try insert a new row myself, still receiev this -1 error from storage engine and couldn't find anywhere a proper way to fix it.

Thanks in advance for anyone contributing.


texts:
How to add a custom block in the sales_order_shipment_view page in backend M2?
I have to override the sales_order_shipment_view.xml file in my module then I have added the below code for the override comment view.phtml is working fine but I need to add a separate template.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="order_comments">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Custom_Module::order/comments/view.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>


texts: Custom attribute are not showing in product collection in external file in magento

texts:
I am getting product collection from external php file like below-

<?php
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
//Mage::setIsDeveloperMode(true);
//ini_set('display_errors', 1);
umask(0);
Mage::init('default');
Mage::app('default');

$productCollection=Mage::getModel('catalog/product')->load(169);
var_dump( $productCollection->getHidemrp());

Hidemrp is "yes/no" type custom  attribute.

But I am not getting any value ? what is the problem.?


texts: How to add import option to our custom module

texts:
I have created new custom module with the admin form like to create new Products. I have created successfully.All are working fine.But now i want to add one more feature to this module. I can import products through CSV files under system/import/export, which is a default Magento feature.

Like this how should I import my fields through CSV files.I have no idea about, how to do this task.

Under system/import/export, we have entity type "Products and customers". If I add my entity similar to this, is that enough; or do I have any other solution?


texts: Use in product listing negative impact on speed

texts:
On our catalog page I use some attribute to display data.
For this I use the option inside the attribute, use in product listing.

I enabled catalog flat data.
I use Lesti FPC with an good server.
Loading time of a catalog is currently 2.54 sec.
But 1.02 sec of that time is waiting time for the page is loaded.

But I do thinks this has a negative impact on the loading speed of a catalog page.

Code I use:

List.phtml

        <?php if ($this->getChild('beknopte_specificaties_grid')) : ?>

            <?php $this->getChild('beknopte_specificaties_grid')->setProduct($_product);?>
            <?php echo $this->getChildHtml('beknopte_specificaties_grid', false); ?>

        <?php else: ?>
        <?php echo substr($_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description'),0, 50) ?>
        <?php endif;?>

Beknopte_specificaties_grid.phtml, we use this for many categories.

<?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct();
    $theme = $this->helper('ultimo');
?>

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

if (count(array_intersect($yourCatIds,$productCats))) {

    if($_product->getData('i_processor_family_2196_1')) :
    echo '
' . $_product->getAttributeText('i_processor_family_2196_1') . ' ' . $_product->getAttributeText('i_processor_clock_sp_11379_1') . '
';
    endif;

    if($_product->getData('i_internal_memory_11381_1')) :
    echo '
' . $_product->getAttributeText('i_internal_memory_11381_1') . ' werkgeheugen
';
    endif;

    if($_product->getData('i_total_storage_capac_3318_1')) :
    echo '
' . $_product->getAttributeText('i_total_storage_capac_3318_1') . ' ' . $_product->getAttributeText('i_storage_media_11441_1') . '
';
    endif;

}
?>

Is there an way to fix this problem or is there a better way of loading attribute data inside the catalog page?


texts:
When it says "if an item is found in the ..." does that mean it's applying to a single product or is that just worded funny?

I keep getting my discount of Buy one get one applying to the one product. But we have 93 variations that I'd like to include as the offer not just 2 of each.

So one category, 93 products, get any one and get any other free is my goal. Is this possible?


texts: Magento Memory issue for installing extensions

texts:
I am really stuck at the moment.

I keep getting the following error:
"Your current PHP memory limit is 512M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php --ini tells you where it is located.) After that, restart your web server and try again."

When i speak to my hosting (go daddy) the confirm that i have it set to 756M, also when i check myself it shows the local memory as 756M. However when i try update or install and extension i get the error.

I have seen posts where people are saying its issues with cron but my cron seems to be running okay.

Any help would be greatly appreciated.
Thanks
Craig


texts: Magento 2 : Give 5 % discount for specific category for customers who are more than 65 years age

texts: I need to  Give 5 % discount for specific category, customers who are more than 65 years age in Magento 2.


texts: Auto generate meta description for all products on Reindex data like this :Buy {product name} for Rs {price} at sitename.com | New Book | Authorised seller for {publihser}


texts: Getting Customer Tracking number via SOAP API

texts:
I have a developer who is saying he can not get the shipmentIncrementId to get the tracking number.

http://devdocs.magento.com/guides/m1x/api/soap/sales/salesOrderShipment/sales_order_shipment.info.html

What is the procedure for getting the tracking number from an order?


texts:
Is it possible to get translated text in API response while testing the API in postman? I have already added required csv i18n folder in the path: app/code folder.

I am passing store code into the url like this in my custom api call: /rest/ar_sa/V1/contact

I am getting message in english only. I need to get that message in Arabic while ar_sa is pass into url.

Does any one have solution of this ?


texts: Display products using custom product relation - magento2.1.2

texts:
I just added a new custom product relation called customtype along with Related Products, Up-Sells, Cross-Sells. So how can I retrieve and display products in details page as a separate block under upsell products.
while looking into app/design/frontend/m2/winter/Magento_Catalog/templates/product/list/items.phtml and checking type using $block->getType(), shows only related and upsell types. So how to make it possible for getting customtype and products ?


texts:
Our business is going to start using M2. We are going to get a dedicated server for it but have no idea how to set it up for Magento.
Is there a company that can set up the server for optimal use for M2 and provide any server maintenance and support?

Our host said they can set it up but I rather trust someone that has experience in Magento. The other option is to go for a host that specialise in magento but the price is more than double.


texts:
I want to customize the category page and I am using the below file path:

app\design\frontend\Vendor\Theme\Magento_Catalog\layout\catalog_category_view.xml

Below is xml file code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="page.top">
         <block class="Magento\Catalog\Block\Category\View" name="category_banner" template="category/banner.phtml" ifconfig="porto_settings/category/category_description" before="-"/>
    </referenceContainer>
    <referenceContainer name="content">
        <block class="Magento\Catalog\Block\Category\View" name="category_desc_main_column" template="category/desc_main_column.phtml" ifconfig="porto_settings/category/category_description" before="category.products"/>
    </referenceContainer>
    <move element="category.image" destination="content" before="category_desc_main_column"/>
    <referenceContainer name="sidebar.main">
    </referenceContainer>
    <referenceContainer name="sidebar.additional" remove="true" />
</body>

I have gone to the admin panel and Enabled Template Path Hints for Storefront but I can't find any file which I can add my custom element before section element.

When I go to the inspect element it's creating the below HTML structure:

  I want to move the breadcrumbs div in the section and want to add
  two new DIV's before section element.

How I can edit the catalog_category_view.xml file code. Please help.


texts: Multi language site how add specific category link in phtml

texts: I have a multlanguage site, and I need to add a link of a category in phtml file. How can I do it?


texts:
<!– CONTACT FORM CODE BEGIN–>{{block type='core/template' name='contactForm' template='contacts/form.phtml'}}<!– CONTACT FORM CODE END–>

Find above code for call contact Form. can anyone explain me how flow execute  when its called  ?

Like how its find controller and model and action using only above code ?

Sorry for my question if you find its ruff but i am new in magento.

Thanks for any help in advance.


texts: Adding product to magento 2 cart programmatically makes its price zero

texts:
I am adding product to cart in magento 2 programmatically here is the code for that:

public function getProduct($productId)
    {
        //\Magento\Catalog\Model\Product $product

        if ($productId) {
            $storeId = $this->_objectManager->get(
                \Magento\Store\Model\StoreManagerInterface::class
            )->getStore()->getId();
            try {
                return $this->_productRepository->getById($productId, false, $storeId);
            } catch (NoSuchEntityException $e) {
                return false;
            }
        }
        return false;
    }

and here is my code for adding product to cart:

  $product = $this->getProduct((int)$inputRequest['product']);

                    $this->_request->setParams($inputRequest);
                    $this->_cart->addProduct($product, $inputRequest);
   $this->_cart->save();

but when I save the cart, it saves the product in database but the data is zero for everything like price, discount amount and other attributes of items are zero, only quantity is correct which I am putting as input in $inputRequest.
I have also called collectTotals and updateItems method of cart but there is no change in data.

Here is the quote_item table (I included the most important attributes), the most recent product (Impulse duffle) was added programmetically and it has zero price, row_total.

If I update cart on cart page, then prices are updated. May be I am missing to dispatch some event? Has someone else faced the same issue before?


texts: How can i solve font downloadable error "downloadable font: OS/2: bad linegap:"?

texts:
How can i solve font downloadable error for magento site show as follow:

  downloadable font: OS/2: bad linegap: -32 (font-family: "ThemeIcons"
  style:normal weight:normal stretch:normal src index:1) source:
  http://yourdomain.com/skin/frontend/yourtheme/default/fonts/themeicons/ThemeIcons.woff?387osh

Screenshot:


texts: how to prevent products to jump lines in list view (css)

texts:
I have problem with my products on homepage. I want to show my products in 2 row with 4 products in one row but in second row I have 2 products and other 2 products go in next row.

This is css that I use to customize my products

.products-grid li.item {
float: left;
width: 170px;
padding: 0px 10px 4px;
}

Here is screenshot of my page:

I don't have an idea how to fix that :/


texts: In magento change data-vocabulary to schema.org

texts:
I received the mail from google saying Breadcrumbs issues detected

Warning : data-vocabulary.org schema deprecated

On research about these I came across that Starting April 6, 2020, Google will no longer support data-vocabulary.org structured data to enable rich results in Google Search. From January 20 until April 6, any data-vocabulary.org structured data on a web page will trigger a warning for the appropriate rich result type. After April 6, an error will be triggered.

My code

<li class="<?php echo $_crumbName ?>" <?php if($_crumbName == 'home'){ echo 'itemscope itemtype="http://data-vocabulary.org/Breadcrumb"'; }?>>
            <?php if($_crumbInfo['link']): ?>
                <a itemprop="url" href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>">
                <?php echo $this->escapeHtml($_crumbInfo['label']) ?>

            <?php elseif($_crumbInfo['last']): ?>

                <?php echo $this->escapeHtml($_crumbInfo['label']) ?>

            <?php else: ?>
                <?php echo $this->escapeHtml($_crumbInfo['label']) ?>
            <?php endif; ?>
            <?php if(!$_crumbInfo['last']): ?>
                >
            <?php endif; ?>

How can I change data-vocabulary to schema.org


texts: How to override a file in root/setup/src/Magento/ in Magento?

texts:
I'm working on a solution that requires adding a bit of functionality to the magento installation process.  How do I override a file in root/setup/src/Magento/...

How would i override  setup/src/Magento/Setup/Model/Installer.php?


texts: Magento 2.4.0 The value specified in the URL Key field would generate a URL that already exists

texts:
I got this error while trying to make category "is_anchor" yes or no. If i save category without changing this "is_anchor" attribute then it works fine.
I have migrated the store from Magento 1.9.1.0 to Magento 2.4. I have done migration successfully.
I have tried below steps, still facing same error,

truncate the url_rewrite and then reindex URLs for category and products.
I have installed this https://github.com/olegkoval/magento2-regenerate_url_rewrites extension and regenates URLs. Still it giving me same error.

Please check below screenshots,

Please let me know if you guys have proper solution.
Thanks,


texts: Magento order quantity shown in paypal as x 1 with real quantity in item name

texts:
Paypal is showing some line items as quantity x 1 and the real quantity is then displayed in the item name, for example;

Qty   Item                                Price

1 Noro Silk Garden Chunky 10 x10  £49.59 GBP

I beleive this comes from: app/code/core/Mage/Paypal/Model/Cart.php

Workaround in case if item subtotal precision is not compatible with PayPal (.2)

$subAggregatedLabel = ‘’;
if ($amount - round($amount, 2)) {
    $amount = $amount * $qty;
    $subAggregatedLabel = ‘ x’ . $qty;
    $qty = 1;
}

How can I get the quantity to show in the correct field Qty and not the Item?


texts: How to get url of last image from $this->helper('Magento\Catalog\Helper\Image') Magento 2

texts:
I am trying to get URL of image of last image.

<?php echo $this->helper('Magento\Catalog\Helper\Image')->init($block->getProductForThumbnail(), 'cart_page_product_thumbnail')
            ->setImageFile($block->getProductForThumbnail()->getImage())
            ->resize(165, 165)->getUrl(); ?>

This code gives me url of first image, How can i get url for the last image.


texts: Magento send details to external source once product is created

texts:
Once product is created in magento , the same product details should be passed to an external source using API.

How to achieve this ?


texts:
I have many tasks cron, and for each indicate the path and time not too good

I know about cron.sh file.
On my server, I have a scheduled task, and I would like to set the launch every 15 minutes on this file, and will it automatically launch my crowns to me or not?

Will the queue be respected, will the cron settings which I set in config.xml  files.


texts: I am working on magento-1.9 website. Here, category pages are not opening properly.


texts:
I am trying to get items qualntity from car.

I tried using this but it game not expected result:

<?php
$helper = $this->helper('\Magento\Checkout\Helper\Cart');
echo $helper->getItemsCount(); ?>
?>

That get's me a number of products in the cart but not number of items.

Example:

  Product 1 - Quantity in cart (2)

  Product 2 - Quantity in cart (4)

The above would give me a result of 2 but I would expect 6.

How can I achieve the above?

Magento ver. 2.2.4


texts: How to get store currency code by store Id in Magento 2.3.x?

texts:
I have multiple stores on my website. I need to get the store currency code by store Id. How can I get it?

I was trying by below code but it's always returning default store currency code:

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

$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');
$storeCurrencyCode = $storeManager->getStore()->getCurrentCurrencyCode();

Thanks for your cooperation.

[Update with Solution]

I have got the solution after reviewing Magento core code. My solution code below:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');

// Return Default Store Currency Code
$defaultCurrencyCode = $storeManager->getStore()->getCurrentCurrencyCode();

// Return Specific Store Currency Code
$storeId = 1; // it can be any store id
$storeCurrencyCode = $storeManager->getStore($storeId)->getCurrentCurrencyCode();

Thanks for your time.


texts: How to set (in admin) products of a certain category to default sort by date added

texts:
I am using Magento 1.7.0.2

I would like to have several the products for several of my categories to be automatically sorted by date added. Currently, in the 'Display Settings' tab for any one of my categories, I am not offered this option in the 'Default Product Listing Sort By" dropdown.

I know 1) how to add this option to the frontend user and I also know 2) how to overwrite a core file to set all categories to sort by entity ID (in descending order) which essentially the same as 'date added'.

However, I want to be able to configure this option for individual categories through the backend. Is there any way to have the 'date added' or 'entity id' added to the 'Default Product Listing Sort By" dropdown in the backend?


texts: magento collection filter (range of entity_id)

texts:
How do i get the collection with entity_id which the range between 1-3000?

ob_start();
foreach ($customers as $customer){
    $temp = $customer->load($customer->getId())->getData();
    echo $temp['entity_id']."<BR>";
    flush();
        ob_flush();
}

anyone knows?


texts: upgrade to 2.1.5. composer updated but setup upgrade returns with invalid argument

texts:
I've had  an issue with a template I purchased and needed to update it to the latest version of Magento.

I've backed up my database a files and ran: composer update

When this complete I ran php bin/magento setup:upgrade and it has returned with:
when setup upgrade after add extention module, error occur

  [InvalidArgumentException]   There are no commands defined in the "setup" namespace.

The front end of my site is now returning with:

Fatal error: Uncaught exception 'Magento\Framework\Exception\FileSystemException' with message 'The file "/h/d/ph/var/generation/Magento/Framework/Config/Composer/PackageFactory.php" cannot be deleted Warning!unlink(/home/sparkled/public_html/var/generation/Magento/Framework/Config/Composer/PackageFactory.php): Permission denied' in /h/d/ph/vendor/magento/framework/Filesystem/Driver/File.php:382

Stack trace:
#0 /h/d/ph/vendor/magento/framework/Filesystem/Driver/File.php(405): Magento\Framework\Filesystem\Driver\File->deleteFile('/home/sparkled/...')
#1 /h/d/ph/vendor/magento/framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/home/sparkled/...')
#2 /h/d/ph/vendor/magento/framework/Filesystem/Driver/File.php(403): Magento\Framework\Filesystem\Driver\File->deleteDirectory('/home/sparkled/...')
#3 /h/d/ph/vendor/magento/framework/Filesystem/Driver/File.php(403): in /h/d/ph/vendor/magento/framework/Filesystem/Driver/File.php on line 382

Any ideas on how to fix this issue or would it be best to just use my backup to restore?
Would this be a case of doing something with PackageFactory.php?
Permissions are set to 0664


texts:
I get a "Read Timed Out" error at order checkout, everytime users use card payment gateway. Payment is well processed but the order is not generated, or sent to the user. Error has started after an update to a SSH-256 new key.

Gateway provider is Redsys, and url of error is .../redsys/index/notify


texts: Question to expect for a front end magento position

texts:
I have interview coming up and it will be a interview for magento first time,i search SE and i could find one question, but it was for developer. I been working online for magento project but this time i am nervous and want to get the job, so gotta have a good interview.
So as a magento front end developer, what question should i expect? How much php i should know or should i know,as i am following this tutorials and see a lot of php getting changed so should i only know where to find a template and copy it from, while using jQuery, javascript etc.
Insight would be helpful


texts:
How to save custom frontend form to database in Magento2.2.5?

Any help would be appreciated


texts: Magento 2 - no css after pub folder has been deleted

texts:
I deleted the pub folder of my magento installation.
Then I used

  php bin/magento setup:static-content:deploy

and now the site has no CSS at all.
How can I fix that?

Thanks!


texts: Magento 2: Email Templates Template Style is not Working

texts:
In Template Content i have put

Hi

Template Styles i have put

.test { font-size: 40px;}

Then i have clicked on Preview Template, but it's not applying.

I like to apply CSS for this template only.


texts:
I followed this article:
http://inchoo.net/magento/creating-an-eav-based-models-in-magento/

I created the Inchoo Blog module, after the firt time it ran the controller code
the situation on the database is the following:

------------------------------------------------------------------------------
value_id | entity_type_id | attribute_id | store_id | entity_id | value
1        |      10        |     142      |     0    |    1      | Test title
2        |      10        |     143      |     0    |    1      | Zoran
------------------------------------------------------------------------------

Then I changed the controller, in this way:

<?php
class Inchoo_Blog_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{

$post = Mage::getModel('inchoo_blog/post')->load(1);
$post->setTitle('Test title2');
$post->setAuthor('Zoran Šalamun2');
$post->save();

}
}

?>

I wanted to change the values in the database, but the result was as follows:

How should I do if I want to update those values and not add more?


texts: Tiny MCE is popup sowing blank in WYSISYG editor.


texts: Alternative methods for exporting orders from Magento

texts:
My real question has been asked before with no answers: Magento dataflow profile - import products error - Please set available and/or protected paths list(s) before validation.

Basically, I'm trying to export order data so I can import it into another install. Upon running the dataflow profile I get "Please set available and/or protected paths list(s) before validation." in the new popup window. As I couldn't find any documentation or answers that solve that problem, I'll move to my next question.

I am unable to export with Dataflow. What other options do I have for migrating orders from one install to another?

NOTE: My previous version is CE 1.7 and my new version is 1.9.0.1. I have been able to apply my 1.9.0.1 file base to the old install and that is where I can not export without the paths error.


texts: Error during rate request at Dhl/Express/Webservice/Soap/RateServiceAdapter.php:77

texts:
I have upgraded magento 2.2.4 to 2.3.2. After upgrade version we have enabled MSI modules. After Enabling MSI modules we are getting below error when we try to create shipment. We are not able to create shipment.

  Exception:

  main.ERROR: Error during rate request. {"exception":"[object]
  (Dhl\Express\Exception\SoapException(code: 0): Could not access
  SOAP webservice. at
  html/app/code/Dhl/Express/Webservice/Soap/RateServiceAdapter.php:77)"}

System Log:
main.ERROR: Could not access SOAP webservice.


texts:
I have a small import script that will import product to Magento 1.

It works well but there is something not work.If a product attribute happen to be a select type attribute the value will not save.  I can determine this cause through eav system and magento would like to have the option id and not text value.

I have:

$product->setColour('red')->save();

But magento want:

$product->setColour(22)->save();

Is a method in magento that will accept the text value and correctly set the option id in the background for me?


texts:
I've cloned locally a copy of a website, changed the base url and it loads fine but the skin folder path is not correct:
http://local.web.com/Volumes/MacCs/htdocs/website/httpdocs/skin/frontend/default/theme/css/datepicker.css

it should be instead: http://local.web.com/skin/frontend/default/theme/css/datepicker.css

I checked anywhere in config_core_data, disabled htaccess, double checked the MAMP PRO host configuration, cache disabled.
Any idea what is wrong?
thanks


texts: Custom footer for specific email template only in magento 1.9

texts: I want to set custom footer for one of my email template not for all email templates and also I need to show the ordered date and time in email footer.


texts: How to properly set up cart price rule for multiple SKUs?

texts:
I have set up these rules for my cart. And the cart is filled with 11 of the same product, or 5 of one variation and 6 of another. Either way, no discount is applied:

Do I have errors in my configuration?
Or am I using this feature incorrectly?

I am currently using Magento CE 2.2.0. The default prices for these two variations of products are $1.00 and $5.00


texts:
We've got e-commerce with few store views
All of them operate with one currency (EUR) apart from one, which uses GBP
We've enabled Magento2 Braintree module to accept credit cards payments.
The module is working fine. However we've noticed that it uses just one currency (EUR) for all store views. That is unacceptable for the GB store view as it should operates with GBP, not EUR. The currency for this store view is set up correctly.

How can we enable the Magento Braintree module to serve proper currency: EUR for EUR based store views, and GBP for the GBP one?

* UPDATE *
These are currency settings:


texts: Magento - price rule “buy 2 for price X” / Magento 1.9.2.3

texts:
How can I make the following rule?

Product: T.Shirts comes in 5 colours and in 5 sizes. It is set up as a configurable product.

Buy one for 120.- Buy any 2 for 200.-

With buying 2, I mean not just buying 2 in color red and both in size Large. It should also work when you buy 1 red/large, 1 blue/small etc.

Is there a way to set it up without buying an extension? What I did so far:

I have added all SKUs, both for the parent and the child products, as a shipping cart rule. When I activate the rule, go and choose 2 items and press "buy", then the page stacks and never proceeds to the basket. When I deactivate the rule, then the page is working fine again.


texts: Invalid configuration file:app/etc/env.php in magento 2

texts:
Disable module after run this command chown www-data -R /var/www/html

My env.php file empty.

php bin/magento c:f

Invalid configuration file: '/var/www/html/upgrademag/app/etc/env.php'

Fatal error: Uncaught Magento \ Framework \ Exception \ RuntimeException: Invalid configuration file: '/var/www/html/upgrademag/app/etc/env.php' in / var / www / html / upgrademag / vendor / magento / framework / App / DeploymentConfig / Reader.php: 118 Stack trace: # 0 /var/www/html/upgrademag/vendor/magento/framework/App/DeploymentConfig.php(140): Magento \ Framework \ App \ DeploymentConfig \ Reader-> load () # 1 /var/www/html/upgrademag/vendor/magento/framework/App/DeploymentConfig.php(70): Magento \ Framework \ App \ DeploymentConfig-> load () # 2 / var / www / html / upgrademag / vendor /magento/framework/App/ObjectManagerFactory.php(114): Magento \ Framework \ App \ DeploymentConfig-> get () # 3 /var/www/html/upgrademag/vendor/magento/framework/App/Bootstrap.php(210 ): Magento \ Framework \ App \ ObjectManagerFactory-> create (Array) # 4 / var / www / html / upgrademag / vendor / magento / framework / App / Bootstrap.php (125): Magento \ Framework \ App \ Bootstrap -> __ construct (Object (Magento \ Framework \ App \ ObjectManagerFactory), '/ var / www / html / u ...', array) # 5 / var / www / html / upgrade / index.php (36): Magento \ Frame in/var/www/html/upgrademag/vendor/magento/framework/App/DeploymentConfig/Reader.php on line 118


texts: A faster route to deploying static content in Magento 2? Dev to Live etc?

texts:
Massive bounty on this guys. Wanted to get some attention here. Maybe move it here instead..

https://stackoverflow.com/questions/38589283/a-faster-route-to-deploying-static-content-in-magento-2-dev-to-live-etc

Can no one answer ?


texts: how to pass a custom variable from phtml file to email template

texts:
I am stuck in my custom code.

I want to pass a custom variable from phtml file to template.

I have added my template in email template:

{{block type='core/template' area='frontend' template='order-approval/item.phml'}}

but how to pass variable of this page


texts: Automatic assign Up-Sell products with same attribute data

texts:
If a store have a lot of products, it's impossible to assign up-sell products for each items

e.g. If A123 product have 'Blue' as 'Color' attribute,

I want to show all items which have 'Blue' as 'Color' attribute as A123's up-sell items

automatically on front-end (so I don't have to assign up-sell for every items)

Any solution or extension?


texts: Clicking on product color triggers change in all products

texts:
I want to show the product's special price in the catalog but I am getting an error when there is more than one product with a discount. One color product's click triggers a change in all catalog.

I changed the condition on the file:

app/design/frontend/Vendor/theme/Magento_ConfigurableProduct/templates/product/price/final_price.phtml

It in order to show the special price on catalog product, like this:

<?php if (!$block->isProductList() && $block->hasSpecialPrice()): ?>

to

<?php if ($block->hasSpecialPrice()): ?>

On page load, this is the current view:

If I click in a color with a discount (the white color on the first product), it triggers changes on the second one, like this:

I am struggled to find where I need to change to fix this problem. Any idea will be more than welcome.


texts:
in my store folder i am calling cart_php to pull magento data in wordpress following is code.

<?php

require_once('app/Mage.php');
    umask(0);
    Mage::app('default');
// This has to run to authenticate customer and checkout session calls.
Mage::getSingleton('core/session', array('name' => 'frontend'));

// Get any customer model you desire.
$oSession = Mage::getSingleton( 'customer/session' );
$oCustomer = $oSession->getCustomer();
$oCheckout = Mage::getSingleton( 'checkout/session' );
$oQuote = $oCheckout->getQuote();

//var_dump( $oCustomer );
//var_dump( $oSession );
//var_dump( $oQuote );
//var_dump( $oCheckout );
$html="";$i=0;
    $oCart = $oQuote->getAllItems();
    if( !empty( $oCart ) )
    {
        foreach ( $oCart as $oItem )
        {
            $sName  = $oItem->getProduct()->getName();
            //$fPrice = $oItem->getProduct()->getPrice();
             $fPrice= $oItem->getRowTotal();
             $html.="
".
                    "
".
                        "".
                    "
".
                    "
".$sName."

".
                    "
".
                        "
".
                            "".
                                "<button type=button class='btn btn-default btn-number range-pdn' disabled=disabled data-type=minus data-field=quant[1]>".
                                    "".
                                "</button>".
                            "".
                            "<input type=text name=quant[1] class='form-control input-number range-con' value=1 min=1 max=10>".
                            "".
                                "<button type=button class='btn btn-default btn-number range-pdn' data-type=plus data-field=quant[1]>".
                                    "".
                                "</button>".
                            "".
                        "
".
                        "
".
                "X".
                        "
".
                    "
".
                    "
".Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol() .$fPrice.
                    "
".
                    "

".
                "
";
                $i++;

        }

            $quote = Mage::getModel('checkout/session')->getQuote();
$quoteData= $quote->getData();
$grandTotal=$quoteData['grand_total'];
$shipping_cost= Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingAmount();
$html.= '~'.Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol() .Mage::helper('checkout/cart')->getQuote()->getSubtotal();
$html.= '~'.Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol() .$shipping_cost;
$html.= '~'.Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol() .$grandTotal;
$html.= '~'.$i;
}
    echo $html;

and its returning ajax error 500 internal server error. any help appreciated


texts: Assign and add an icon next to product name of different categories

texts:
Suppose to have two categories: "Red" and "Blue".
I also have two icons for each one: the "Red icon" and the "Blue Icon".
I want to assign and display to the products of the Red category the Red icon in "product-name" and the same for the blue products.

Is there any way to achieve this?


texts:
File js-translation.json is loaded slower or later than other javascript file which contains some texts need to translate so at this time translated texts still not push to storage. When the a.js is loaded it will be parsed and call translate function. translate function will look into storage then find text to translate. Because the translation text still not push to storage so translate function will get nothing then use original text.

I must reload page, it translate.
When i want to test, i clear data on local storage

How to fix it? I using version 2.3.3