texts:
Hi i am facing following issue while upgrading

  CONNECT ERROR: Package community/Mage_Core_Modules 1.7.0.1 conflicts
  with: community/Phoenix_Moneybookers 1.3.2, community/Mage_All_Latest
  1.7.0.2 Package community/Lib_Varien 1.7.0.0 conflicts with: community/Mage_Core_Modules 1.6.0.0 Package community/Lib_Js_Mage
  1.7.0.1 conflicts with: community/Mage_Core_Modules 1.6.0.0 Package community/Mage_Locale_en_US 1.7.0.1 conflicts with:
  community/Mage_Core_Modules 1.6.0.0 Package community/Lib_Mage 1.7.0.1
  conflicts with: community/Mage_Core_Modules 1.6.0.0

Please help me to fix this issue


texts:
We installed Avalara Tax module in magento 2.2.4 CE and configured.
We would like to setup calculating Avalara tax on shipping and handling.

I am trying to configure from magento admin end but showing note mentioned on the screen shot below

https://prnt.sc/mwnhlt

Please advise.
Thanks


texts: Magento 2: How to change template of a block without "name"

texts:
I want to change to override a block's template with my custom template. But it does not have a "name", it only has a "as".
The one I want to override is:

<block class="Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer"
       as="default"
       template="order/view/items/renderer/default.phtml"/>


texts: Why only HTTP links are supported as source for downloadable products?

texts:
While validating URL, magento throws an exception if the link's not using HTTP protocol - https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/code/core/Mage/Downloadable/Helper/Download.php#L102

Wondering is there a reason for that? Ran into this while using a HTTPS link for source file for the product.


texts: Conditional logic based off of what a user searched?

texts:
Let me try and explain what I mean.

We have one product SKU: ABC123

It fits two different models(a set variable): XX22 & XX23

XX22 is an apple(category) product

XX23 is a samsung(category) product

If someone searches XX23 it will show the product: ABC123. I want a way for it to show that it's a samsung product if they search for XX23 and I want it to show it's an apple product if they search for XX22. Even though in reality it's just one product. Is there any way to do this natively? Will I need an extension? Did I even explain it well enough? Thanks

Maybe this picture helps? http://i.imgur.com/jNQNp3V.jpg


texts: Creating custom module in magento2 show fatal error

texts:
I working on creating custom module in magento 2, but it's not working. Could you please suggest me where i went wrong?.

My module code:

app/etc/config.php:

'modules' =>
  array (
    'Ramesh_Sample' => 1,
         ),

app/code/Ramesh/Sample/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Ramesh_Sample" schema_version="2.0.0">
    </module>
</config>

app/code/Ramesh/Sample/etc/frontend/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="sample" frontName="sample">
            <module name="Ramesh_Sample" />
        </route>
    </router>
</config>

app/code/Ramesh/Sample/Controller/Index/Index.php

<?php
namespace Ramesh\Sample\Controller\Index;

use Magento\Framework\App\Action\Context;
//use \Magento\Framework\View\Result\PageFactory;

class Index extends \Magento\Framework\App\Action\Action
{
    private $_resultPageFactory;

    public function __construct(
        Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    )
    {
        parent::__construct($context);
        $this->_resultPageFactory = $resultPageFactory;
    }

    public function execute()
    {
        $result = $this->_resultPageFactory->create();
        return $result;
    }
}

app/code/Ramesh/Sample/Block/Sample.php

namespace Magento\Sample\Block;
class Sample extends \Magento\Framework\View\Element\Template
{
}

app/code/Ramesh/Sample/views/frontend/layout/sample_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Hello World</title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="Sample\Ramesh\Block\Sample" name="sample"      template="sample.phtml">
            </block>
        </referenceContainer>
    </body>
</page>

app/code/Ramesh/Sample/view/frontend/templates/sample.phtml

<?php echo 'Hi I am Magento 2'; ?>

But I got the following error:

  a:4:{i:0;s:380:"Recoverable Error: Argument 2 passed to Ramesh\Sample\Controller\Index\Index::__construct() must be an instance of Magento\Framework\View\Result\PageFactory, none given, called in var/generation/Ramesh/Sample/Controller/Index/Index/Interceptor.php on line 14 and defined in app/code/Ramesh/Sample/Controller/Index/Index.php on line 14";i:1;s:6109:"#0 app/code/Ramesh/Sample/Controller/Index/Index.php(14): Magento\Framework\App\ErrorHandler->handler(4096, 'Argument 2 pass...', '/var/www/html/m...', 14, Array)


texts: Display multiple products once we click on link on view page

texts:
we have to implement "shop the look" feature.

ex : if shirt is the main product , than shop the look is

shirt [product1] + matching jeans [product 2].

If we click on "shop the look" present in bottom left,  than it should display 2 products in right side with one original product.

How to achieve this as here


texts:
I am using Magento 2 extension for TrustPilot to display reviews on the Product detail page. I want to restrict if that product has minimum no of reviews means, only Trustpilot content should display.

Is there any way to achieve it.?

Also, it may help if I get to know to no of reviews on those products. Is there any way to get it?


texts:
In Magento 2, if I use my Javascript debugger's console, I notice there's a global object with a jQuery prefix defined.

> jQuery111001331609229091555
Object {events: Object}
events: Object
handle: ( e )
toJSON: ()
__proto__: Object

What is this object?  Where does it come from?


texts: Magento Buy x Get Y only works with the same product

texts:
Using That rule , works only with the same product with qty > = 4. If i have 5 products from same category , separate order , the rule doesn't works.

Conditions:

if all conditions true
  if a item is found in the cart with all of the se conditions true:
    category is 76

Actions:

Apply: buy x get y
amout value: 1
discount max product: 0
qty products ( buy x ): 3

if all conditions all true:
 category is 76


texts: You need to choose options for your item even if option is chosen - Magento 2

texts:
I get this error on all configurable products "You need to choose options for your item" when i try to add a product to cart even if size and color option are chosen

Magento 2.2.5

This error is only on product detail, in product list add to cart works fine

How can i degub?


texts: Help locating a file in Magento that contains HTML

texts:
I'm trying to change the class name in the HTML output from "price". I was hoping to find it in the code block below.

The following code (frontend/default/theme/template/page/html/cart.phtml):

        <?php echo $this->__('Shopping Cart:'); ?>
        <?php echo $_cartQty; ?> <?php echo $this->__('Item(s) - '); ?>

        <?php if ($this->canApplyMsrp()): ?>
            <?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?>
        <?php else: ?>
            <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
            <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
                (<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
            <?php endif; ?>
        <?php endif; ?>

Produces the following output (in Header):

        Shopping Cart:
            Item(s) -
            £0.00

Block Name Hint:

Mage_Checkout_Block_Cart_Sidebar

I've determined that <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?> is responsible for calling £0.00, but I've no idea where to find the actual file to change the CSS class.

I've used grep to try and find the file, but there are too many results. Any help appreciated.


texts: Unreferenced, NULL fields on sales_flat_order

texts: I'm working on an extension that I inherited from somebody else. It makes references to sales_flat_order.customer_note and sales_flat_order_payment.po_number, but they are always empty or null. Are they used for anything?


texts: Show available inventory configurable products Magento 2

texts:
I have got it working and its outputting the right information, but I do not get the toggle to work. Now I think thats because of the use of swatches. Hopefully someone here can help me out with that!

  Original answer: https://magento.stackexchange.com/a/208985/72996

If I edit configurable.js the way I think needed its not working, but I can't find the output in the source either, so I think swatch-renderer.js is used, but then I don't know how and where to place it.

Thanks!


texts:
I have a store that sells liquid products (beer).
The problem I am facing is that the salable stock is in liquid ounces. Example:
1. If a customer buys a growler, Magento should decrease the stock by 64oz, and not by 1 (the 64oz bottle).
2. If a customer buys half-growler, Magento should decrease the stock by 32oz, not by 1 (the 32oz bottle).
3. If a customer buys 4 half-growler bottles, Magento should decrease the stock by 128oz (4x32) and not by 4 (4 bottles).
How can I implement that in Magento 2.3?

Thanks a bunch!


texts: Apply "Maximum Qty Discount is Applied to" to whole order instead of order line

texts:
What seems to go wrong: It seems in the current situation the "Maximum Qty Discount is Applied to" applies to the order line instead of the total qty in the cart.

What I think that should happen: The "Maximum Qty Discount is Applied to" should use the total qty in the cart and if it is greater than "Maximum Qty Discount is Applied to" it shouldn't apply the rule.

What am I trying to achieve: It happens more than once that a customer buys something and something goes wrong, they want to give them, say 10% discount on the next product (not the whole order, just one product). Giving a fixed amount discount doesn't do it because there are different product prices, etc.

I haven't set up any special rules for the conditions (always applies) I've just created a coupon code to apply the rule.  Also it can match any product in the order, but preferably only the lowest.

Any ideas?


texts: Magento 2: Issue with php bin/magento setup:upgrade

texts:
when i run this command php bin/magento setup:upgrade

  /home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/BuildAssets/Interceptor.php" file can't be deleted. Warning!unlink(/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/BuildAssets/Interceptor.php): Permission denied The "/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/FixData/Interceptor.php" file can't be deleted. Warning!unlink(/home/vitalticks/public_html/generated/code/Codazon/ThemeLayoutPro/Console/Command/FixData/Interceptor.php): Permission denied


texts: Magento 1 : How to disable product price update on the front-end when changing a product Qty

texts: I want to disable the price update with qty. In default magento price calculation is "Product PriceXQty". I want to disable it and total price in the cart is product price only.


texts: How can different users log in with the same customer(same email id) and place multiple orders simultaneously?

texts:
We want to implement a functionality in which multiple executives logged in from a dealer account can place orders simultaneously.

As per Magento default functionality with users logged in using the same account, Magento merges the carts of all users. Can any one suggest a way to implement it or have an idea if already implement the same function previously.


texts: How to add brand page URLs in sitemap.xml

texts:
I have created sitemap.xml on the website. That's fine.

But I want to show brands page URLs in the sitemap.xml

How can do this?


texts: Magento 2 : How to show products and shipping method on order success page? As picture below:

texts:
htdocs/vendor/magento/module-checkout/view/frontend/templates/success.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php /** @var $block \Magento\Checkout\Block\Onepage\Success */ ?>

    <?php if ($block->getOrderId()):?>
        <?php if ($block->getCanViewOrder()) :?>

<?= __('Your order number is: %1.', sprintf('%s', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?>

        <?php  else :?>

<?= __('Your order # is: %1.', $block->escapeHtml($block->getOrderId())) ?>

        <?php endif;?>

        Enviaremos para você um e-mail de confirmação do seu pedido com detalhes e informações de rastreamento.
        Adicione o e-mail  suporte@suporte.com.br a no seu livro de endereços e verifique  sua pasta de spam caso não receba o  e-mail de confirmação do pedido.

        Agora é só aguardar a confirmação do seu pagamento. Você receberá um e-mail assim que o seu pagamento for confirmado.

        Em caso de dúvidas, entre em contato com o e-mail informado acima ou ligue-nos no 0000-0000 (custo de ligação local).

Status do Pedido

Suas Compras

    <?= $block->getProductItem() ?> //This is where I want you to display the purchase you made

Dados do Envio

    <?= $block->getMethodShipping() ?> //This is where I want you to display the delivery method selected by the user.

 <?php endif;?>

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

            <a class="action primary continue" href="<?= /* @escapeNotVerified */ $block->getContinueUrl() ?>"><?= /* @escapeNotVerified */ __('Continue Shopping') ?>

  htdocs/vendor/magento/module-checkout/Block/Onepage

/* Methods for displaying purchased products and selected shipping method */

public function getProductItem()
{
    return 'View my purchase'; //What would the method of displaying a purchase look like?
}

public function getMethodShipping()
{
    return 'Selected Shipping Type'; //What would be the method for displaying the selected shipping type?
}


texts:
i am new to magento i want to add observer to magento customer register , where i check reference code if code not valid do not register customer.

what have i do override customer registration ?..

what observer have i write for it any guide or refernce


texts: Getting error on installing magento 2.2.4

texts:
I am trying to install magento latest version 2.2.4. But I am facing

  Fatal error: Cannot use Magento\Payment\Gateway\ConfigInterface as
  ConfigInterface because the name is already in use in
  C:\xampp\htdocs\magento224\vendor\magento\module-payment\Model\Method\Logger.php
  on line 8


texts: How to upgrade new version of module code by using composer in Magento 2 from third party repository

texts:
We have installed third party modules successfully using command composer update by Adding below repository to composer.json

"repositories": {
    "0": {
        "type": "composer",
        "url": "https://exampleurl.com"
    },
    "magento": {
        "type": "composer",
        "url": "https://exampleurl.com"
    }
},

Now few of the modules have been updated/edited in the third party repository(https://exampleurl.com).

How can we get those latest module changes into my instance by using composer.
Running composer update again is suggested ?

Help would be appreciated.


texts:
How do you select a row based on that tables foreign key? My table and primary key is set and works as expected but now I need data from table to based on that foreign key. I have managed to get it to work by doing this

    $params = $this->getRequest()->getParam('id');
    $resource = new Mage_Core_Model_Resource();
    $read = $resource->getConnection('core_read');
    $select = $read->select()
                   ->from('prefcentre_options')
                   ->where('prefCentre_id = ?', $params);
    $user = $read->fetchRow($select);

But I am sure there is a better way, I have tried (but did not work)

    $params = $this->getRequest()->getParams();
    $user = Mage::getModel('prefs/prefsemail');
    $user->addFieldToFilter('prefcentre_id');
    $user->load($params);

===EDIT===

Sorry I should have been more specific (I was trying to keep my question concise and consequently neglected required information)

I have pulled data from table one based on the primary key, but using that same number I need to pull data from table two, which uses that same number as its foreign key, but obviously the primary key of table two does not correspond with the foreign key and so far I have been getting the data from the row that corresponds with the primary key


texts: extend sales_email_order_items.xml in custom theme

texts:
i want to override the following file in my custom theme vendor\magento\module-sales\view\frontend\layout\sales_email_order_items.xml I tried the following:

app\design\frontend\[Namespace]\[Theme]\Magento_Sales\layout\sales_email_order_items.xml

but for some reason it doesn't respect the changes i make to that file. Isn't it possible to extend email xml files in your custom theme?

extra info: yes i cleared all possible caches


texts: How to remove city field from checkout page

texts:
I have tried to remove city field from checkout page but didn't get success.

Can anyone help to remove city field?


texts: Magento2 - Error on checkout page while adding Configurable product to cart

texts:
I am using a custom module, where I want to redirect to checkout page once a product is adding to cart. For this I have created an observer controller_action_postdispatch_checkout_cart_index.

For simple product its working fine. But where I am adding a configurable product it will redirect to checkout page with attribute data so, I am getting an error of noroute on checkout.

Here is my Observer code:

 $login_url = $this->url->getUrl('checkout/index/index');

 $observer->getRequest()->setParam('return_url',$login_url);

My error on checkout page because url become like:

www.yourDomain.com/checkout/#colors=5431


texts:
Need to create ajax filter for category. Please help me to create AJAX category filter.

I don't want any use extension.

My Magento version : 1.9


texts: Disable payment failed email in Magento 1.9.3

texts:
I want to know how to disable the payment failed email,
which is sent to admin if payment fails in Magento 1 from back-end or using code.


texts: Magento 2.1 : Adding a video to a product using REST API

texts:
I am trying to add video media to product using REST API. Example below

$data = [   'entry' => [
      'id' => null,
      'media_type' => 'external-video',
      'label' => null,
      'position' => 0,
      'types' => ['image', 'small-image', 'thumbnail'],
      'disabled' => false,
      'content' => [
          'base64_encoded_data' => base64_encode(file_get_contents('http://img.youtube.com/vi/axwE9q7llEQ/0.jpg')),
          'type' => 'image/jpeg',
          'name' => '0.jpg'
      ],
      'extension_attributes' => [
          'video_content' => [
              'media_type' => 'external-video',
              'video_provider' => 'youtube',
              'video_url' => 'https://www.youtube.com/watch?v=axwE9q7llEQ',
              'video_title' => 'KęKę',
              'video_description' => null,
              'video_metadata' => null
          ]
      ]   ] ];

$ch = curl_init("http://URL/index.php/rest/V1/products/BICUMD2ndXXX036/media"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

curl_exec($ch);

At the end I am receiving new media file ID but in admin I see that some fields like video url or description are empty. Any idea what I am doing wrong?


texts: How to modify the description of products in magento 2?

texts:
I have a simple plugin in magento 2 that modifies the name of the products, but I can not find the function that modifies the description

public function afterGetName(\Magento\Catalog\Model\Product $subject, $result)
{
   return '|' . $result . ' - Test';
}

So modified the names of the products, I also have the function to modify the prices but what is the function to modify the description?


texts: Can I use a .sql file in my Magento module installer?

texts: I have a large SQL file. Can I use this in my module installer?


texts: Order confirmation, add order comment, Order (send email), Send Order Email Copy To

texts:
I have a weird problem. For some reason, all order related functions doesn't work.
Order confirmation doesn't get send
Add order comment and email doesn't send
Clicking on the send email in order doesn't send
And adding send order email copy to "my email address" doesn't send.

HOWEVER, invoice, shipment, newsletter email and all the functions above works perfect.

I don't understand?!


texts: Manage Brands / Manufacturers in admin. Show brand logo and story in Product Page

texts:
I am looking for a best practice to show content about the manufacturer/brand on a product page. For example brand logo and story/description.

This could be achieved just by importing the description to each product, but it would be a nightmare to manage.
I would like to manage the brands via admin panel or updating an external csv-file.

Is there a "native" way to show more content, based on selected attribute? Or do I need to create a module to get there? All ideas and tips are welcome as I am new to Magento and this forum.

Example image:


texts:
I'm using this module to replace webservicex currency rates importer:
https://github.com/philwinkle/Philwinkle_Fixerio

It is working ok when I hit import and save in the backend.

But I want to run it via a cron.

So I added to the module's config:

<crontab>
    <jobs>
        <fixerio>
            <schedule>
                <cron_expr>* * * * *</cron_expr>
            </schedule>
            <run>
                <model>fixerio/import::_convert</model>
            </run>
        </fixerio>
    </jobs>
</crontab>

And then run it with magerun:

./n98-magerun.phar sys:cron:run fixerio

It appears ok in the database and don't get errors in the console.

But the rates aren't modified in System -> Manage currencies.

If I insert a random value and save it then after the cron it will not update.

Any ideas? Thanks!


texts: Make sticky header for Magento 2 problem

texts:
I'm following the answer in this topic to keep header sticky. So far I've created vendor/theme/web/js/sticky.js with the following content:

require([ "jquery" ], function($) {
    $(window).scroll(function() {
        if ($(window).scrollTop() > $('#header').offset().top && !($('#header').hasClass('sticky'))) {
            $('#header-2').addClass('sticky');
        } else if ($(window).scrollTop() == 0) {
            $('#header').removeClass('sticky');
        }
    });
});

and called this file inside vendor/theme/Magento_Theme/layout/default_head_blocks.xml

<link src="js/sticky.js"/>

Second part of this answer says:

"add some css to this sticky class like this:"

#header.sticky {
    background: #fff none repeat scroll 0 0;
    border-bottom: 4px solid #325052;
    margin: 0 auto;
    max-width: 100%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 99;
}

How can I implement this part? I've tried creating a css/sticky.css file with the code above and link it on default_head_blocks.xml ( <css src="css/sticky.css"/> ), but it's not working.


texts: How to list Parent & Child Category BY Knockoutjs

texts:
I want to list category block By knockoutjs.
Currently I Implemented By Direct PHP Code But I want to do by Knockout js.

My Block code
----------
namespace QuickLearn\Knockout\Block;
class CategorisCollection extends \Magento\Framework\View\Element\Template
{
     protected $_categoryHelper;
     protected $categoryFlatConfig;
     protected $topMenu;
    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Catalog\Helper\Category $categoryHelper
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Helper\Category $categoryHelper,
        \Magento\Catalog\Model\Indexer\Category\Flat\State $categoryFlatState,
        \Magento\Theme\Block\Html\Topmenu $topMenu
    ) {
        $this->_categoryHelper = $categoryHelper;
        $this->categoryFlatConfig = $categoryFlatState;
        $this->topMenu = $topMenu;
        parent::__construct($context);
    }
    /**
     * Return categories helper
     */
    public function getCategoryHelper()
    {
        return $this->_categoryHelper;
    }
    /**
     * Return top menu html
     * getHtml($outermostClass = '', $childrenWrapClass = '', $limit = 0)
     * example getHtml('level-top', 'submenu', 0)
     */
    public function getHtml()
    {
        return $this->topMenu->getHtml();
    }
    /**
     * Retrieve current store categories
     *
     * @param bool|string $sorted
     * @param bool $asCollection
     * @param bool $toLoad
     * @return \Magento\Framework\Data\Tree\Node\Collection|\Magento\Catalog\Model\Resource\Category\Collection|array
     */
   public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
    {
        return $this->_categoryHelper->getStoreCategories($sorted , $asCollection, $toLoad);
    }
    /**
     * Retrieve child store categories
     *
     */
    public function getChildCategories($category)
    {
           if ($this->categoryFlatConfig->isFlatEnabled() && $category->getUseFlatResource()) {
                $subcategories = (array)$category->getChildrenNodes();
            } else {
                $subcategories = $category->getChildren();
            }
            return $subcategories;
    }
}

My Phtml
------------

<?php
$categories = $this->getStoreCategories(true,false,true);

$categoryHelper = $this->getCategoryHelper();
?>

<?php
foreach($categories as $category):
    print_r($categoryHelper->getCategoryUrl($category));
     if (!$category->getIsActive()) {
        continue;
     }
?>

<a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?>

<?php
if($childrenCategories = $this->getChildCategories($category)):
?>

<?php
foreach($childrenCategories as $childrenCategory):
     if (!$childrenCategory->getIsActive()) {
        continue;
     }
?>

<a href="<?php echo $categoryHelper->getCategoryUrl($childrenCategory) ?>"><?php echo $childrenCategory->getName() ?>

<?php
endforeach;
?>

<?php
endif;
endforeach;
?>

I want to know that how can i implement this by Knockoutjs.


texts: Magento 2: Call Controller method from Model

texts:
How to call the controller method from model?

Or

How to programmatically reindexing using API?

Here is my code.Below code gives me error like below.

  {
      "messages": {
          "error": [
              {
                  "code": 500,
                  "message": "Fatal Error: 'Class Inchoo\Hello\Model\Hello contains 1 abstract method and must
  therefore be declared abstract or implement the remaining methods
  (Magento\Framework\App\ActionInterface::execute)' in
  'C:\new\xampp\htdocs\ChoiceWholesale\app\code\Inchoo\Hello\Model\Hello.php'
  on line 5",
                  "trace": "Trace is not available."
              }
          ]
      } }

<?php
namespace Inchoo\Hello\Model;
use Inchoo\Hello\Api\HelloInterface;

class Hello extends \Magento\Framework\App\Action\Action implements HelloInterface
{

    protected $indexFactory;
    protected $indexCollection;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Indexer\Model\IndexerFactory $indexFactory,
        \Magento\Indexer\Model\Indexer\CollectionFactory $indexCollection
    )
    {
        $this->indexFactory = $indexFactory;
        $this->indexCollection = $indexCollection;
        return parent::__construct($context);
    }

    public function name() {

        $indexerCollection = $this->indexCollection->create();
        $indexids = $indexerCollection->getAllIds();

        foreach ($indexids as $indexid)
        {
          $indexidarray = $this->indexFactory->create()->load($indexid);

          //If you want reindex all use this code.
           $indexidarray->reindexAll($indexid);

          //If you want to reindex one by one, use this code
           $indexidarray->reindexRow($indexid);

           echo "Reindexing Id :: " .$indexid ."<br>";

        }
        echo "Reindexing Completed";
        exit;

    }
}


texts:
I am trying to set up a schedule feed using /cron.php, but I keep receiving a 403 forbidden message.  I have Magento 1.9, I am not a developer so have minimum knowledge, and I use 123-reg cpannel.

I have seen that code needs to be put in a .zip file, but not sure where I find this.  Can someone please talk me through how I make this work.  Also been told that I can put some code in the command file but cannot find that either, have found the shell file.

Any help would be appreciated.

Thank you.


texts: Magento 1.9 - Please specify a shipping method

texts:
So I've already seen a couple of the other answers to this question on the site, however, my problem is still persisting.

Whenever someone tries to purchase an item using PayPal Express, when they click "Pay Now" it sends them to the Magento Review Page and throws the error "Please specify shipping method". However, if the user goes back to the PayPal Express page, and tries to pay again, it will go through just fine.

Whilst digging through the Magento files to try and see the issue, I've tried the following things.

Set the Timeout Callback on the shipping options to 6s

Added

/**
 * Start Customization
 */
    if (!$rate) {
     Mage::logException(new Exception("Rate was empty inside quote validate method, trying to forcefully recalculate"));
     $this->getQuote()->getShippingAddress()->setCollectShippingRates(true);
     $this->getQuote()->setTotalsCollectedFlag(false);
     $this->getQuote()->collectTotals();
     $rate  = $address->getShippingRateByCode($method);
    }
/** End Customization **/

From This Question

And I've tried logging the entire process.

What I've gathered from everything is that it looks as though Magento isn't picking up the Shipping Method returned by PayPal, as the Method and Rate from the function _validate() (in /app/code/community/sale/service/quote.php) are Both empty when the pay now action is processed.

Paypal is definitely returning the shipping methods too.

If you need any extra code etc, just comment below.

Any help would be greatly appreciated. :)

Thanks!


texts: Magento 2 fotorama slider show more than 1 image at a time

texts:
I want to show 3 product images at a time on Product detail page.

Here is the example image:

But fotorama image only show 1 image at a time on slider.
It doesn't have slides or items options to set slides of slider view.

Any suggestion would be appreciated.


texts: Custom options, create order in backend, uses default prices instead of store prices

texts:
When setting up a custom options with website level prices and creating an order in the admin, at first, it shows the right price, but when selecting the billing country it resets the price to use the default custom option price.

Example: I have a product that costs 100$. The custom option for US website costs 240$ and the default value is 20$. At first the price is shown correctly: 340$, but when selecting USA as a country for the customer it goes to 120$.

Prices are set at website level.

Any idea why this is happening? Tried in base magento theme and it has the same behaviour. The frontend works as expected, just the backend is the issue.

Update: I tried it in versions 1.7 and 1.9 on different websites, disabled all modules etc. Anyone can recreate the issue? Is it a magento bug or a setting in the admin that I'm missing?

Update 2: After further digging I've found something that might point to the error. When selecting the country, prototype.js is fired with this ajax call:

POST http://website/index.php/admin/sales_o...ey/96...21/shipping_method/billing_method/totals/giftmessage/items?isAjax=true

and there is this html response:

{"shipping_method":"
\n
\n
<\/div>\n
Shipping Method<\/h4>\n <\/div>\n
\n
\n \n Get shipping methods and rates <\/a>\n \n <\/div>\n
Shipping method selection is not applicable<\/span><\/div>\n

If I add another product it works as expected, so the error appears only for the first product.

Thanks!


texts: Magento 1.9 print invoice the characters are shown split and reverse

texts: I have changed the font of pdf invoices to support Arabic characters, but the problem is the characters are split and reversed?  Any suggested solution please Help!


texts:
i am using magento and trying to speed up my site.

one of the obviouse error gt matrix and google tool is giving to optmise my images.

i am bit confuse here as my site only host few banners etc, rest of all images (product images) are hosted on a third party website, and my site just receive a link for image and then show that image on front end.

just for your record i use stock in the channel and there plugin.

i do not have any controll on those images. so how can i optimize them?

i have been looking for a decent (free) plugin which can help me but couldnt find any.

your help in this matter will be apreciated.

note: i already have installed fooman speedster to combine my css and javascript but i dont think it optimise site images or image links.


texts: Multi sub-attributes for manage types of colors with only one selection available

texts:
I need some help for setting up a configurable products with this features.

Let's say we are selling a cushion. We have two kind of tissues in different colors: cotton and acrylic.

Cotton is available in red and green. Acrylic id available in brown and white.
So we create two attributes, cotton and acrylic and add attribute values for colors.

Now we create the configurable product cushion01 with the proper attribute set (both cotton and acrylic attribute available).

The problem is in simple products association: I can create and associate a simple but I need to define both the two attributes. And this is NOT what we want: if a user chooses "acrylic white" he cannot choose "cotton red". We only want a single attribute to be selected from one of the two tissue dropdowns.

Any ideas?


texts:
I can't figure out why mine doesn't look like the example theme

MINE

http://cocochella.com/shop/clothing/dresses/asd.html

EXAMPLE

http://demo.meigeeteam.com/blacknwhite-magento-theme/english/jacket-with-detachable-fur.html

The options are spread out at the bottom and the facebook and twitter icons are gone. It is only for Configurable Product. My simple products look fine.

cocochella.com/shop/jewerly/necklaces/long-trible-black-bead-pendant-necklace.html

Please help!!!


texts: Magento2 - Overriding magento2 backend theme

texts:
How to use a new theme admin?
in Magento v1.x had to create a controller to configure a new theme.
ex:

` public function overrideTheme()
    {

        Mage::getDesign()->setArea('adminhtml')->setTheme('arc');
    }`

but I don't know how to in Magento v2.0?


texts: how to create custom api to get customer collection magento 2?

texts:
I am beginner to create API in magento 2. Can anyone help me step by step process to create custom api to get customer collection.

Which is better REST & SOAP?

Also, How can I test this custom API on postman? Thanks in advance.


texts: What is the best way to sync blog posts across multiple Magento sites?

texts:
I have 8 Magento 1.9.2 sites on different domains. I want to have the ability to create a single post, centrally, that will automatically generate the same post on all 8 sites. The blog extension is currently Blog - Community Editionhttps://ecommerce.aheadworks.com/magento-extensions/blog.html

At this point no blog posts have been made and I am trying to figure out an optimized solution before making any.

What kind of options would you guys recommend for implementing this?


texts: how to fetch order number, payment method and customer name according to invoice number in admin panel grid?

texts: I`m fetching invoice collection using Mage::getModel('sales/order_invoice')->getCollection(); but I also want Order number, payment method and customer name according to the invoice number. How to fetch that and display in grid?


texts: Magento 2 How to make "Save" button same as "Save & Close" on product add/edit?

texts:
I need to make the "Save" button same as "Save & Close" on the product add/edit in admin?

I need both buttons will behave the same. (when click on save it will save the product and go to the product list)

How could I achieve this functionality with a custom module?


texts: Magento 2: Adding column to Sales Order grid table

texts: Magento2:Adding column to Sales Order grid table.


texts:
My goal is to install Magento2 on a computer running Ubuntu which will be a server for my local network, so various workstations can access and build products.
I have a computer that meets the requirements, and it has a new hardrive with a fresh install of Ubuntu.
I have tried to follow various guides i have found online to do this, but it seems they are all out of date in one step or another (i have refor.ated and reinstalled Ubuntu after each failer to make sure i start fresh each time)
I am hoping someone can point me in the write direction for a guide/video to follow that is up to date, and specificly for creating it as a localhost (using apache2, mariadb, and php7.2).
While linux is fairly new to me, i am computer literate but still having a tough time.


texts:
I am using Magento 2.2.2 version.

I have configured the setup in my local and it is working fine.

When I moved to the server, it is not working.

I am getting the following error.

I have followed the below steps:

Gave 777 to the entire folder.

I have got the below error:

Autoload error
Vendor autoload is not found. Please run 'composer install' under application root directory.

Update:

I am trying to install composer using the command composer install.

I am getting the below output:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing magento/zendframework1 (1.13.1)
Downloading: 100%
Invalid zip file, retrying...

It is downloading the files and says Invalid zip file, retrying... so many times.


texts:
MEQP2: How to resolve below issue?

abstract class ClassName extends \Magento\Backend\App\Action
{
    public function __construct(

        ...
        \Magento\Catalog\Helper\Product $productHelper,

        ...
    ) {
        parent::__construct($context);
        $productHelper->setSkipSaleableCheck(true);
        ...

    }
}

Error is :

  Only dependency assignment operations are allowed in constructor. No
  other operations are allowed. with line
  $productHelper->setSkipSaleableCheck(true);

Note: My class is depend on so many other classes? :(


texts:
Thanks in advance.

The problem I have is that when I call a controller it gives me a 404 error.

I have already done clear cache, permissions 777 and 644 to folders and disable and activate the created module.

I attach the code in case you see any errors.

config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
        <modules>
                <Mymodule_GeneratePdf>
                        <version>1.0</version>
                </Mymodule_GeneratePdf>
        </modules>
        <frontend>
                <routers>
                        <mymodule_generatePdf>
                                <use>standard</use>
                                <args>
                                        <module>Mymodule_GeneratePdf</module>
                                        <frontName>generatepdf</frontName>
                                </args>
                        </mymodule_generatePdf>
                </routers>
        </frontend>
</config>

controllers/IndexController.php

class Mymodule_GeneratePdf_IndexController extends Mage_Core_Controller_Front_Action
{
    public function PdfAgreementsAction()
    {
        $numDoc = $_POST['numdoc'];
        Mage::log($numDoc);
    }
}

etc/modules/Mymodule_GeneratePdf.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mymodule_GeneratePdf>
            <active>true</active>
            <codePool>local</codePool>
        </Mymodule_GeneratePdf>
    </modules>
</config>

call by phtml

  function getPdf(num){
    jQuery.ajax({
        url: "<?php echo $this->getUrl('generatepdf/index/PdfAgreements'); // Mage::getUrl('generatepdf/index/PdfAgreements'); ?>",
        type: "POST",
        data: { numdoc: num}
     }).done(function(data) {
console.log(data);
});
}

Thanks.


texts: Is it possible to offer different shipping methods to customers in different locations

texts:
We ship perishable goods and currently get exact price quotes from UPS and USPS and allow the customer to choose their shipping method  (ground, 2nd day, etc.).  During the summer months we have to restrict the available shipping methods to 2nd Day air or better to ensure our goods are in good shape when they arrive.
  We would like to be able to offer ground shipping to the people who live nearby, while still only offering 2nd day or better to people who live further away.  We still want to use the exact price quotes so I'm pretty sure table rates won't work, and I haven't been able to figure out another way.

Thanks


texts: Add Custom catalog_product_link_type Into database [Related Products, Up-Sells, Cross-Sells Section] Product Add

texts:
I Am Creating Custom catalog_product_link_type,

I've added Additional Section in Related Products Section And It is Working.

But How to Save Values Of This additional section Into Database.

I have Created My Custom type by adding it into catalog_product_link_type table.

Does AnyOne Know which controller, js, event is used for saving this data.??


texts: Magento2 Guest Checkout not tracking in Analytics

texts:
I have Magento CE 2.2.6 and one page checkout. I've set up Google Analytics per the built in configuration. After a few days I've discovered that a percentage of our orders are just never getting to GA at all as orders. For instance during a period of time we show 3 orders came in via the Orders tool but GA only shows one.

It appears that the ones that are not tracked are Guest orders (customer does not have an account with us).

When I place test orders in dev I can see a difference in the URL that gets called by analytics:
Guest orders on the thank you page call the URL https://www.google-analytics.com/r/collect while logged-in orders on the thank you page call https://www.google-analytics.com/collect. I'm not sure if that is the cause of the lost orders but it seemed like it might point us in the proper direction. I was unable to find anything explaining what the /r/ means. All of the other passed parameters look correct and the GA Tag Assistant doesn't show any problems with the fired pixel.

Thank you for any help.


texts: Confused by multiple, conflicting 'Last Logged In' Stats

texts:
This is an example of a customer page on the backed. It shows two fields, 'Last Logged In:" and "Last Logged In(America/Los_Angeles):", which is the home timezone of the store.

I am confused at what the different fields represent. In this case, the year of the first field is way off, but that seems irrelevant. What I am interested in is why there is a 3 week difference in dates. Is one when the customer last visited, tracked by IP, and one when the customer last actually logged in?

My initial google searches yielded no information on this so I am curious if people more experienced with Magento than I may know what the separate fields are for.


texts:
I am working with Magento 1.7 and suddenly I have this error when I go to cache management:

  cache_dir must be a directory

I tried this solution to change this file lib/Zend/Cache/Backend/File.php

'cache_dir' => 'null' to 'cache_dir' => 'tmp/' but does not work


texts: Filtering Magento recommend product shortcode by an attribute

texts:
I am trying to display recommended products on a page, the code for a random selection of products is this:

{{block type="ibtheme/product_list_featured" products_count="8" random_products="" template="catalog/product/list/featured.phtml"}}

However I have added an attribute to the products (Yes/No attribute) with the ID of recommended_product, how can I get this shortcode to only display products with the attribute marked as "Yes"?

Thanks


texts: Eway Payment Gateway Not work in Magento 2.3.0

texts:
I am facing error
{"error":"Error happened when getting access code, please try again later"}

AND

http://cityflowersales.com/rest/default/V1/carts/mine/payment-information
400 as I am using eway 3.0.5 with magento 2.3.0 and php 7.2.

before I was used magento 2.1 with eway 2.0 but faced same issue like now so I had decided to upgrade magento and eway but still facing same issue.
Request URL:
http://cityflowersales.com/rest/default/V1/carts/mine/payment-information

REQUEST :
{"cartId":"709","billingAddress":{"customerAddressId":"14","countryId":"AU","regionId":"0","regionCode":null,"region":null,"customerId":"515","street":["Centenary

Hospital for Women & Children","Cnr Yamba & Hindmarsh
Drives"],"telephone":"0262442222","postcode":"2617","city":"Bruce","firstname":"fgfg","lastname":"fgfg","saveInAddressBook":null},"paymentMethod":{"method":"ewayrapid","additionalData":{"SecuredCardData":"A1001pI0XNF-rDHd8HELWsbU4dZObqkdF9MvX5uMcLGuoM2u42tcCRNDkhxFv8L15WZG0","TokenID":1,"TokenAction":"use"}}}

RESPONSE :
{"message":"Transaction has been declined. Please try again later."}

Can someone please help me?


texts: How to add language switcher in popup on loading Magento2 homepage for first time

texts:
I am creating a website with 2 store views - English and Arabic.
I would like to add the language switcher inside a popup when a user opens the homepage.

But the popup need to display only once (probably by setting some cookie value or whichever is efficient).

For example, If I add the modal popup in a widget and call it in homepage, is there a way to limit the number of occurrences? Or Could anybody please help me with a better idea on how to do this. Thank you so much in advance.


texts: When a customer registers for an account that requires manual activation, they see the message "This account is not activated". How can I edit that message? I have been unable to find the file that contains that message.


texts: How to get custom risk attribute in sales order grid

texts:
I'm trying to display the custom  attribute in sales order grid using left join. If I had the joinLeft query I'm getting "No records found in sales order grid"

$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join(array('customer' => 'customer_entity'), 'customer.entity_id = main_table.customer_id', array('customer.group_id'));
$collection->getSelect()->joinLeft('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id',array('telephone','postcode' ) )->where("sales_flat_order_address.address_type = 'billing'");
$collection->getSelect()->joinLeft(array('mt'=>'sales_flat_order'), 'main_table.entity_id=mt.entity_id',
    array("partner_orderid"=>"partner_orderid","order_trackingurl"=>"order_trackingurl","payment_status"=>"payment_status", "loan_document_status"=> "loan_document_status","mifos_down_payment" => "mifos_down_payment", "partner_web_flag" => "partner_web_flag"));
$collection->getSelect()->joinLeft(array('orderitem'=>'sales_flat_order_item'), 'main_table.entity_id=orderitem.order_id',
    array("original_price"=>"original_price","row_invoiced"=>"row_invoiced","name"=>"name"));
$collection->getSelect()->group('entity_id');
$fn = Mage::getModel('eav/entity_attribute')->loadByCode('1', 'mobile');
//$ln = Mage::getModel('eav/entity_attribute')->loadByCode('1', 'college_name');
**$nf = Mage::getModel('eav/entity_attribute')->loadByCode('1', 'grisk_nach_flag');**
$tln = Mage::getModel('eav/entity_attribute')->loadByCode('1', 'grisk_college_new_id');
$customUrl = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'customer_url');
$collection->getSelect()
    ->joinLeft(array('ce1' => 'customer_entity_text'), 'ce1.entity_id=main_table.customer_id', array('mobile' => 'value'))
    ->where('ce1.attribute_id='.$fn->getAttributeId())
    //->join(array('ce2' => 'customer_entity_varchar'), 'ce2.entity_id=main_table.customer_id', array('college_name' => 'value'))
    // ->where('ce2.attribute_id='.$ln->getAttributeId())
    //->columns(new Zend_Db_Expr("ce1.value AS customer_name,ce2.value AS customer_college"));

    ->joinLeft(array('ce3' => 'customer_entity_int'), 'ce3.entity_id=main_table.customer_id', array('grisk_college_new_id' => 'value'))
    ->where('ce3.attribute_id='.$tln->getAttributeId())

    **->joinLeft(array('ce4' => 'customer_entity_int'), 'ce4.entity_id = main_table.customer_id', array('nach_flag' => 'value'))
    ->where('ce4.attribute_id='.$nf->getAttributeId())**

    ->joinLeft( array('cmps' => 'campus'), 'cmps.id=ce3.value',array('cname' => 'name') )

    ->columns(new Zend_Db_Expr("ce1.value AS customer_name, cmps.name AS customer_college, ce4.value AS customer_nach"))
    ->joinLeft(array('ct' =>'cities'), 'ct.id=cmps.city',  array('city_name'=>'address'));

//echo $collection->getSelect();
if (!Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/gridview')) {
    $collection->addFieldToFilter('entity_id', 0);
}
$this->setCollection($collection);


texts: Magento writes Empty needle warning every 5 minutes

texts:
I am trying to understand if what I am seeing is causing any kind of issue in the store, and If there is a need to take an action?

I can see in my system.log below 2 lines are being written once every 5 minutes :

 Warning: strpos(): Empty needle  in /home/XXX/public_html/lib/Zend/Controller/Request/Http.php on line 508

 Warning: strpos(): Empty needle  in /home/XXX/public_html/lib/Zend/Controller/Request/Http.php on line 514

In Http.php line 508 I have the below code:

        if (0 === strpos($requestUri, $baseUrl)) {
            // full $baseUrl matches
            $this->_baseUrl = $baseUrl;
            return $this;
        }

and in Line 514 is :

       if (0 === strpos($requestUri, dirname($baseUrl))) {
            // directory portion of $baseUrl matches
            $this->_baseUrl = rtrim(dirname($baseUrl), '/');
            return $this;
        }

Because I have no clue about this issue at all, I thought it migth be related to cron job since it is configured to run every 5 minutes, but cron job is working as expected. (at least I can see emails are being delivered, and the cron job table in db is changing)

I have the cron job command like below:

     php -f /home/XXXX/public_html/cron.php

P.S : I am not using any load balancer. The store is running on a single url with different parameter to determine the Website. E.X: www.xxx.com/us and www.xxx.com/uk


texts: CMS page save with "from" and "select" words in Magento 2

texts: Is there other way to save "from" and "select" words in CMS page without disabling ModSecurity module?


texts: How to hide new or featured product from home page if it is out of stock - Magento 1.7

texts:
I am showing new and featured products on my home page. I'd like to show only products that are on stock. If a product is marked as new or featured it will be shown here only if it is on stock (have stock greater than zero).

This requirement is just for home page, on other pages I'd like to show out of stock products.

This method don't work: System/Configuration/Catalog/Inventory/Display Out of Stock Products - NO

How can I do that?

Thank you!


texts: Background or concurrent taks in Controllers

texts:
I am currently programming an extension for Magento 2. I am developing an observer that is triggered when you make an action inside a controller in the admin section.
What I do is to fetch all products and its attributes and send them to a third party service with a POST request. This upload takes some time, and it could take longer depending on the amount of products in the ecommerce. I want to know if there is any method to do this in the background, so the user doesn't have to wait until the finish of the upload.
Also, if this isn't possible, can I make use of another method to do this more efficiently, like a concurrent upload or something like that?


texts: Custom plugin - HOW TO GET SAVE CONFIGURATION VALUE

texts:
I have my custom module with magento 1.7 which has configuration page in checkout tab in admin panel. I have different fields like text,textarea,select on form. I want to get these values when I click on 'Save Config' button.
Although I Have helpers and models of my module. But I'm not getting understand how/what to make a new helper/model file and what function will be to get these field values after clicking on 'Save Config' button.
I have system.xml file of my module.

Thanks a lot


texts:
All the templates in my custom child theme suddenly started showing a white screen. The error logs showing the following:
[2020-08-10 17:29:28] main.WARNING: Broken reference: The element with the "before.body.end" ID wasn't found. Verify the ID and try again. [] []

I've removed any reference to before.body.end and cleared caches but the white screen and this error still persist.


texts: How to pass customer information from magento to codeigniter in same domain

texts:
How can I pass the customer session and information from Magento  to Codeigniter in same domain. In codeigniter I have created a function to check the customer session then if the customer is logged in then returning the customer information or else redirecting to magento customer login page if not.

In codeigniter Created a function as

public function loggedIn(){

    //$customerInfo = array();
    $dir = $_SERVER['DOCUMENT_ROOT'];
    $fullPath = $dir.'/magento/app/Mage.php';
    echo $fullPath;

    require_once( "$fullPath" );
    umask(0);

    // Initialize Magento
    Mage::app();

    // You have two options here,
    // “frontend” for frontend session or “adminhtml” for admin session
    Mage::getSingleton('core/session', array('name' => 'frontend'));
    $session = Mage::getSingleton('customer/session', array('name'=>'frontend'));
    $customer_data = Mage::getModel('customer/customer')->getCustomer();
    if($session->isLoggedIn()){
    echo "Logged In";
    var_dump($customer_data);
    }
    else{
    echo "Logged out";
    header('Location:http://localhost/magento/customer/account');
   // Mage::app()->getFrontController()->getResponse()->setRedirect("");

    }

 }

When customer is loggedIn in magento then it shows "Logged In" and for logged out user it is redirecting. However, it is not showing any logged in user information.

I had tried both-- getSingleton('customer/session') and getModel('customer/customer'); but it is not returning any value. And How can I use entire magento functionality in there. I am not able to use redirect function as well so just used PHP header function.

Thanks in advance


texts: can't Access Payment methods (under Sales ) in magento Admin Panel after server migration

texts:
I can't Access system -> Configuration -> Sales -> Payment methods after server migration. its shows server error 500

log details:

2016-02-01T10:38:27+00:00 ERR (3): Notice: Undefined index: httponly  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 96

2016-02-01T10:38:27+00:00 ERR (3): Notice: Undefined index: secure  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 98

2016-02-01T10:38:27+00:00 ERR (3): Notice: Undefined index: domain  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 100

2016-02-01T10:38:29+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 90: parser error : Start tag expected, '<' not found  in /var/www/vhosts/domain.com/httpdocs/lib/Varien/Simplexml/Config.php on line 510

2016-02-01T10:38:33+00:00 ERR (3): Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH'  in /var/www/vhosts/domain.com/httpdocs/lib/Varien/Crypt/Mcrypt.php on line 56

2016-02-01T10:38:33+00:00 ERR (3): Notice: Use of undefined constant MCRYPT_MODE_ECB - assumed 'MCRYPT_MODE_ECB'  in /var/www/vhosts/domain.com/httpdocs/lib/Varien/Crypt/Mcrypt.php on line 60

link : index.php/admin/system_config/edit/section/payment/key/


texts: Magento 2: Create a custom order view page

texts:
In magento 2 is there any way to create same order view page in custom module?
I want to create a custom order view page where I have to display some more data but not want to display on core (order view page).
So for that I need to create a custom a page same as order view page


texts: Magento 1.9 - Invoice grand total is coming inclusive of tax

texts:
I have added catalog prices inclusive of tax. On frontend every prices are coming correct. But when create invoice in admin panel grand total is calculating with tax amount. And after invoice created, order total paid showing order grand total + tax amount.
Below are the settings of tax -

And when creating invoice totals calculation as below -

What setting should I change to correct totals calculation? Or should I do any customization in code?


texts: 499 Request forbidden by antivirus during checkout

texts:
I've a one page checkout. When I click on 'continue' button after select the shipping method it redirects to dashboard page.
I've noticed that it print a '499 request forbidden by antivirus' in the console, and I've noticed that this issue happens only in computers that have Kaspersky intalled.
I can't give up all customers with Kaspersky installed. What to do?
Thanks Guys.


texts: How can I get compare button in header section with the same functionality as of cart button

texts:
I'm an IT student and new in magento.

I was wondering, how can I create compare button as on that link http://ultimo.infortis-themes.com/demo/

I found sidebar.phtml file under vendor/magento/module-catalog/..../compare/
but I cannot find any code which would be responsible for creating that button with whole functionality.

Please help. I was looking for any answer in google but mostly there are topic about 'how to disable compare button/features etc' and nobody is asking how to add it.

I would appreciate for any help, advices.


texts: How to set attribute scope default global via sql

texts: How can I change the Scope value from store view to global?


texts: Tax report doesn't show me the taxes right taxes

texts:
I have a problem with my Tax report. I need to view the exactly taxes from one day or month but it seems not to work.

For example: On 28. September I made three invoices. All together has the tax sum of 54,91€. It's split in 13% tax: 49,41€ and 20% tax: 5,5€

When I display my tax report it shows me different amounts but I never get my 54,91€.

The only report that seems to work anyway, is the invoiced report (Total Invoiced vs. Paid Report) with this options:
Match Period To: Last invoice created date
order status: any

With this report I see three invoices with the correct sum.

Is there a way to set up the tax report as i need it or is there an extension?

my Magento version is 1.9.2.1


texts: How to retrieve last purchased products on a store/website level

texts: What is the most optimized why to retrieve last purchased products on a store/website level in order to use them on template block?


texts: Magento 2 Overide public static method of framwork class

texts:
I want to override public static function getCorrectFileName method of Magento\Framework\File\Uploader, I have check with Preference and Plugin but it is not working for me.

Anyone have idea about this ?


texts: Which versions of Magento include search suggestions?

texts:
I am using Magento Community Edition version 1.8, I am following these instructions in order to enable suggestions/autocomplete:

http://www.magentocommerce.com/knowledge-base/entry/configuring-catalog-search .

But I don't see the "enable search suggestions" drop down in my admin panel? Is this not an option in my edition or has it moved?


texts: Magento 2 - How to view static content deploy errors

texts:
When I run php bin/magento setup:static-content:deploy I have had some errors in my theme. I have got to the bottom of them but it was a pain, I had to manually go through all my LESS files to check for errors.

The culprit was an import that was missing an underscore.

I checked var/log/debug.log and var/log/support_report.log but these don't seem to log LESS errors. Client side compilation doesn't either, this just returned a 404 for styles-l.css and styles-m.css as the deployment must have failed before it reached these files.

TL:DR

Now my question is, are the static content deploy errors logged anywhere? It would have been so much easier if there was a log along the lines of x.less can not be imported.

This is Magento 2.0.4 with a custom theme using Luma as a parent.

Example of my error:

=== frontend -> ThemeName/default -> en_GB ===
...
Successful: 2248 files; errors: 1
---


texts: Cart price rule with fixed amount actually discounts more than defined

texts:
There is a fixed amount discount cart price rule set-up like so:

Yet a customer just used his code and he managed to get 100% off of €210,92...
Naturally this is not what we want, but what's wrong?


texts: How to restrict same type product in cart Magento 2 and maximum order amount below INR 50000

texts:
I have two types of products: Electronics, Glass.
I have a condition for the cart page i.e.:

Condition 1.

Electronics products can be ordered Single items at a time. it can not be ordered with Glass products.

Condition 2.

Glass products can be ordered multiple items but the order total must be below INR 50000. It can not be ordered with electronics products.
How to restrict same type product in cart ?


texts: Magento 2 Elasticsearch: Root mapping definition has unsupported

texts:
I am trying to setup elasticsearch 2.4.5 on a internal server and trying to use this for my EE 2.1.6 setup (magento installed in my local version). Following are the ES details.

{
  "name" : "The Grip",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "TtY4Vl4LRJ22V5wF1fhkOQ",
  "version" : {
    "number" : "2.4.5",
    "build_hash" : "c849dd13904f53e63e88efc33b2ceeda0b6a1276",
    "build_timestamp" : "2017-04-24T16:18:17Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.4"
  },
  "tagline" : "You Know, for Search"
}

When I try reindexing I get the following error.

Catalog Search indexer process unknown error:
mapper_parsing_exception: Root mapping definition has unsupported parameters:  [
  from: 0
][
  size: 10000
][
  stored_fields: [
    _id,
    _score
  ]
][
  query: {
    bool={
      should=[
        {
          match={
            sku=shirt
          }
        },
        {
          match={
            _all=shirt
          }
        },
        {
          match={
            color=shirt
          }
        },
        {
          match={
            description=shirt
          }
        },
        {
          match={
            manufacturer=shirt
          }
        },
        {
          match={
            name=shirt
          }
        },
        {
          match={
            short_description=shirt
          }
        },
        {
          match={
            status_value=shirt
          }
        },
        {
          match={
            tax_class_id_value=shirt
          }
        }
      ],
      minimum_should_match=1
    }
  }
][
  aggregations: {
    price_bucket={
      extended_stats={
        field=price_0_1
      }
    },
    category_bucket={
      terms={
        field=category_ids
      }
    }
  }
]

When I do it again then I get the following error.
    Catalog Search indexer process unknown error:
    illegal_argument_exception: Alias action [match] not supported

When I try using search on the store front it gives me an exception.

Exception #0 (Elasticsearch\Common\Exceptions\Missing404Exception):
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"magento2_product_1","index":"magento2_product_1"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"magento2_product_1","index":"magento2_product_1"},"status":404}

The above exception makes sense as Magento is looking for index magento2_product_1 and in ES the index created is magento2_product_1_v1.

Does anyone know what the error is really about? Why Magento is not able to create the index fully.


texts: Change the top links URL in a custom third party theme

texts:
I have to change the URL for "Placanje" link so it points to (http://localhost/darnik/customer/account/create/) instead of the current one. Please see the attachment with the template and block hints.

the two links are added in class Mage_Page_Block_Template_Links but I don't know in which moment they are added, so that I can change the specifics for each one. How can I find where these links are added to the block?

I used this advice:

https://www.classyllama.com/blog/editing-magentos-top-links-the-better-way

and I managed to add another link in the top links which now points to /customer/account/create/. But I can't remove the old one "Placanje" which has URL /checkout I tried to use the <action method="removeLinkByUrl"><url>/checkout</url></action> but it won't remove it. Where else can I look to remove this?


texts: Magento : Change Stock Availability From Dropdown to Text

texts: I want to change Stock Availability of product in backend, from drop down to text area to add custom text for product. My version is Magento 1.9.2.


texts: Magento2 import csv file get error interity constraint

texts:
Im  upload bulk products successfully  afterthat im delete all products  use this command  in my catlog

DELETE FROM catalog_product_entity;

afterthat im try to re upload products im getting an error like this

General system exception happened
Additional data: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ceratizit-11759716-spun-120308-inserts-for-turning.html-1' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT INTO `url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?),

How resolve this Error
Need Help..


texts: Get Productlist from order in success.phtml

texts:
I try to get all the products from an order in the success.phtml
This is what I try so far:

$order = Mage::getSingleton('sales/order');
$order->load(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$_items = $order->getAllItems();
echo count($_items);
foreach($_items as $_item) {

$order->getAllItems(); gives me a empty Array.

What is the right way to get the products from the order?


texts: how to get total number of orders placed by a customer in magento 2

texts: I want to show the total count that how many orders are placed by a customer at "my orders" tab in magento 2 front end.


texts:
I'm trying to change the language switcher(languages.phtml) to a website switcher.

echo count($block->getStores())

Returns the number of stores correctly but when I do

echo count($block->getWebsites())

it returns zero when I have 3 websites set up.
Is this code wrong or is there something that I need to look into?


texts: Checkout Error - Street address cannot contain more than 2 lines

texts:
I have hit a problem when trying to test my checkout on Magento 2.1.6.

After reading through a lot of this threads comments: https://github.com/magento/magento2/issues/6929 and following the advice from comment linked: https://github.com/magento/magento2/issues/6929#issuecomment-307531467

I find that the error message popping up on screen (not being logged...) is saying:

  Street address cannot contain more than 2 lines

My admin settings for customer addresses allows up to 3 lines??

I am testing this as a logged in user and have this problem. A braintree support person is also testing this and has successfully placed multiple orders into the system, but not logged in; only as a guest. So it appears to be something to do with the address of a logged in user?

Has anyone already fixed this issue who can point me to how?

Or has anyone got other ideas how to resolve please?


texts:
I need to Add Jquery Library to header using my custom Module.
so that I Create requirejs-config.js file under Vendorname_ModuleName\view\frontend
and Its As Below

var config = {
    map: {
        '*': {
            mypluginjs: 'Vendorname_ModuleName/js/mypluginjs'
        }
    }
};

then I added mypluginjs file under view\frontend\web\js  named mypluginjs.js

Then I added My js script to phtml as below

<script type="text/javascript">
require(['jquery','mypluginjs '],function($){
    $(window).load(function() {

//code here

    });
});
</script>

but its showing error.I think not loading  mypluginjs  .what was the issue.
is there any way to add custom jquery plugin via module


texts:
Looking at the features of the Enterprise edition for Magento 1.14 and 2.0, I am wondering which version to opt for ?

Some of Magento 2 EE highlights is:

Database scalability
Advanced search (Solr -
http://devdocs.magento.com/guides/v2.0/config-guide/solr/solr-overview.html)
Job queue opportunities Message Queues
(http://devdocs.magento.com/guides/v2.0/config-guide/mq/rabbitmq-overview.html)
Google Tag Manager support
Extended admin rights management features
The ability to manage customer attributes and create custom customer
attributes Scheduled FTP/SFTP transfer via XML
Dedicated 24/7 support

Magento Enterprise Edition 1.14.2 includes the latest versions of the Zend 1 Framework and Redis integration, as well as refinements to full-page caching that enable more pages to be served from cache. The release also includes many quality enhancements.

What are the key differences between Magento 2.0 vs 1.14 Enterprise
Edition ?
What should be suggested to a client where existing website is built
in 1.14 with respect to 2.0 enterprise ?

P.S Do not close it. If you think its too broad, at least try to answer key highlights


texts: Magento 2.3 : I want to add my third party js link in layout.xml file .?

texts:
Can anyone tell me how to add third party js link in magento2.3. I want to add this in my layout.xml file and use in template file.

The resource from “http://127.0.0.1/magento2/pub/static/version1578470158/front_US/https://test.com/scripts/test.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <head>
      <script type="text/javascript" src="https://test.com/scripts/test.js"/>
  </head>
    <referenceContainer name="head.additional">
        <block class="Magento\Framework\View\Element\Template" name="pricespider.tagging.success" template="Devcrew_PriceSpider::success.phtml"/>
    </referenceContainer>
</page>


texts: Magento2:Get Cart item last added product after adding product to cart

texts: I am using Magento2 I need get Cart item last added product after adding  product to cart.If anyone idea reply me,How to achieve this my requirement.


texts:
How to change quantity of product in cart using REST API in magento 2?

How can i change quantity of product listed in cart of magento 2 using api call ? (without changing order of items)


texts:
I tried below code to get visitor IP, but it's showing site IP only please tell me how to get visitor IP of the customer,

$objectmanager = \Magento\Framework\App\ObjectManager::getInstance();
$v_ip = $objectmanager->>get('Magento\Framework\HTTP\PhpEnvironment\RemoteAddress');
echo $v_ip->getRemoteAddress();


texts: How to keep the FormKey updated on pages with Varnish enabled?

texts:
I'm running a Magento 2.3.4 store behind a Varnish server.
I can't keep the FormKey up to date in the frontend as the pages are served by the Varnish caches, so I have errors in sending the newsletter and the message from the contact form.

How can I keep the FormKey updated on frontend pages?


texts:
I really don't understand the form_key feature. I have found several sites asking and dealing with issues about the form_key but none explained the reason for it's existence.

Everyone just worked around this "security feature" e.g. this one

Can anybody explain what the form_key is used for?

EDIT:
ok, I get the CSRF Vector for changing user data or anything beyond the cart and even the checkout.
But what could the possible attack on the cart be?!


texts: Magento 1.x - Sales Order Grid join with custom attribute in customer_entity_varchar

texts:
I am trying to add a new column to the sales order grid populated with data from an attribute in the customer_entity_varchar table.
I have created the module and the new column is showing correctly:

<?php
class Sulman_SalesOrderGridExtender_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
{

    protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel($this->_getCollectionClass());
        $select = $collection->getSelect();
        $collection->getSelect()->join(

            array('cev' => 'customer_entity_varchar'), 'cev.entity_id=main_table.customer_id', array('mycustomval' => 'value'))
            ->where('cev.attribute_id=191');

        $this->setCollection($collection);
        //echo $collection->getSelect();die;
        return parent::_prepareCollection();
    }

    protected function _prepareColumns()
    {
        $this->addColumn('mycustomval', array(
            'header'    =>  Mage::helper('customer')->__('mycustomval'),
            'width'     =>  '50px',
            'index'     =>  'mycustomval',
            'type'      =>  'text',
        ));

        // add column after grand_total column
        $this->addColumnsOrder('custom_message', 'mycustomval');

        return parent::_prepareColumns();
    }
}
?>

The issue is that the data is not displaying in the column.

Running the SQL directly shows the records with the value in them correctly.
They are just not displaying in the column...

Any ideas? Thanks!


texts: magento upgrade issue Invalid Form Key. Please refresh the page

texts:
After Upgrade 1.9.3 Unable to admin login getting below Error

Invalid Form Key. Please refresh the page.


texts:
I try to change the icon on my custom menu, and I follow steps on Ibnab post, but doesn't function for me.
I looked on every post in this page , but I don't know if all steps work on my Magento 2.3

  I follow this step, make a module, and inject the custom menu , with CSS file , I see this method worked but don't put the font icon in format SVG

I need help with another steps, or guide for change the icon in my custom menu.


texts: Why is magento 1.9 presenting same products whatever the category when all cache are activated?

texts:
On our site http://printplus.frezalsublimation.fr/ when all caches are activated, when you click  on the category, Magento remembers the page, and subsequent clicks to other categories present the same products?

I need to activate the cache because otherwise the site is slow to display the products. Thank you for your help.


texts: How to move Magento core modules from app/code to vender folder?

texts:
I have upgraded Magento version from 2.2.7 to 2.3.2 without using composer.
I have installed new 2.3.2 from github and moved features from 2.2.7 to 2.3.2.
And now I need commit it to live server.
But in my local server, the core modules are in app/code folder, not in vendor folder.
How to fix this?


texts: Logo is deploy in and present but not shown at front end

texts:
My Logo is present at the pub media folder and also the Image src is correct
but not showing up on the front end.
I have tried cache flush. setup upgrade, static content deploy, di compile, and re-index everything.
Can anyone help?


texts: Magento 2 Passing Php Variable to external js for custom theme

texts:
I have created a custom theme in app/design/frontend/Vendor/Themename

In theme directory I have Themename/requirejs-config.js

var config = {
   deps: [
      "js/custom",
   ]
};

Themename/web/js/custom.js

require([
   'jquery'
], function ($) {

   console.log('adsa');
   console.log(config);
});

I have a phtml file included and I am passing php variable to external js

<script type="text/x-magento-init">
{
    "*": {
        "js/custom": {
            "contacturl": "<?php echo $block->getUrl("contact/index/post"); ?>"
        }
    }
}
</script>

This is the error I am getting Config is not defined.

I am in the developer mode
What I tried

Cleared Cache

Cleared Var Directory


texts:
I have written unit tests for a custom module which i have created.
I have put the test in the Module directory like the core modules.

Now the tricky part is that,dev\tests\functional\tests\app directory also contains the test for the core modules,i also noticed that some of the modules are not included in that directory.
I assumed that they are generated using some command, but i could not find anything that generates them.
So the question is, do we need to write the unit tests twice? or is there any command for generating the tests in the dev\tests\functional\tests\app directory?

If we do not need to include the tests in the said directory, how to run the test for single module?


texts: Terms and condition is not working on checkout page?

texts:
I have enabled terms and condition from admin panel

Steps

Navigate to System => Configuration => Sales => Checkout => Checkout Options
Set ‘Enable Terms and Conditions’ to ‘Yes’

Next

Created terms and condition
Navigate to Sales => Terms and Conditions
Status (required): select ‘Enabled’.
But in front end  T&C not working. it's disabled

Frontend HTML below

<input type="checkbox" class="checkbox" title="terms and condition" value="1" name="agreement[1]" id="agreement-1" disabled="" autocomplete="off">


texts: Magento 2 Stores Store Information unable to change Website

texts: I have multiple stores and websites it seems the ability to change the web site is no longer available somehow. What would cause this option to be grayed out?


texts: How to make http://m.example.com and make theme mobile version in my magento store?

texts: How to make http://m.example.com and make theme mobile version in my magento store ?


texts: Magento 2: Customer logout after minicart showing product

texts:
I have facing issue in Magento ver. 2.2.4 while customer logout then still showing product to the cart.

Actual Result:

Step 1) Login to the customer.

Step 2) Add product to the minicart.

Step 3) Logout the current customer.

Step 4) Still display product in minicart

Expected Result:

After Logout the customer minicart should be empty.


texts:
I downloaded Ves_Brand. I installed the module by copying the app folder to my app folder of magento 2:

and ran bin/magento setup:upgrade; it worked.

But when I search in my magento admin the module is not there:

Is this the way that I should install Ves_Brand? Or am I doing something wrong?


texts: Magento 2 subscription success email not sent

texts:
after I subscribed for newsletter, indeed there is a thank you message alert in front-end as well as new subscriber lists that we can see in back-end. however there is no success email sent to the mail.

I tried several things to do, like :

activate cron job
checking spam
looking into odd thing in this file vendor\magento\module-newsletter\Model\Subscriber.php
even, changing email template (create custom template)

but no luck, still no email after subscribing.

FYI I'm using magento 2.2.9 upgraded from 2.1.7, even in version 2.1.7 the subscription success email is not sending.

may there some possible issue ?


texts: How to override magento-sales/CustomerData/LastOrderedItems.php?

texts:
I have created the following files below but it does not override the default LastOrderedItems.php file

Does anyone know what I have done wrong or should I have done this a different way?

app/code/MySite/ModuleSales/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
     <preference for="Magento\Sales\CustomerData\LastOrderedItems"
                 type="MySite\ModuleSales\CustomerData\LastOrderedItems" />
</config>

app/code/MySite/ModuleSales/etc/module.xml

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

app/code/MySite/ModuleSales/registration.php

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

app/code/MySite/ModuleSales/CustomerData/LastOrderedItems.php

<?php
namespace MySite\ModuleSales\CustomerData;

use Magento\Customer\CustomerData\SectionSourceInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\Exception\NoSuchEntityException;
use Psr\Log\LoggerInterface;

class LastOrderedItems implements SectionSourceInterface
{
    protected function getItems() {
      ...code updates here
    }
}


texts: Magento 1.9 SHOP BY CATEGORY translation not affected how can i translate to french i'm using Porto theme please help me.


texts: How to get all options for all store views for a single attribute?

texts:
I am trying to retrieve all options for all store views for a single attribute e.g. color.

For the attribute color I have created two options blue and white. I have tried the following code that is suppose to return all the options labels for all store views, but only returns the admin option label for me.

$option_arr = array();
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');
foreach ($attribute->getSource()->getAllOptions(false) as $option) {
  $option_arr[$option['value']] = $option['label'];
}
// $option_arr contains Array([4] => Blue, [3] => White)

The following works fine for getting all the attribute color titles for each store view, but does not work for options.

$product = Mage::getModel('catalog/product')->load();
$attribute_title = $product->getResource()->getAttribute('color');
// $attribute_title contains Array([1] => ~~~, [2] =>Color, [3] => Couleur, [4] => Còôlòôr)


texts: One or more of the Cache Types are invalidated: Blocks HTML output. How to fix this issue?

texts:
When I tried to update my site, display following error.

One or more of the Cache Types are invalidated: Blocks HTML output. Click here to go to Cache Management and refresh cache types.

How to fix this issue permanently?


texts:
I have exported my products from the admin panel of the magento, but there is no product url.

Is it possible to export every product url??


texts:
I'm trying to save a simple phtml form with a single input field. Can't figure why clicking on 'Save' Button won't trigger a call to the save.php controller. Path seems ok, but no action is triggered.
Code below:

  Yotpo\Yotpo\Block\Adminhtml\System\index.php:

namespace Yotpo\Yotpo\Block\Adminhtml\System;

class Index extends \Magento\Backend\Block\Widget\Form\Container {

protected $_blockGroup = 'Yotpo_Yotpo';

public function __construct(
    \Magento\Backend\Block\Widget\Context $context,
    \Magento\Framework\Registry $registry,
    \Yotpo\Yotpo\Block\Config $config,
    array $data = []
) {
     $this->_config = $config;
    parent::__construct($context, $data);
}

protected function _construct()
{
   $this->_blockGroup = 'Yotpo_Yotpo';
    $this->_controller = 'adminhtml_Settings_index';
    parent::_construct();
}

 protected function _prepareLayout()
{
    $this->getToolbar()->addChild(
        'save_button',
        'Magento\Backend\Block\Widget\Button',
        [
            'id' => 'save',
            'label' => __('Save Configuration'),
            'class' => 'save primary',
            'data_attribute' => [
                'mage-init' => [
                'button' => ['event' => 'save', 'target' => '#yotpo-form'],
                ]

            ]
        ]
    );
}

public function getFormActionUrl()
   {

    return $this->getUrl('adminhtml/settings/save');
   }

}

  Yotpo\Yotpo\Controller\Adminhtml\Settings\save.php:

namespace Yotpo\Yotpo\Controller\Adminhtml\System;

class SaveRates extends \Magento\Backend\App\Action
{
    public function __construct(
        \Magento\Backend\Block\Widget\Context $context,
        \Yotpo\Yotpo\Block\Config $config,
        array $data = []
    ) {
        $this->_config = $config;
        parent::__construct($context, $data);
    }

    public function execute()
    {
        $this->_redirect('adminhtml/*/');
    }
}

  Yotpo\Yotpo\View\Adminhtml\Layout\adminhtml_settings_index.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <update handle="formkey" />
    <body>
        <referenceContainer name="content">
            <block class="Yotpo\Yotpo\Block\Adminhtml\System\index" name="yotpo.settings" template="grid.phtml"/>
        </referenceContainer>
    </body>
</page>

  Yotpo\Yotpo\View\Adminhtml\Templates\grid.phtml:

?>
<?php
/**
 *  @var $block \Yotpo\Yoypo\Block\Adminhtml\System\index
 */
?>
<form id="yotpo-form" action="<?php echo $block->getFormActionUrl() ?>" method="post">
    <?php echo $block->getBlockHtml('formkey')?>
    <input type="hidden" name="form_key" value="<?php echo $this->getFormKey(); ?>" />
    <input id="app_key" type="text" value="<?php echo $block->_config->getAppKey();?>" class="
</form>

clicking on 'Save Configuration' button suppose to trigger the save action.
if I add a simple html submit button - this button triggers the desired save action:

<input type="submit" value="submit">

How can I make the Magento save button to work?

Would appreciate your help!


texts:
Trying to login magento admin panel and it returns 404 error.

Here's what I did so far.

Did a check on /public_html/app/etc/local.xml

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

Cleared var/session and var/cache.
Access with and without index.php
I ran the following SQL code.

SET FOREIGN_KEY_CHECKS=0; UPDATE core_store SET store_id = 0 WHERE code=’admin’;
UPDATE core_store_group SET group_id = 0 WHERE name=’Default’;
UPDATE core_website SET website_id = 0 WHERE code=’admin’;
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code=’NOT LOGGED IN’;
SET FOREIGN_KEY_CHECKS=1;

SQL returns the following error code.

  #1054 - Unknown column 'â€™adminâ€™' in 'where clause'

Ran with the following SQL Code again due to suspected punctuation marks

SET FOREIGN_KEY_CHECKS=0; UPDATE core_store SET store_id = 0 WHERE code='admin';
UPDATE core_store_group SET group_id = 0 WHERE name='Default';
UPDATE core_website SET website_id = 0 WHERE code='admin';
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

Results:

  # MySQL returned an empty result set (i.e. zero rows).


texts: Magento running on Percona Server with XtraDB

texts:
Does anyone have any experience with

Magento db running on Percona Server with XtraDB?

Benchmarking, stres testing, numbers... anything


texts: How to only show products from a specific category?

texts:
Ì created a grouped product and some simple products associated with it on my fresh installed Magento project. Then I created a new category "kleber_category" and associated the grouped product to it.

Then I created a new site "kleber" and a link to it on the homepage.

How can I display all grouped products from the category "kleber_category" on the page "kleber"?

What I've tried:

Find out the id of the category (3)
Add the following line to the content section of the page "kleber":

  {{block type="catalog/product_list" category_id="3"
  template="catalog/product/list.phtml"}}

Result:

The page "kleber" in the frontend shows:

"There are no products matching the selection."

UPDATE

I changed the quantity settings from the grouped object to this, but it made no difference:

Enable Qty Increments: Yes

Stock availability: In Stock


texts: Migrate Static Blocks and multi stores from One Magento to Another

texts:
What is the best way to migrate Magento Content i.e Blocks, Pages, and All content from one Magento instance to another. I have 2 Magento setups. One of which has all data and another is fresh Magento. Both have same Magento version. I do not want to migrate the complete DB as I have many junk orders/customers/products etc.. All I want to migrate is the stores, Content blocks, pages, and basically all content related data.

What is the best way to achieve this?


texts: How to add 'Company Name' in customer register and billing info

texts:
I've been trying to add 'company name' on customer register and onepage checkout but unsuccessfully so far. I tried Add Company Name to Billing/Shipping Dropdown in Magento  but it didn't help at all.

I can't believe there isn't a simple way of doing that.

Any suggestions will be greatly appreciated


texts:
I need to alter the display of products in catalog/product/list.phtml based on whether they have a Custom Design assigned, in Magento 1.8.

I've edited custom_design in Catalog > Attributes > Manage Attributes and set "Use in Product Listing" to "Yes", reindexed, cleared cache.

But when I use:

// in catalog/product/list.phtml

$_productCollection = $this->getLoadedProductCollection();

foreach ($_productCollection as $_product) {
  echo $_product->getCustomDesign();
  //or
  echo $_product->getData('custom_design');
}

I get no output for that attribute.

I've also tried:

// in catalog/product/list.phtml

$_productCollection = $this->getLoadedProductCollection();

$_productCollection->addAttributeToSelect('custom_design')->load();

foreach ($_productCollection as $_product) {
  echo $_product->getCustomDesign();
  //or
  echo $_product->getData('custom_design');
}

But still nothing.

If I use $_product->getCustomDesign(); in catalog/product/view.phtml, I get the output I expect, so I know it's the right attribute & the product has the value.

Anybody know if I'm missing anything? I've gone through the blocks/model stack and made sure that custom_design is being added to the list of attributes to load, as I'd expect, but if I var_dump($_product->getData()), it doesn't appear.

Thanks!


texts: book printing service ecommerce frontend

texts:
I wish to implement a book printing service e-commerce frontend; how can I configure the catalog?

End user product price depends on:

number of pages per volume
extra attributed per page (quantity of print colors, paper type, ...)
number of copies requested
extra attributes per volume (binding, cover type, ...)

So price is something like #pages * base page price + #pages * page_extra_options_cost + #copies * base volume price + #copies * extra attributes cost


texts: Magento 2 : Redirect From Homepage to Login if not Logged

texts:
I would like to redirect customer from homepage to login page, if they are not logged in.

I have a module however this just shows a blank homepage instead of redirecting.

Repo: https://github.com/BHWD/homeredirect

registration.php

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

etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="iuk_homeredirect" setup_version="1.0.0">
    </module>
</config>

etc/di.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Cms\Controller\Index\Index" type="iuk\homeredirect\Controler\Index\Redirecthome" />
</config>

Controler/Index/Redirecthome.php

<?php
namespace iuk\homeredirect\Controller\Index;
class Redirecthome extends \Magento\Framework\App\Action\Action
{
    protected $resultForwardFactory;
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory
    ) {
        $this->resultForwardFactory = $resultForwardFactory;
        parent::__construct($context);
    }
    public function execute($coreRoute = null)
    {
       $this->_redirect('customer/account/login');
                return;
    }
}


texts: Installation failed, reverting ./composer.json to its original content Magento 2

texts:
when i try to run require extention-name it gives me following error, i tried many possibilities but it not worked. any advice highly appriciated
i'm using cpanel, centOS 6. and trying to install extention on magento 2.1

[muzikhausberlin@vps707732 public_html]$ composer require stripe/stripe-payments
Using version ^1.1 for stripe/stripe-payments
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - zendframework/zend-soap 2.7.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
    - zendframework/zend-soap 2.7.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
    - zendframework/zend-soap 2.7.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
    - Installation request for zendframework/zend-soap (locked at 2.7.0) -> satisfiable by zendframework/zend-soap[2.7.0].

  To enable extensions, verify that they are enabled in your .ini files:
    - /opt/cpanel/ea-php71/root/etc/php.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-bcmath.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-calendar.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-ctype.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-curl.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-dom.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-ftp.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-gd.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-iconv.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-imap.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-intl.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-json.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-mbstring.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-mcrypt.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-mysqlnd.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-pdo.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-phar.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-posix.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-simplexml.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-sockets.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-sqlite3.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-tokenizer.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-xml.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-xmlwriter.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-xsl.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/20-zip.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/30-mysqli.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/30-pdo_mysql.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/30-pdo_sqlite.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/30-wddx.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/30-xmlreader.ini
    - /opt/cpanel/ea-php71/root/etc/php.d/zzzzzzz-pecl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

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


texts: How to deploy Static Content in Windows 7 for Magento 2.1.6

texts: How can we deploy static content in Magento 2.1.6 in windows by command line.


texts:
Currently we commit composer.lock to the repository and then run composer install --no-dev on the production server. I don't think this is the best way to do it because it takes a few minutes for composer to generate all the files and it is risky.

I wonder if it is better to commit to the repo all files needed for running in production mode.

How do others manage the deployment process with magento 2?


texts: I am using this module https://github.com/payu-india/PayUbiz_Magento/tree/ver2.x It's working fine in Magento 2.2 but not working in Magento 2.3 the response URL getting 301 redirections instead of success Url


texts: How to add custom font as Magento base font

texts:
i am new in magento and i want to change my magento base font.

i found this code:

@font-face {   font-family: 'MyWebFont';   src: url('BYekan.eot'); /* IE9 Compat Modes */   src: url('BYekan.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('BYekan.woff') format('woff'), /* Modern Browsers */
       url('BYekan.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('BYekan.svg#svgFontName') format('svg'); /* Legacy iOS */ }

and i have this font files:

BYekan.woff
BYekan.eot
BYekan.ttf

where should i copy that code? and where should i upload font files?