texts: Magento 2.3.4 - redirect url to specific store view

texts:
As the title says we would like to redirect a url to a specific store view

What we have now:

magento1.com
    - store view EN
magento2.com
    - store view DE

What we would like to have

magento1.com
    - store view EN (default) - store view DE
magento2.com -> redirect to store view DE on magento1.com

This is what we have now in our vhost (nginx) *of relevance to this

map $http_host $MAGE_RUN_CODE {
    default '';
    magento2.com DE;

    return 301 https://$server_name$request_uri;

    set $MAGE_RUN_TYPE store;


texts: Other than Magento Connect, does anything else create maintenance.flag?

texts:
A site I have been involved with has twice in the last couple of weeks gone into maintenance mode due to the presence of the maintenance.flag file.

Neither time has anybody been installing / upgrading anything through Magento Connect which is the usual culprit for this, so was wondering if there are other parts of Magento that set this flag for any reason?

Any suggestions much appreciated.


texts:
Does anyone know if there is a free Magento Foundation 5 blank theme?

I am using Foundation 5 with a project and I can't seem to use Foundation's javascript plugins.

Thanks


texts: "Update Shopping Cart" button redirects to homepage when admin setting "Product Redirect to Shopping Cart" is set to No

texts:
Magento 2.3.5 Under Nginx
Update Shopping Cart button redirects to homepage when pressed. The quantity is updated but the customer is forced to go to the homepage instead of staying in the shopping cart.
In Store>Configuration>Sales>Checkout>Shopping Cart, there is a setting called After Adding a Product Redirect to Shopping Cart. When this is set to No, I get this problem of being redirected to the homepage when updating the cart.
When this setting is changed to Yes, the problem goes away. Update Shopping Cart works normally and the user can update the shopping cart and stays in the cart.
Anyone have some ideas for how to debug this issue?


texts:
I am extremely new to Mangento

I have created widget in Newsletter .
I can able to insert widget in Newsletter .
It inserts some code in

{{widget type="catalog/product_widget_new" display_type="new_products" products_count="10" template="catalog/product/widget/new/content/new_list.phtml"}}

if I preview this, it shows same code. I am not getting any real out put why.


texts:
From the info template in the wishlist I have added the following code

Mage::unregister('product');
Mage::register('product', $item->getProduct());
echo $item->getProduct()->getName();
$checkoutLinksBlock = $this->getLayout()->getBlockSingleton('catalog/product_view_type_configurable')->setTemplate('catalog/product/view/type/options/configurable.phtml');
$checkoutLinksBlock->setParentBlock($linksBlock);
echo $checkoutLinksBlock->renderView();

This calls the configurable.phtml file which allows you to select options on the product page. The call is rendered once per product in the wishlist so that each product row has the markup from configurable.phtml relating to that product.

My issue is that the Mage::register('product', $item->getProduct()) seems to only work once and instead of different product options being sent to the configurable.phtml template it only ever uses the first product that i register. $item->getProduct() definitely changes because each row in the wishlist has a the correct product but instead of showing it's own configurable options it applies the configurable options of the first product in the wishlist to each row.

I have tested by outputing $item->getProduct() inside the wishlist template and confirming that it is correct. This seems to me like an issue updating Mage::register more than once during a page load.

Any ideas?


texts: magento 2 rest api : get cart items with images

texts:
In rest api, I am using "/rest/V1/guest-carts/e3e1fd447e0e315dd761942cf949ce5d/items" method to get the magento cart items. It works well and the result is

  [
    {
      "item_id": 100,
      "sku": "abc-1",
      "qty": 1,
      "name": "Product one",
      "price": 19,
      "product_type": "simple",
      "quote_id": "e3e1fd447e0e315dd761942cf949ce5d"
    },
    {
      "item_id": 101,
      "sku": "abc-2",
      "qty": 1,
      "name": "Product two",
      "price": 54,
      "product_type": "simple",
      "quote_id": "e3e1fd447e0e315dd761942cf949ce5d"
    }
]

Now I want get the images of each products in the list(Possibily a thumbnail image). Is there any way to achieve this  result?


texts: how to install magento 2.3.1 page builder extension

texts:
There is a core magento page builder extension in magento 2.3.1 how to install this extension ?
In my installation there is no such extension.I updated magento  2.2 to magento 2.3.1 maybe it is missing.


texts:
I followed every step from this website : http://alanstorm.com/magento_config and I'm stuck with the observer.

I think smth is wrong with my Observer.php. I get this error :

a:5:{i:0;s:157:"Cannot send headers; headers already sent in /mnt/futurehome/netlogiq/public_html/attin/magento/app/code/local/Attila/Configviewer/Model/Observer.php, line 1";i:1;s:1142:"#0 /mnt/futurehome/netlogiq/public_html/attin/magento/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true).....

I post this image :

Also I comment the code from observer I did not get this error. Can someone help me with this ?

=> config.xml :

<config>
    <modules>...</modules>
    <global>
        <events>
            <controller_front_init_routers>
                <observers>
                    <attila_configviewer_model_observer>
                        <type>singleton</type>
                        <class>Attila_Configviewer_Model_Observer</class>
                        <method>checkForConfigRequest</method>
                    </attila_configviewer_model_observer>
                </observers>
            </controller_front_init_routers>
        </events>
    </global>
</config>

=> Observer.php :

 <?php
    class Attila_Configviewer_Model_Observer {
        const FLAG_SHOW_CONFIG = 'showConfig';
        const FLAG_SHOW_CONFIG_FORMAT = 'showConfigFormat';

        private $request;

        public function checkForConfigRequest($observer) {
            $this->request = $observer->getEvent()->getData('front')->getRequest();
            if($this->request->{self::FLAG_SHOW_CONFIG} === 'true'){
                $this->setHeader();
                $this->outputConfig();
            }
        }

        private function setHeader() {
            $format = isset($this->request->{self::FLAG_SHOW_CONFIG_FORMAT}) ?
            $this->request->{self::FLAG_SHOW_CONFIG_FORMAT} : 'xml';
            switch($format){
                case 'text':
                    header("Content-Type: text/plain");
                    break;
                default:
                    header("Content-Type: text/xml");
            }
        }

        private function outputConfig() {
            die(Mage::app()->getConfig()->getNode()->asXML());
        }
    }
?>


texts:
I'm trying to extend Magento 2 api, I found this (https://github.com/magento-south/magento2-samples/tree/MAGETWO-55017/sample-external-links) but its not working..

After some fixes I got an error which I can't resolve on this line..

$metadata = $this->metadataPool->getMetadata(ExternalLinkInterface::class)

the message is

  "Unknown entity type: Seteskin\ExternalLinks\Api\Data\ExternalLinkInterface requested"

and my ExternalLinkInterface::class is 'Seteskin\ExternalLinks\Api\Data\ExternalLinkInterface'

Any help would be appreciated. Thanks.


texts:
i am getting server error in magento 1.7
PHP Fatal error: Call to a member function validate() on boolean in app/code/core/Mage/Paypal/Model/Standard.php on line 137
How to solve this error.


texts: In layered navigation can I modify the collection before the filters are applied?

texts:
The duplicate post does not touch on the same topic as I am. Though I did try the solution and was able to modify the collection I ended up with the same results as explained below.

Using the configuration below, I am able to modify my collection, but it only applies to the results on the current pagination page. So, if I am on page one and I have a product starting with the letter A and modify the collection with ->addAttributeToFilter("name",["like"=>"a%"]) I see only the products that start with the letter a for the current page. If I am on page one and modify the collection with ->addAttributeToFilter("name",["like"=>"m%"]) I do not see products beginning with the letter M, I get Magento's "no products found" message. If I go to the pagination page that contains products with the letter M and use ->addAttributeToFilter("name",["like"=>"m%"]) I see only products starting with M that were on the current page.

How do I filter by letter prior to pagination and any other filters being applied?

config.xml

        <catalog_product_collection_apply_limitations_after>
            <observers>
                <etre_alphapagination>
                    <type>model</type>
                    <class>etre_alphapagination/observer</class>
                    <method>applyFilter</method>
                </etre_alphapagination>
            </observers>
        </catalog_product_collection_apply_limitations_after>

Observer.php

public function applyFilter($observer)
{

    if ($alphaFilter = Mage::getModel('etre_alphapagination/parametersactions')->currentAlphaFilter()) {
        $event = $observer->getEvent();
        $collection = Mage::getModel('etre_alphapagination/parametersactions')->applyFilter($event->getCollection(), $alphaFilter, "name");
        return $this;
    }
}

Mage::getModel('etre_alphapagination/parametersactions')->applyFilter($event->getCollection(), $alphaFilter, "name") refers to:

public function applyFilter($collection, $query = "", $attribute = 'name') //let's provide the option to filter the collection by whichever attribute desired
{
    try {
        $collection->addAttributeToFilter('name', array('like' => $query . '%'));
    } catch (Exception $e) {
        Mage::logException($e);
    }
    return $collection;
}

Update

So, this is fully functional (Module GIT) on a fresh install on Magento CE 1.9. I've disabled all non-core modules on my Magento instance and am still seeing the same results as described above.


texts: How to remove product picture from checkout page in opc-block-summary block


texts: How to create a SaveAndContinue button on UI Component form?

texts:
I'm new at magento 2 and I'm trying to create a "SaveAndContinue" button.
I created the classes, but when i click the SaveAndContinue button on the form, it calls the "save" controller and not the "save and continue" controller. What could it be?
form.xml
            <button name="save_and_continue" class="Hub\Api\Block\Adminhtml\Data\Edit\Buttons\SaveAndContinue" />

SaveAndContinue button:
class SaveAndContinue extends Generic implements ButtonProviderInterface

{
/**
 * Get buttong attributes
 *
 * @return array
 */
public function getButtonData()
{
    return [
        'label' => __('Save and Continue Edit'),
        'class' => 'save',
        'data_attribute' => [
            'mage-init' => [
                'button' => ['event' => 'saveAndContinueEdit'],
            ],
        ],
        'sort_order' => 80,
    ];
}

}


texts:
Preconditions

Magento 2.1.5
PHP 7.0.16
MySQL 5.7.16

Steps to reproduce

Extension installed via composer

$ php bin/magento module:uninstall Mageplaza_Seo -c -> Fail by authentication

$ ln -s /home/user/.composer/auth.json var/composer_home

$ php bin/magento module:uninstall Mageplaza_Seo -c

Successful

Expected result

Uninstall extension

Actual result

1. Broken site report
a:4:{i:0;s:217:"Cannot read contents from file "/var/www/html/vendor/mageplaza/magento-2-seo-extension/etc/module.xml" Warning!file_get_contents(/var/www/html/vendor/mageplaza/magento-2-seo-extension/etc/module.xml): failed to open stream: No such file or directory";i:1;s:4849:"#0 /var/www/html/vendor/magento/framework/Module/ModuleList/Loader.php(120): Magento\Framework\Filesystem\Driver\File->fileGetContents('/var/www/html/v...')
....

I remove references in eav table, try and nothing, I had to install it again


texts: Multiselect categories in layered navigation

texts:
One of catalogs consists of 3 levels of which the fourth is a differentiation in brands. Consider the following example as level 2 and 3

Hatchbacks

Volkswagen
Volvo
Seat
Audi

Basically we want to show all products when a customer is browsing the hatchbacks. We made the Hatchbacks category an achor thus giving the client filtering options. This means that the underlying (3rd level) categories can be filtered as well. However only one category can be selected at a time. It is not possible to extend this with the Manadev extension. Since these brands are loaded from an ERP system every night it is not possible to use a dropdown attribute for brands as this might change at each update.

It there a possibility to adjust this?


texts: Fatal error: Call to a member function setData() Observer.php on line 8

texts:
I am new to Magento so any help would be appreciated.
Whenever I click Catalog > Manage Products I get the error:

  Fatal error: Call to a member function setData() on a non-object in
  /home/designac/public_html/app/code/local/Dac/MultiSku/Model/Observer.php
  on line 8

The code on line 8 in Observer.php is:

   $block->getColumn('sku')->setData('filter_condition_callback', array(

Any ideas?


texts:
I've installed a clean Magento 2.3. After trying the multi stock options, i noticed that, under Manage Source page, i can create a new source but not delete it. It looks like the action dropdown is missing on this page (Magento bug?). Anyone an idea how to fix this? I need the test one removed.

Menu path: Stores > Inventory > Sources


texts: Scripts not appearing in cc.phtml or ccsaved.phtml

texts: I have been trying for days to get the credit forms (anyone of them!) to auto detect credit card type. I found some scripts that work fine until i try to add them to the credit card templates. Then the scripts disappear or don't show up in the template. The css and anything else I add to the templates show up in the source or if I look at the in Chrome "Inspect" but not any scripts.So I tried adding them to parts of the page above and below the credit card templates but can't get that to work either. How can I get the scripts to show up in the templates and why don't they appear there? Is it a built in security feature?


texts: buy a product from X category and buy a product from Y category and get 15% off on total price of two products , How to setup this?

texts:
buy a product from X category and buy a product from Y category and get 15% off on the total price of two products, How to set up this?

15% should apply only to the total price of two products, not on the entire cart.

Please guide.


texts: Magento 2.3: Order Create Programatically Script Allowed memory exhausted

texts:
I am working on creating orders dynamically using custom magento script , got reference from How to create order programmatically in Magento 2?

now when I run script, after making 10-15 orders, first script goes slow and later on , it shows below error

Allowed memory exhausted

I tried to make script in a manner so that I can release the assigned variable as soon as they finish there task, even still I am unable to understand, what exactly allocating that much memory , that it exhausted.

I can't extend memory_limit , so please do not suggest me to do so.
I have to run script in a limited given memory instance.

please help anybody.

thanks in advance


texts: Around plugin for prepareTemplate method in Magento\Sales\Model\Order\Email\Sender abstract class?

texts:
In Magento I can't override abstract class so I tried to use the around plugin.
How can I do it for prepareTemplate method in Magento\Sales\Model\Order\Email\Sender abstract class? Right now I did some thing like this:
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">
    <type name="Magento\Sales\Model\Order\Email\Sender">
        <plugin name="sale_order_sender_custom_email"
                type="Vendor\Module\Plugin\Magento\Sales\Model\Order\Email\SenderPlugin"
                sortOrder="1"/>
    </type>
</config>

SenderPlugin.php

<?php

namespace Vendor\Module\Plugin\Magento\Sales\Model\Order\Email;

use Closure;
use Magento\Sales\Model\Order;
use Magento\Sales\Model\Order\Email\Sender;
use Magento\Sales\Model\Order\Email\Container\IdentityInterface;
use Magento\Sales\Model\Order\Email\Container\Template;

class SenderPlugin
{

    public $templateContainer;
    public $identityContainer;

    public function __construct(
        Template $templateContainer,
        IdentityInterface $identityContainer
    )
    {
        $this->templateContainer = $templateContainer;
        $this->identityContainer = $identityContainer;
    }

    public function aroundPrepareTemplate(Sender $subject, Closure $proceed, Order $order)
    {
        $this->templateContainer->setTemplateOptions($this->getTemplateOptions());

        if ($order->getCustomerIsGuest()) {
            $templateId = $this->identityContainer->getGuestTemplateId();
            $customerName = $order->getBillingAddress()->getName();
        } else {
            $templateId = $this->identityContainer->getTemplateId();
            $customerName = $order->getCustomerName();
        }

        $this->identityContainer->setCustomerName($customerName);
        $this->identityContainer->setCustomerEmail($order->getCustomerEmail());
        $this->templateContainer->setTemplateId('custom_email_template');
    }

}


texts: Magento2: creating custom search REST API

texts:
I have created many Api's (both GET and POST) but now I want to create the custom search API with different URL Structure (all the params after ?).

I can create the search API in below URL formate..

/V1/getSearch/vendor/:vendArea/type/:typeId

but I want to achieve the same with below given formate..

/V1/getSearch/?vendor=bangalore&type=2

Any body have idea to get this formate ?


texts:
Today I have installed Magento via the DirectAdmin installer.
The home page is working fine.

When I login as admin I get this error:

  Warning: is_dir(): open_basedir restriction in effect.
  File(/etc/pki/tls/certs) is not within the allowed path(s):
  (/home/minergea/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php56/lib/php/)
  in
  /home/minergea/domains/minergear.eu/public_html/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php
  on line 914

How can I fix this?

I can't seem to figure it out.


texts:
Is there any interactive gaming (extensions) which will discount the price as per the points taken by the customer?

Ex. A spinning wheel with values.


texts:
Lets say I want to get ajax response containing everything that is inside #maincontent selector on catalog/product/view/id/1 page.

The problem is that many JS (that works on product view page) doesn't work when I append ajax response html to my custom page (lets say my custom page is some category view page).

I noticed that scripts (from ajax response html) inside  doesnt work. like product gallery. How to make the scripts work? I noticed that after I add a product (using add to cart button from the response) the JS in  start to work - gallery becomes visible, related products show up, tabs working etc.


texts: Add page specific CSS to 1 single page in Magento 2.2.2?

texts:
I have 1 specific page in Magento 2.2.2, that I'd like CSS on. In my _extend.less file, if I include the CSS there, it'll effect other pages that have the same classes. I don't want that to happen.

Thank you.


texts: How to add custom field in registration form and add jquery validation in Magento2.2.5?

texts:
How to add custom field in registration form and save in database and add jquery validation in Magento2.2.5?

Any help would be appreciated


texts: Magento 2 Changing Canonical URL of Product page

texts:
I have a configurable product consisting of simple product. The URL is something like

  http://www.domain.com/catalog/product/view/id/92196/s/my-simple-product/

I want to change this to have the canonical URL as http://www.domain.com/my-configurable-product.html

How do I change the URL of the Magento2 page? I have the following in my observer which is fired from the view_block_abstract_to_html_before event:

class ModifyCanonicalUrl implements \Magento\Framework\Event\ObserverInterface {
    private $_logger;

    public function __construct(\Psr\Log\LoggerInterface $logger) {
        // Observer initialization code...
        // You can use dependency injection to get any class this observer may need.
        $this->_logger = $logger;
    }

    public function execute(\Magento\Framework\Event\Observer $observer) {
        // Observer execution code...
        $block = $observer->getBlock();
        $this->_logger->addDebug("URL = " . $block->getUrl());
        // Check if this is for a Product Page
        // Any other additional checks?
        // Find current product id
        // Check if it is a simple product
        // Replace the canonical URL with the configurable product url.
    }
}

What is the equivalent code for the above lines in comments?


texts:
Is there a way to disable an admin route, well actually any route. The use case is I have an extension that comes with a frontend section and an admin section but I do not want the admin section to be used. I have disabled the admin menu items but I would like to disable the route as well so that if there are any other links or someone has it bookmarked they get a 404 or redirected to the dashboard.

I know I could setup different roles and disable for some roles but I want it to be a complete removal.


texts: Magento 2: Year wise Product Display Layout Change on Category Page

texts:
I have attribute as Year for Product. Would like to display product's on basis of Year.

I already created Year Attribute  & assign it for Sorting as well.

Attached image for reference.

How to achieve this? When it clicks on Year or View More it will display all products relates to that Year

Issue here is Layout for Only Year i need below kind of layout or result.
Per row year wise only 4 products with View More Button. Year Link also. Both links to Another Listing where it displays all Product Listing with paging of that particular Year.

If for year we don't have data, then it skips that year.

So it's Horizontal kind of Sorting for Year ONLY. Apart for "Name" it wil be Vertical as Magento Default.

Thanks


texts: Clean way to add media gallery images to product collection

texts:
I have to display small images of products loaded by collection. Problem is (I think it is), that products (coming from collection) by default doesn't containt any images within. I have tried addAttributeToSelect(), but it seems to be more complex. Another possible solution is quering for image, inside loop for every product separately, but it seems to be impacting performance. I haven't found any predefined method to add media gallery to product collection. Has someone played with that?

EDIT: product->load('media_gallery') does work but I am not sure about it.. Is it impacting performance and is it clean way to achieve it?


texts: Magento site invoking install script sometimes

texts: I'm facing a strange issue in magento.Some times my site is working fine and some times it is asking for installation.What could be the reason for this kind of issue?Please help me out guys.Thanks.


texts: Limit Quantity For the Products With Specific Attribute Magento2

texts:
Trying to Limit all the products with having a specific attribute (Yes/No) and others will behave normal.

I have used the event in my module my event.xml

 <event name="checkout_cart_product_add_before">
    <observer name="quantitylimiter" instance="Apriljune\Qtylimiter\Observer\CartSaveAfter" />
 </event>

My Observer File having the following code:

<?php

namespace Apriljune\Qtylimiter\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;

use Magento\Checkout\Model\Session;

class CartSaveAfter implements ObserverInterface
{

    protected $_productloader;

    protected $_limitConfig = array(
        'Ja' => 3
    );

    public function __construct(
        Session $session,
        \Magento\Catalog\Model\ProductFactory $_productloader
    )
    {
        $this->_session = $session;
        $this->_productloader = $_productloader;
    }

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

        $items = $this->_session->getQuote()->getAllVisibleItems();
        $currentQty = array();

        foreach ($items as $item) {
            $product = $this->_productloader->create()->load($item->getProductId());
            $limitData = $product->getFreeProduct();

            if ( $limitData !=1 ) continue;
            $value = $product->getAttributeText('free_product');

            if (!isset($currentQty[$value])) {
                $currentQty[$value] = 1;
            }
            $currentQty[$value] += $item->getQty();

            $maxQty = 3;
            if ($currentQty[$value] > $maxQty) {
                throw new \Magento\Framework\Exception\LocalizedException( __( 'Max items allowed for 3 For Sample in Single Order.' ) );
            }
        }

        return $this;
    }

    public function getLoadProduct($id)
    {
        return $this->_productloader->create()->load($id);
    }
}

And module.xml is as follows:

<?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="Apriljune_Qtylimiter" setup_version="1.0.0">
    <sequence>
        <module name="Magento_Checkout"/>
        <module name="Magento_Catalog"/>
    </sequence>
</module>

The issue is it is working fine for all the products with with 'free_product' attribute in the cart, but when i add further the normal product without attribute it still not let it add to the cart as it don't have the special attribute.


texts:
When I add new product to cart. It is adding that products to cart but mini cart doesn't shows anything.
and my console has following error.

TypeError: this.itemRenderer is undefined

can anyone tell what is because of this.


texts:
One customer asked me, if it's possible to add a customer in more than one customer group. He wants to give his customers a discount which is manufacturer based.

Example:
Customer 1 get a discount of 5% for manufacturer A and a discount of 10% for manufacturer B.
Customer 2 gets a discount of 10% for manufacturer A and a discount of 15% for manufacturer B.

The idea was to solve this with several customer groups. Or are there better solutions?


texts: Magento2.4.2: One or more of your dotdigital importer tasks have errors: Orders. Please go to the Import Report to review

texts:
What does the message below speak about, that I see on logging to Magento admin.
One or more of your dotdigital importer tasks have errors: Orders. Please go to the Import Report to review. Below is what is shown in the Import Report window.


texts: Filename of class Varien_Data_Collection_Filesystem getting renamed to Filesystem.php.suspected

texts:
We're getting the following error:

  Magento Fatal error: Class' Varien_Data_Collection_Filesystem' not found

Checking the cause of the error, the Filesystem.php file is is renamed to Filesystem.php.suspected. Manually renaming it back to Filesystem.php fixes the issue but everyday we need to manually rename it since it is constantly being renamed back to Filesystem.php.suspected.

I've googled as to what causes the error but still no luck. I am quite sure that there is something that is renaming this file but don't know where to start since i'm fairly new to magento.

Magento ver. 1.9.1.1


texts: Magento 2 message: "The authenticity of the gateway response could not be verified." Error Authorize.net

texts:
I am facing below error while doing payment by Authorize.net Sandbox Account

  "The authenticity of the gateway response could not be verified."

I tried to resolve this by creating new Transaction Key and Signature Key but nothing happened.

While Checkout Order is not placed and gives above error but in Authorize.net they show Unsettled Transaction, check below:

Payment log gives success message

    [2019-07-08 10:03:59] main.DEBUG: array (
  'request' =>
  array (
    'payload_type' => 'createTransactionRequest',
    'merchantAuthentication' =>
    array (
      'name' => '8s92nHBP64',
      'transactionKey' => '438Fea4rnT835S33',
    ),
    'transactionRequest' =>
    array (
      'transactionType' => 'authOnlyTransaction',
      'amount' => '500.50',
      'payment' =>
      array (
        'opaqueData' =>
        array (
          'dataDescriptor' => 'COMMON.ACCEPT.INAPP.PAYMENT',
          'dataValue' => 'eyJjb2RlIjoiNTBfMl8wNjAwMDUyRTg2NjI4RTM1REJERTlBRkVGRTA2MjY4MTg3RkQ1RkRFMUE0NzRCODBCMTk3N0MwOTIyM0E1NTExN0NFNTdDRTY2NDgyNUQ4RjAyQ0VFQjJBM0MwMEUwMTdFMTkyRTZFIiwidG9rZW4iOiI5NTYyNTgwMjM1NjM1OTM3NDAzNTAxIiwidiI6IjEuMSJ9',
        ),
      ),
      'solution' =>
      array (
        'id' => 'AAA102993',
      ),
      'order' =>
      array (
        'invoiceNumber' => '000000017',
      ),
      'poNumber' => NULL,
      'customer' =>
      array (
        'id' => NULL,
        'email' => 'himani.magneto@gmail.com',
      ),
      'billTo' =>
      array (
        'firstName' => 'bewdfjb',
        'lastName' => 'bb',
        'company' => 'nbn',
        'address' => '86 Jones Common, Greenview, FK8 1LD',
        'city' => 'Indianapolis',
        'state' => 'Greenview',
        'zip' => 'FK8 1LD',
        'country' => 'GB',
      ),
      'shipTo' =>
      array (
        'firstName' => 'bewdfjb',
        'lastName' => 'bb',
        'company' => 'nbn',
        'address' => '86 Jones Common, Greenview, FK8 1LD',
        'city' => 'Indianapolis',
        'state' => 'Greenview',
        'zip' => 'FK8 1LD',
        'country' => 'GB',
      ),
      'customerIP' => '27.109.19.234',
      'userFields' =>
      array (
        'userField' =>
        array (
          0 =>
          array (
            'name' => 'transactionType',
            'value' => 'authOnlyTransaction',
          ),
        ),
      ),
    ),
  ),
  'response' => '{"transactionResponse":{"responseCode":"1","authCode":"R8Y1BD","avsResultCode":"Y","cvvResultCode":"P","cavvResultCode":"2","transId":"40034332102","refTransID":"","transHash":"","testRequest":"0","accountNumber":"XXXX4444","accountType":"MasterCard","messages":[{"code":"1","description":"This transaction has been approved."}],"userFields":[{"name":"transactionType","value":"authOnlyTransaction"}],"transHashSha2":"80F1E27E02A4F3AD91851A4828EDE9CDF6728A5493556AE3228A8D57245D85693D987738705E273E883A2C2A80ED73230CE4B7C399006BC3929239AD845DC65B","SupplementalDataQualificationIndicator":0},"messages":{"resultCode":"Ok","message":[{"code":"I00001","text":"Successful."}]}}',
) [] []

Please help me!


texts: Add Estes Tracking Carrier for My Magento Site

texts: How to implement the Estes Courier in my Magento site as new carrier?


texts:
I try to get the last visited page, for example I want to know if the last visited page was Checkout, if the Checkout page was last visited page then redirect customer after registration or login to the checkout page, else redirect to the my account.

this is my code:

   public function customerLogin(Varien_Event_Observer $observer)
   {
       if(Mage::getSingleton('core/session')->getIsFromCart() == 1){
            Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('checkout/onepage'));
            Mage::app()->getResponse()->sendResponse();
            exit;
         }

         else{
            Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customer/account'));
            Mage::app()->getResponse()->sendResponse();
            exit;
        }
         Mage::getSingleton('core/session')->setIsFromCart('0');
   }


texts: Magento Admin Menu action not working gives 404 error Magento 1.9.2.4

texts:
Problem Statement: I have created an adminmenu and call an action on it. For the action, I have created one controller. When click on menu it redirects to 404 page on front side.(Can't access to controller and it jump to frontarea)
Code is as below:

config.xml (demo/etc/config.xml)

<?xml version="1.0"?>
<config>
    <modules>
        <Sevenbits_Demo>
            <version>1.0.0</version>
        </Sevenbits_Demo>
    </modules>
    <global>
        <models>
            <demo>
                <class>Sevenbits_Demo_Model</class>
            </demo>
        </models>
        <helpers>
            <demo>
                <class>Sevenbits_Demo_Helper</class>
            </demo>
        </helpers>
        <blocks>
            <demo>
                <class>Sevenbits_Demo_Block</class>
            </demo>
        </blocks>
    </global>
    <!-- Frontend Controller started here -->
    <frontend>
        <routers>
            <demo>
                <use>standard</use>
                <args>
                    <frontName>Demo</frontName>
                    <module>Sevenbits_Demo</module>
                </args>
            </demo>
        </routers>
        <layout>
            <updates>
                <demo>
                    <file>demo.xml</file>
                </demo>

            </updates>
        </layout>
    </frontend>
    <!-- Frontend Controller end here -->

    <!-- Frontend Controller started here -->
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <module>
                        <demo before="Mage_Adminhtml">
                            Sevenbits_Demo_Adminhtml
                        </demo>

                    </module>
                </args>
            </adminhtml>
        </routers>
    </admin>
    <!-- Frontend Controller end here -->
</config>

adminhtml.xml(demo/etc/adminhtml.xml)

<?xml version="1.0"?>
<config>
    <menu>
        <demo transalte="title" module="demo">
            <title>Mage Hunter</title>
            <sort_order>1000</sort_order>
            <action>Adminhtml/demo</action>
        </demo>
    </menu>
</config>

DemoController.php (/demo/controllers/Adminhtml/DemoController.php)

<?php

class Sevenbits_Demo_Adminhtml_DemoController extends Mage_Adminhtml_Controller_Action
{

    public function indexAction()
    {
        //$this->loadLayout();
        echo "Hwll";
        return $this->renderLayout();

    }
}

After  Menu click (page redirect to 404 page and display frontend layout) get this output.


texts: How To create Custom Filter For Custom Listing Page In magento 2.3

texts:
I have Created Custom Module with custom listing page in front end.
Now I want to add custom filter on my custom filter every where I am found solution related to default product listing page.


texts: Product page (detail page) and parent category page is not showing after enabling the Use Flat Catalog Category from admin

texts:
I have developed a magento store and using indexing feature to speed up the store front but when enable Use Flat Catalog Category the product detail page is not showing and parent category pages are not showing, this is not logging anything in log file nor it generate any php error i have enabled log from admin and magento developer mode is enable, php errors are on but nothing is coming up.

Just showing the message
No data received try reload the page


texts: How to remove barcode text from Zend_Barcode

texts:
This is related to magento packing slip printing , I have added a barcode using Zend_Barcode function but when draw barcode it automatically include the barcode text just underneath the barcode image. I need to remove it , following is my code

<?php
$code = "barcode-text";
$file = Zend_Barcode::draw('code128', 'image', array('text' => $code), array());
$code = time().$code;
$store_image = imagepng($file,Mage::getBaseDir().DS.'barcodes'.DS."{$code}.png");
$page->drawImage($image, 300,$this->y-40,430,$this->y+10);


texts: How to call the image of 'multiple select' attribute to frontend?

texts:
In magento 1.9.2.4, I need to map the options of 'multiple select' attribute with the image to display at frontend.

I have created an multiple select attribute with options like below (item1,item2, item3):

And I have put the image inside media/img like below:

And finally entered my code in my my app/design/frontend/<my_package>/<my_theme>/template/catalog/product/list.phtml

The code is:

    <?php
    $Feature = explode(",",$_product->getResource()
    ->getAttribute('feature')->getFrontend()
    ->getValue($_product));

    foreach($Feature as $key => $value){
    <img src="/media/img/<?php echo $multiSelectItem ?>">
    echo $value;

    }
    ?>

but the image is not displayed. Instead error like Parse error: syntax error, unexpected '<' in <path to /list.phtml> is getting displayed.
someone please help me to resolve this issue.


texts:
I have translated "You can create an account after checkout." text and "Place order" button and the translation is displayed correct when Magento is set to developer mode, but when switching to default mode it goes back to the previous translation.
I have tried this:
rm -rf pub/static/; rm -rf var/view_preprocessed/; rm -rf generated/; rm -rf var/cache/; rm -rf var/page_cache/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy en_US nb_NO -f
bin/magento cahce:flush
But the translation still does not change on frontend. I am all out of ideas, anyone experienced this before? Since the translation shows in developer mode it must be some cache/static files that is not updated?


texts: Cron.php/Cron.sh Not being called/Manual only - Permission problem

texts:
Yes I know another Cron problem with version 1.9, but I honestly have looked through so many posts here and on Mage Forums and I have gotten nowhere.

So I have gone into my Cpanel (Magento 1.9.2.2) and have tried several different cron job calls.  like

/usr/bin/php -f /home/exmaple/public_html/cron.php

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

/bin/sh /home/example/public_html/cron.sh

I also have the AOE plugin installed. I have generated a schedule in the plugin and also went in my phpmyadmin and the cron table has a list of jobs that are "pending".  It one of the SE posts it mentioned adding "$isShellDisabled = true;" to the cron.php file. I also tried that.

For the longest time it said no heart beat until I disables the htaccess file in the root directory where my magento store  is installed.  From there I can type in the url/cron.php and it will show a blank page and I begin to receive emails and when i refresh AOE it shows the cron jobs processed.  The cron.php and sh files are set to 644.  If I disable htaccess and manually access the php file...it works and that is as close as I have gotten to getting the system to function.  When I bring back the htaccess file i get the 404 default magento screen and nothing gets processed.  I'm not sure how to fix this?


texts: Changing Super Attributes for magento 2 configurable product

texts:
Trying to change the Super attribute for my Magento 2 configurable product. Current I have 100 configurable product that has a super attribute test_colour, and I've created another attribute called colour, and I want to update the configurable product with colour instead of test_colour programmatically.

Does anyone know how to solve it ? Thanks in advance.


texts: checkboxset ui element not loading values

texts:
I have a custom module in admin with it's own admin page controller and ui-form with a variety of fields.
One of these fields I want to be a 'checkboxset'. When I set the formElement value to that it shows properly as a list of checkboxes and I can select these and save these with some controller code that is saving the rest of the form fields (some input's and multiselects).
However, when the admin page reloads it does not show the saved values.
All the checkboxes start as unchecked.
I checked and the data is being saved in the database. And I can see in the page source that previously saved values are in the data_source.
I also tried switching it from a 'checkboxset' to a 'multiselect' and it worked without issue.
The code for the field is below:
<field name="condition_checklist" formElement="checkboxset" sortOrder="140">
  <argument name="data" xsi:type="array">
    <item name="options" xsi:type="object">Ose\Tradein\Model\Source\ConditionChecklist</item>
    <item name="config" xsi:type="array">
      <item name="source" xsi:type="string">Tradein</item>
      <item name="additionalInfo" xsi:type="string">You must tick all of the boxes</item>
    </item>
  </argument>
  <settings>
    <dataType>text</dataType>
    <label translate="true">Condition Checklist</label>
    <dataScope>condition_checklist</dataScope>
    <validation>
      <rule name="required-entry" xsi:type="boolean">false</rule>
    </validation>
  </settings>
</field>

I did a search of core magento to see if I could find an example of this field type being used but the only references to 'checkboxset' I could find were in test or when it's declared in magento-ui


texts: How to override preDispatch() function to add new open actions without redirect to login?

texts:
I want to add a new action for Customer AccountController and when I go do this action it redirects me to my login page. Here is my preDispatch() function with a new open action "download"

public function preDispatch()
{
    // a brute-force protection here would be nice

    parent::preDispatch();
    if (!$this->getRequest()->isDispatched()) {
        return;
    }

    $action = $this->getRequest()->getActionName();

    $openActions = array(
        'create',
        'login',
        'logoutsuccess',
        'forgotpassword',
        'forgotpasswordpost',
        'resetpassword',
        'resetpasswordpost',
        'confirm',
        'confirmation',
        'download'
    );
    $pattern = '/^(' . implode('|', $openActions) . ')/i';

    if (!preg_match($pattern, $action)) {
        if (!$this->_getSession()->authenticate($this)) {
            $this->setFlag('', 'no-dispatch', true);
        }
    } else {
        $this->_getSession()->setNoReferer(true);
    }

}

If i delete parent::preDispatch(); it works but the login process doesn't work. If I keep the parent it redirects me to login page.


texts:
im work on print order to print order comment when we do print order from front end,

My Orders->Print Order

when click on Print Order the same comment print on PDF,
for that i have created Module using override core files

registration.php, module.xml

Here is a code,

di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Pdf\Invoice" type="Tms\Printcomment\Model\Rewrite\Order\Pdf\Invoice" />
</config>

Tms\Printcomment\Model\Rewrite\Order\Pdf\Invoice.php

app/code/Tms/Printcomment/view/frontend/templates/order/order_comments.phtml

<?php $_history = $block->getOrder()->getVisibleStatusHistory() ?>
<?php if (!empty($_history)) : ?>

<?= $block->escapeHtml(__('About Your Order')) ?>

                <?php foreach ($_history as $_historyItem) : ?>

                        <?= /* @noEscape */
                        $block->formatDate($_historyItem->getCreatedAt(), \IntlDateFormatter::MEDIUM, true) ?>

<?= $block->escapeHtml($_historyItem->getComment()) ?>

                <?php endforeach; ?>

<?php endif; ?>

app/code/Tms/Printcomment/view/frontend/layout/sales_order_print.xml

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

        <referenceBlock name="order.comments" template="Tms_Printcomment::order/order_comments.phtml" />

</page>

But its not work, comment not print in PDF, what shoud I do wrong? please help me on this


texts:
I faced problem with overriding a phtml file in Magento 2.

I want this:-

(1) Core Module of phtml Override By Custom Module called - A

(2) Same phtml file of Module - A Override By  Some Custom Module - B

Example:-
Magento_Sales::order/view/info.phtml

This file override by Module-A And I want override Module - A info.phtml  in my custom Module-B

Issue:-
So that the issue will arise that Module - B cannot override that phtml file.


texts: Changing encryption key on Magento 2.3 | secret key size should be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes

texts:
Magento 2.3 has introduced a new encryption method and requires the encryption key to be 32 characters long / 32 bytes in size.

If you run a setup:upgrade with a wrongly sized encryption key you will get the below error:

secret key size should be SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes

You can regenerate the encryption key before the upgrade using the admin panel, but it seems to append the new encryption key to the old one. I believe this is an intended feature for archiving purposes / decrypting old data?

The problem I am facing is: I can update my encryption key on Magento 2.2.x and it will append the new (correctly sized) encryption key to the old one in app/etc/env.php. Everything still works.

But when you upgrade to 2.3, you will still get the error message from above when doing a setup:upgrade. It must look at the field in app/etc/env.php as a whole, and figure out it isn't 32 characters long (because the old encryption key is on the line above the new one).

Does anyone know if appending the new encryption key to the old one is intended behaviour? And if it is safe to remove the old encryption key so we can proceed with the 2.3 upgrade?

Thanks


texts: Magento don't show subtotals, discount, shipping in checkout

texts:
I'm almost finishing my store, but there's a problem who's blowing my mind. I use magento 1.9.3.1 and Porto theme 2.4.4

My checkout don't show information about subtotals, discount, shipping... everything works fine, all the payment methods process the cost correctly, but it's not showing in checkout. I'm uploading some images to show you.

1) in cart

2) in normal checkout

3) in one page checkout

i already tried to disable my theme and use magento rwd, but the problem persists. Someone can help me? The address is lojateste.veganis.com.br


texts: magento 2.1.8 move navigation menu to the left sidebar

texts:
I have magento 2.1.8 and i tried to move navigation menu to the left sidebar with many different ways I found around here and on other forums but no luck so far.
this is what i currently have on the default.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
 <move element="catalog.topnav" destination="sidebar.main" />
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_file" xsi:type="string">images/logo.png</argument>
            <argument name="logo_img_width" xsi:type="number">320</argument>
            <argument name="logo_img_height" xsi:type="number">133</argument>
        </arguments>
    </referenceBlock>
</body>

how can i do this?

Thank you in advance!


texts: Magento Product image upload (Flash) not working

texts:
After apply patch in magento product image upload (flash) not working it will display message image uploaded but it's not listed in images table.

Please see this image.

Help me.!

Thank you.


texts: Magento2.1.6 : admin filters are not trimming the white space

texts: Once we add something for filtering ended with white space, search results are not  displayed even the data is present.Can we have trim function and if yes then how?


texts: Shipping method Table Rates: Magento (v.1.7) always include tax in Order Subtotal value

texts:
I'm having an issue with Magento Table Rates. Magento always adds a tax to the "Order Subtotal". I spend hours to get rid of it and to find the line where Magento is doing this. Unfortunately without success.

My CSV contains for example:

Country,Region/State,"Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
*,*,*,0.0000,14.5000
*,*,*,35.0000,0.0000

That means that all orders >= $35 are eligible for free shipping. But only orders >= $42 gets the free shipping options. Its definitely the tax - if I'm going to the checkout page I see $7 tax.

It only works if I set "Order Subtotal" to "29.0000" instead of "35.0000". But that's a bad and only static solution.
Does anyone know how I can solve this?

Thank you so much in advance.


texts: When I add a new custom Customer attribute I get Fatal Error on click save or submit button

texts:
I manage to add my custom customer attribute with InstallData on my custom module it appears everything is working fine, but when i try save or edit customer  in front end or admin panel, when i click on the Save Button when editing a customer or creating a customer i got this error.
I'm on Magento V 2.3.2

  Fatal error: Uncaught TypeError: Argument 2 passed to
  Magento\Eav\Model\Attribute\Data\Text::validateLength() must be of the
  type string, null given
  vendor/magento/module-eav/Model/Attribute/Data/Text.php on line 141.

Here is the InstallData I used to create the attribute.

<?php

namespace Kmdelectronics\Customer\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Model\Config;
use Magento\Customer\Model\Customer;

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;

    private $eavConfig;

    public function __construct(EavSetupFactory $eavSetupFactory, Config $eavConfig)
    {
        $this->eavSetupFactory = $eavSetupFactory;
        $this->eavConfig       = $eavConfig;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Customer\Model\Customer::ENTITY,
            'cedula_attribute',
            [
                'type'         => 'varchar',
                'label'        => 'Cedula',
                'input'        => 'text',
                'required'     => true,
                'visible'      => true,
                'user_defined' => true,
                'position'     => 999,
                'system'       => 0,
            ]
        );
        $sampleAttribute = $this->eavConfig->getAttribute(Customer::ENTITY, 'cedula_attribute');

        // more used_in_forms ['adminhtml_checkout','adminhtml_customer','adminhtml_customer_address','customer_account_edit','customer_address_edit','customer_register_address']
        $sampleAttribute->setData(
            'used_in_forms',
                [
                'adminhtml_customer',
                'customer_account_create',
                'customer_account_edit'
                ]);
        $sampleAttribute->save();
    }
}


texts: How to get the correct label of an attribute on multistore

texts:
I have a piece of coding which works fine for the default store.
Now I created a multistore but this piece of coding is retrieving the default label name, but I want the labelname wich belongs to an other store.
this is the coding:
<?php echo $attribute->getDefaultFrontendLabel(); ?>

and that comes from:
<?php /** @var \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute */ ?>

                        <?php echo $attribute->getDefaultFrontendLabel(); ?>

                            <select class="option-select color" name="<?php echo $block->getRealAttributeCode($attribute); ?>" id="select-<?php echo $attribute->getAttributeCode(); ?>">
                                <?php foreach($block->getOptions($attribute) as $key => $value) : ?>
                                    <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
                                <?php endforeach; ?>
                            </select>

So how can I retreive "getDefaultFrontendLabel" from an other store??


texts: How to transfer the database contents (products) from version 1.3.1 to version 1.9.1?

texts: I am not so good at this - I have an old Magento (1.3.1) store with about 1300 products. Now - I decided to make a fresh install of the newest (1.9.1) version. I have that running on an IP address before I manage to put all of my products in and then change the domain DNS to forward the traffic to the new store running the new Magento version. The problem is - I have been putting the products in by hand and it takes a very very long time (they all have different sizes, colors and so on). Is there a safe way to automatically transfer all the products from a 1.3.1 database to a 1.9.1 database? I mean - it's kind of hard for me to imagine how this would work if for example the categories I set up might not even have the exact same name...Thanks for any suggestions! :-* Allysin


texts: Magento 2 - add custum attribute to urlrewrite programmatically

texts:
I am trying to regenerate the urlrewrites on magento 2.3.
They are now created by the pruducts name

  /artist.html

but i would like to to add some custom attributes.

  /astist-title-format.html

to have them unique & to prevent the error:

  The value specified in the URL Key field would generate a URL that already exists.

any help would be appreciated!


texts: Is it possible to add logs in a setup script?

texts:
I'm trying to add some alerts in system.log if my setup script cannot run properly (the sql query needs a SUPER user to run properly).
I'm not able to write any log in this setup script.

Is it possible ? If yes, what did I miss ?


texts: Print barcode generated from URL in Shipment PDF

texts:
I want to insert barcode image in PDF which is generated from URL

eg. http:\\example.com\barcode.php?barcode=12345

$pdf->drawImage() seem not working with URL.

Any Idea How we can insert images using URL?


texts: Magento 2 : New Product Attributes are not displaying on frontend

texts:
I have created a counfigurable product with. New Attribute Set & it's attributes. I have set the value in Admin also.

On vendor\magento\module-catalog\view\frontend\templates\product\list.phtml

I'm customizing listing. I'm trying to get my newly added attribute using

foreach ($_productCollection as $_product):
    echo $_helper->productAttribute($_product, $_product->getYear(), 'year');

    $attribute = $_product->getResource()->getAttribute('year');
    if ($attribute) {
        echo $labelValue = $attribute->getFrontend()->getValue($_product);
    }
endforeach;

But it's still not displaying set value. I'm able to see value in Admin Product Page. But not in the frontend.

I have cleared cache as well.


texts:
Looking at /app/code/Mage/Catalog/Block/Product/View.php I can see the logic for the meta description tag within the _prepareLayout function

$description = $product->getMetaDescription();
            if ($description) {
                $headBlock->setDescription( ($description) );
            } else {
                $headBlock->setDescription(Mage::helper('core/string')->substr($product->getDescription(), 0, 255));
            }

This is great but I would like to change the logic so that it populates the meta description in this order

Meta description
Description
Short Description
Product Title
Default meta description

Whats the best way to achieve this? Would it be to override the _prepareLayout function?


texts: How to create buy one get one promotion in magento

texts: I used Buy X get Y free option.But That promotion is not working.Can any one suggest how to create this coupon.


texts: How to update database tables of already installed custom module

texts:
I have installed a custom module in Magento 1.8. The database tables were created automatically during set-up.
Now I want to update database structure. But I don't want to reinstall module.
Also I don't want to alter database directly.
Is there anyway to do it by a magento way.

Thanks

EDIT:

Mysql set-up file location - /app/code/local/Namespace/Module/sql/module_setup/mysql4-install-0.1.0.php


texts: How to change the product image position using CSV?

texts:
I'm trying to update Product's image position using CSV file.
I've already uploaded images in Products.

So how to change already inserted product image position using CSV file?


texts: Nav-Bar difficulty: should I be editing static blocks, html, css or..?

texts:
I am currently trying to customise an existing theme (accessshop). I have managed to change images & text throughout most of the website. But I am struggling to make my nav-bar display my pages.

I have been using the inspector tool to locate css style / id's and editing the file / text either inside the static blocks or css files in the root.

My theme only currently shows a 'Home' Button. I have several other stock pages that were preloaded with Magento, none of these are showing. I have also tried creating a new page and this is bringing no luck either.

Should I be editing HTML code to add new navbar items / subitems? I presumes I would be able to do this through the Magento CMS.

Am I missing something? - thriffft.com

Some images are attached..

Thanks in advanced


texts: Is it possible to have the same product in 2 separate stores but have different downloadable links?

texts:
So here's the problem.

Store #1 sells music files and downloads.
Product 1
I have a Music file that is offered with 3 different options to buy.
1. mp3 option
2. wav version
3. all rights (zipped) this includes all 3

Store #2
Same product - but with only 1 option for download
I want to offer this same file but only offer the rights(zip) option 3-  but all 3 options show up in store #2

The reason is, the customer will not need option #2 in the second store because it included in option 3

Store #2 will only sell the rights to the music, no reason to buy the mp3 or wav verions since the're included.

Does anyone have a solution? I'd really be grateful if this is possible.


texts: Syncronising Magento 1.9.1.0, 1.9.2.4 and Modman

texts:
i am facing a task which seems to be some heavy manually work. I am about to install a new Magento Version 1.9.2.4 and migrate the old Shop from 1.9.1.0. The old Version has been hacked, so i have to set it up new.

What way to do that migration, not to have to compare every file and update it, plus update modman? And How is customizing done which is updatable?

Do you have some faq and hints for that?

Greetz


texts: How to set my module block to access from anywhere

texts:
Ok, i have custom module, which works as i wish it to work on a url www.mysite.com/mymodule. Now i want my module to be accessible with a block name from anylayout, also what do i have to do to embed on the CMS pages as well.

My working module layout (mymodule.xml)

<layout version="1.0">
<default>
    <reference name="head">
            <action method="addItem" ifconfig="...>
                     //js and css added here;
            </action>
    </reference>
</default>
<mymodule_index_index>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="core/template" name="mymodule" template="mycorp/mymodule/default.phtml"></block>
        </reference>
</mymodule_index_index>

This is my layout for the module. Now suppose i want to access it on other layout handle suppose here

<catalog_category_default>...<reference name="content">HERE</reference>...</catalog_category_default> ?


texts: Magento 2 Difference between default.xml and default_head_blocks.xml

texts:
In Magento 2 Theme , default.xml and default_head_blocks.xml files are located in app\design\frontend\{package}\{theme}\Magento_Theme\layout

can anyone tell me what is the difference between these two files ?


texts: How to show subcategories in specific format?

texts:
I have want to show sub categories at home page like this:

Currently it showing as:


texts:
I have a Magento web site stuck in displaying admin pages in Arabic language.

I've tried changing the language via cpanel and also via the admin pages, general etc...

Can anyone tell me if I can do this manually in a DB table or file as it's hard enough trying to view these pages and try to decipher the text.


texts: magento 2 Newsletter subscription Success or Failure message not getting displayed

texts:
Hi Here I called magento newsletter subscription block in to my phtml file. but after hitting submit its redirected to same page but no any messages are showing. how to add success or failure message. I added loggers in vendor controllers but they are not logging.

vendor/magento/module-newsletter/Controller/Subscriber

this is my custom phtml file

 echo $this->getLayout()
      ->createBlock('Magento\Newsletter\Block\Subscribe')
      ->setTemplate('Magento_Newsletter::subscribe.phtml')
      ->toHtml();

Where am doing wrong? Can I get help? Thank you in advance


texts: Text attribute in the layered navigation

texts:
How can i make a text attribute available to the layered navigation?

In the admin it is not possible to set an attribute to filterable if it is not a dropdown or price type.

I can worry about the frontend implications of this, but would like to know the best approach to open this up to text fields and make it possible for the text attribute to be loaded with the list of filters.


texts: I am having magento store and also POS . I need to integrate both , so is there any tool or any extension available in magento for this purpose


texts: How to create a different template for catalog_category_layered

texts:
This might be a bit too specific, but I couldn't, for the life of me find where how to do this but it might be pretty simple for a non-magento newbie.

I am using Layered Navigation and Framefish and framefish overrides the catalog list and product view of the webshop products and categories.

So the XML file looks like this:

<?xml version="1.0"?>
<layout version="0.1.0">
  <!-- Overriding Template File -->
  <catalog_product_view>
    <reference name="product.info">
      <action method="setTemplate">
        <template>framefish/catalog/product/view.phtml</template>
      </action>
    </reference>
  </catalog_product_view>
  <catalogsearch_result_index>
    <reference name="search_result_list">
      <action method="setTemplate">
        <template>framefish/catalog/product/list.phtml</template>
      </action>
    </reference>
  </catalogsearch_result_index>
  <catalog_category_default>
    <reference name="product_list">
      <action method="setTemplate">
        <template>framefish/catalog/product/list.phtml</template>
      </action>
    </reference>
  </catalog_category_default>
  <catalog_category_layered>
    <reference name="product_list">
      <action method="setTemplate">
        <template>framefish/catalog/product/list.phtml</template>
      </action>
    </reference>
  </catalog_category_layered>
</layout>

I tried to just call a different .phtml for that layered bit but it doesn't seem to be called. So I assume there must be something added in the controller, but of that I am not sure.

If you click on a brand name for example I ASSUME the xml uses the <catalog_category_layered> - bit and when you click on a normal category I ASSUME it uses <catalog_category_default>

IF that is true, I want to load another .phtml file for the layered bit so that I can modify that page.

I would be grateful if someone could point me in the right direction.


texts: Product attributes not updating for configurable products

texts:
I am using a fresh installation of Magento 2.2.1.

After creating a configurable product with the attribute "width" as the configuration, I also updated the weight of each of the simple products that have been created automatically. The weight is visible in the configurable product configuration table as well as in each of the simple products individually as expected. I activated the setting to show the weight attribute in the store front and it is visible in the "Attributes" tab of the product. However, when changing the width of the product, the weight (actually non of the attributes, e.g. volume) is not updated as one would expect. Only the weight of the parent / configurable product is shown and never updated. This also is the case for the SKU, which is certainly different for each of the configurations.

My question is: What is the correct way to connect multiple attributes to the configurable products, i.e. how to update the weight (or any) attribute in the store front according to the width option.

As a related side-question: Why does the weight not show the unit that is visible in the back-end? When setting the weight, there is a gray-ish unit "kgs" so I naturally assume the store front should know about this unit as well.


texts: I need to get order id after payment is successfully completed. Is there observer to do this?


texts:
How to tell from the admin whether an order was placed by customer or admin?

There is an Origin column, but it always says Website, no matter where it was placed.

Thanks in advance


texts: How to add System > Configuration > Variable value in custom variable?

texts:
I have added a custom field- Fax number on System > Configuration > General > Store information. I need to use this variable value in my cms page.
There are system variables which we can use in our cms blocks like {{store_name}}, {{store_email}}.
I want to use my fax number as a variable. Something like {{store_fax_number}}
I have tried creating custom variable but don't know how to add a configuration field value to that variable.
I know I can add directly my fax number to a custom variable. But I don't want to do that. I want to add a field in store information and then use that value in custom variable.
If anyone have any idea please help.


texts:
I am trying to show some products based on a attribute value in an admin grid.

This admin grid should be accessible from the admin menu.

Should be in the following format:

                                                                   SAVE

show in Homepage   Product_id   Product_name  type    SKU    searchable
- yes
- no
- any

Some points about the requirement are:

No edit/add button to this grid.
The product collection can be saved by SAVE button after checking/unchecking the column "show in Home page". (I think this requires database table)
The grid must be accessible from admin menu.

What files should I change to get my requirement? if not, atleast tell me which code to refer in Mage/core files.


texts: edit the price textfield without clicking on textfield

texts:
we are using following code to update the price.

Now we have to click on the Textfield to edit the price.

but what we need is without clicking on the textfield it should be editable.

Means once we click on the text field ,than only its allowing to edit.

but without clicking on the textfield it should be editable.

Php

        <?php //echo $products->getPrice(); ?>

        <span class = "ama1"  id="valueprice_<?php echo $products->getId(); ?>"
        onclick="showFieldPrice('<?php echo $products->getId(); ?>');"><?php echo $products->getPrice(); ?>

        <input class="ama1" type = "text" id = "price_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" "name = "price" value = "<?php echo $products->getPrice(); ?>" style = "display:none"/>
        <span class="label wk_action" id="edit_link_<?php echo $products->getId(); ?>">

        <p id="updatedprice_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated

 <button id="price_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldPrice('<?php echo $products->getId(); ?>'); return false;" style="display:none" >
         <?php echo $helper->__('Update') ?>
         </button>
         <button id="price_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetPrice('<?php echo $products->getId(); ?>'); return false;" style="display:none" >
         <?php echo $helper->__('Cancel') ?>
         </button>

JS

function showFieldPrice(product_id)
        {

            var qtyId='#price_'+ product_id;

            var editLink="#price_edit_link_"+ product_id;
            var valueprice="#valueprice_"+ product_id;
            var updateButton="#price_update_button_"+ product_id;
            var resetButton="#price_reset_button_"+ product_id;

            $wk_jq(qtyId).show();
            $wk_jq(valueprice).hide();

            $wk_jq(editLink).hide();
            $wk_jq(updateButton).show();
            $wk_jq(updateButton).prop('disabled', false);//just in case
            $wk_jq(resetButton).show();

            return false;

        }


texts: How to make product url-key with capital letters

texts: I am trying to make my product url-keys in capital letters. Even if I update it manually it is still showing all in lower case letters. Upon checking the url-key after saving the product again it is auto saved in lower case. Is there anything I can do to force all product urls to be in capital letters?


texts: how to load different css files based on "store view"

texts:
I have two "store view"s and I want to only add a css file to one of the views. I have noticed that you must load css files in default_head_blocks.xml. here is what is want:

        <css src="css/style.css"/>
        <!--if storeview = fa-->
        <css src="css/theme-rtl.css"/>
        <!--endif-->


texts: Magento 2: Page tittle is Printing below the content

texts:
there is a problem my all page title are displaying below the content.
here is a screenshot.

please suggest a solution.


texts: Magento 2 set Max Sale Quantity per storeview

texts:
I need the stock item attributt "maxSaleQty" in storview level and not in global level.
I have create a new product attribute "maxSaleQtyStore".
Then I create a Plugin. This works if I set a static value. But I'm not able to get the current product - with his attributtes.

The load product code comes from How do I get the current product in Magento2?

Here my code of the Item.php:

namespace Vendor\MaxSaleQty\Plugin\Model;

use Magento\Catalog\Model\Product;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Registry;
use Magento\Framework\View\Element\Template;

class Item extends Template
{

   protected $registry;
   private $product;

    public function __construct(Template\Context $context,
                                Registry $registry,
                                array $data)
    {
        $this->registry = $registry;
        parent::__construct($context, $data);
    }

    private function getProduct()
    {
        if (is_null($this->product)) {
            $this->product = $this->registry->registry('product');

            if (!$this->product->getId()) {
                throw new LocalizedException(__('Failed to initialize product'));
            }
        }

        return $this->product;
    }

    public function afterGetMaxSaleQty()
    {

        $maxSaleQty = $this->getProduct->getMaxSaleQtyStore(); // $productId;
        return $maxSaleQty;
    }
}

Big thanks for any help!


texts: Overriding countries error when submitting order

texts:
I have created a plugin to override country options so that when you are in frontend it will allow the countries you have set in the configuration. And when you are in adminhtml/backend it will allow ALL countries.
But when I try to submit an order from the backend, I get the following error: "Please check the shipping address information. Invalid value of "DK" provided for the countryId field."
I get the same error no matter which country I select for shipping.
This is my plugin:
protected CollectionFactory $_countryCollectionFactory;

public function __construct(
    CollectionFactory $countryCollectionFactory
) {
    $this->_countryCollectionFactory = $countryCollectionFactory;
}

/**
 * @param Countries $subject
 * @param array $result
 * @return array
 */
public function afterGetAllowedCountries(Countries $subject, array $result): array
{
    $objectManager = ObjectManager::getInstance();
    $state = $objectManager->get('Magento\Framework\App\State');

    if ($state->getAreaCode() == 'adminhtml') {
        return $this->getCountryCollection();
    } else {
        return $result;
    }
}

public function getCountryCollection(): array
{
    return $this->_countryCollectionFactory->create()->loadData()->toOptionArray();
}


texts: Magento2 - Product Customizable Options not showing

texts:
Getting an issue with the product customizable option in the backend, As shown in the screenshot the customizable options are not showing, I have checked the database the options are enabled for all those products, But getting an error in the console (see screenshot).
Thanks


texts: How to get customer gender as text from its integer value in magento 2

texts:
I want to get customer gender value like Male or Female in magento2?
How to get it in \Magento\Customer\Block\Account\Dashboard\Info block,

I am doing something like this

$block->getCustomer()->getGender()

I referred this link
 How to get customer gender value with text in magento2?

I don't want to use ObjectManager just for gender, there must be something via this method $block->getCustomer()->getGender()


texts:
newsletter subscribe success email going  in spam to gmail
How can i solve this issue?


texts: Get product collection by category id on phtml file magento2

texts:
I want to get product collection by category id on phtml file. For that I used below code but it's not working.

$collection = $this->productFactory->create()
->getCollection()
->addAttributeToSelect('*')
->addCategoriesFilter(['eq' => 2]);

I also tried this link but when I use addCategoryFilter(\Magento\Catalog\Model\Category $category) in my phtml file it shows me error that unexpected $category on line no. xx

May I need to add anything to get product collection by category id? I am using addCategoriesFilter to get collection by category id. Is it right or I am doing something wrong?


texts: my product catalog url rewrite, is being developed for several days. How can I Optimiz this process in a short time, for about 15,000 products?


texts: How to add a custom items grid of order in Sales Order View admin side?

texts:
I want to make custom grid of items in which status of each item is managed separately in sales order view page in admin. So how to make such grid?
For example this is in maganto 1 but I want to implement same for magento 2.


texts: Is it possible to map category products in website or store level

texts:
Default Magento doesn't allow product mapping to categories per website or store level. This is global.

Is it possible to customize this in Magento to make it website or store level? If yes, then how much work will be required?


texts: How to get all products with Qty in magento2

texts:
I am trying to get all products with it's stock qty in magento2.
please let me know if anybody have solution.


texts: Magento 2 UPSELL product list showing same price as of Product

texts:
I'm facing an issue with Magento 2.1 UPSELL PRODUCT LISTING. All the upsell products are showing same price as that of the PRODUCT price. In back-end I have set Manage Stock as NO as I don't need to managing stock at all. The issue only related to few products as others are loading fine.

How I can resolve the issue?, anyone knows please help me.

Attaching the back-end upsell product configuration screen and front-end view.


texts:
I enable newsletter popup form. After submit newsletter form, I like to show some text like

  Thank you for your subscription.

with in same popup box


texts: Magento 2: Add Customer Group Name in Transactional Email

texts: How to add customer group name in email template magento2


texts: Magento2 admin grid ui component form hide multiple fields based on php condition

texts:
I have so many fields in my admin grid form which made using UI component. I want to hide some of the fields using php condition. I know that it can done using DataProvider file and I also followed this thread Disabling a UI component field upon condition in Magento 2.

But it didn't work for me. Did any one has done this before having any idea/solution apart from this?

Please guide. That would be really handy.

Thanks,


texts: Get Category Name, from which product was ordered

texts: Currently my product belong to many Categories, I want to get Category Name, from which product was ordered.


texts: Magento 2.2 - add multiple new shipping address from checkout page

texts: I want to add multiple new shipping addresses from checkout page currently Magento allows only one new shipping address from the checkout page


texts: Deleting MANY url_rewrite rows with a lock?

texts:
Magento 2.2

I have to run a huge SQL script which deletes around 2 million entries from url_rewrite by entity_id. This script runs a couple of days, but is interrupted by other processes and so I always get the deadlock SQL error and the script is aborted and I have to restart it manually.

Now I was thinking to write lock url_rewrite while the script runs. How would I do that and is it a good idea?

Thanks!


texts: Custom router gives me "Front controller reached 100 router match iterations" when matches 404

texts:
I created a custom router

this is my di.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="default" xsi:type="array">
                    <item name="class" xsi:type="string">Vendor\Custom\Controller\Router</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">40</item>
                </item>
            </argument>
        </arguments>
    </type>
</config>

This is the block match function:

public function match(\Magento\Framework\App\RequestInterface $request) {
        $identifier = trim($request->getPathInfo(), '/');

        if(strpos($identifier, 'search') !== false) {

            $request->setModuleName('catalogsearch')->setControllerName('result')->setActionName('index');
        } else {
            //There is no match
            return;
        }

        /*
         * We have match and now we will forward action
         */
        return $this->actionFactory->create(
                        'Magento\Framework\App\Action\Forward', ['request' => $request]
        );
    }

Everything is fine till I got an error "Front controller reached 100 router match iterations" everytime I go to a 404 page.


texts: Magento2 Add custom billing fields order view

texts:
I added to checkout custom fields following this guide, named 'customer_pec' and 'customer_recipientcode'. For each order I save the data in quote and in quote_address tables

Now I want to add the same fields on Admin side in Order view page.

Now I want to to this (if possible): add my new custom fields under "billing address" and make them editable.

I tried to add in Customer settings -> Address Templates->HTML view
the code suggested by the comments below:

{{depend customer_pec}}<br /> PEC: {{var customer_pec}}{{/depend}}

then refresh cache, but I'm still not able to display the fields.

Edit: since I'm still stuck on this, I checked my code. I re-opened the guide and added several features including the new fields in sales_order_grid.xml:

<column name ="fe_data" class="Fattura24\AppFatturazione\Ui\Component\Listing\Columns\Column\FEData">
           <argument name="data" xsi:type="array">
                 <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Dati FE</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="align" xsi:type="string">left</item>

                </item>
            </argument>
        </column>

Of course I added all needed classes and templates to do this. I ran php bin/magento cache:flush but at the moment I get a blank page 'Http 500 server error' and nothing more in sales->order view.

Any debugging tool, any suggestion? Thanks.


texts:
I am trying to add a new Customer Group and copy the price of one of the Group Price's products into this new customer group for all products. For example, I have a customer group Group1 which has price x, and I want to create a script which adds the new group (Group2) and copies the price from Group1 (x) to all products. Has anyone done this before/can point me in the right direction?

I'm starting by trying to load group prices, but it returns empty:

    function productCallback($args)
{
    $product = Mage::getModel('catalog/product');
    $product->setData($args['row']);
    echo $args['arg1'] . "\n";
    echo $product->getSku() . ': ' . $product->getName() . "
";

    $groupPrices = $product->getData('group_price');
    foreach($groupPrices as $key)
    {
        foreach($key as $subkey => $value)
        {
            echo $subkey . " ~ " . $value . "
";
        }
    }

    echo "

";
}

$products = Mage::getModel('catalog/product')->getCollection()
                    ->addAttributeToSelect('*');

Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('productCallback'), array('arg1' => '===='));


texts: Magento 2 - How can I import / export categories from M2 to M2?

texts:
I'd like to import and export using two Magento 2, among two environments.
I know that I can't do it natively, so how can I do using MySQL or some free tool?


texts: How to move product title after products image in Magento 2

texts:
I have added this in catalog_product_view.xml file, but it's not working!!
Need help.....

<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!--<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>-->
        <!--<move element="product.info.review" destination="product.info.main" before="product.info.price"/>-->
        <!--<referenceBlock name="view.addto.compare" remove="true" />-->
        <move element="page.main.title" destination="content" after="product.info.media"/>
    </body>
</page>


texts:
I'm using magento v2.5.5 to develop an extension, in this extension i have to generate virtual product with non manageble stock (infinite stock), how to do this programmatically, my virtual product data example:

$products[] = array(
  'Name' => 'Chocolate',
  'price' => '2000',
  'sku' => 'choco',
  'tax_class_id' => '0',
  'visibility' => '4'
);

$products[] = array(
  'Name' => 'Milk',
  'price' => '1200',
  'sku' => 'milk',
  'tax_class_id' => '0',
  'visibility' => '4'
);


texts: Same LESS file, one media-width works, the other doesn't?

texts:
I have a custom theme with the parent of blank. In web/css/source I have_navigation_extend.less.

At the top I have

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
.nav-sections {
    display: inline-block;
    padding-left: 20px;
  }
}

Which doesn't work for some unknown reason and is driving me nuts since the line below it works. It doesn't even show up in any of the CSS files. But the next line right below it does show up and works as expected:

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
  .nav-sections-item-title {
    background: darken(@navigation-mobile__background, 5%);
    border: solid darken(@navigation-mobile__background, 10%);
    border-width: 0 0 1px 1px;
  }
}

What am I missing?!?!!


texts: Magento : How to stop register process for spam/junk customer?

texts:
I'm facing a problem, junk/fake customer are registering on Magento. I would like to know if someone has experienced same and how it can be fixed.

I'm not found of using captcha solutions, I would rather intercept customer profil before regestering, write some rules on names, email etc... but i'did not managed to stop process.

so I write an observer based on event "customer_save_before"
and i'm able to detect when it's a fake one, but i'm unable to stop registering proccess.

code looks summarized like

    $event              = $observer->getEvent();
    $customer           = $event->getCustomer();

after some logic to detect junk, I don't be able to have some action on this customer.

maybe i'm too late in magento process to stop it ? More probably, this is because 'im using an observer and it cannot really stop other running task, like registering...

any help appreciated,

Regards,


texts: applying the styling of product price to my own text

texts:
i would like to apply the same styling and CSS of the product price of the magento product view page ( irrespective of which theme is being used) to my own text. How do i do that?
to be clear: if say, the product is worth 100 euro,
i would like the font of and size of that '100' element to be applied to my own text.
i already tried a lot.

thanks.


texts: Admin Category Insert Thumbnail field has disappeared

texts:
I have recently installed Magento 1.9.1 and trying to make use of the category thumbnails (as well as the main image).

However, I have gone to Admin >> Catalog >> Manage Categories and it seems to have disappeared, I can't add a category thumbnail.

I have checked the release notes and there is no mention of this, I have disabled a few modules, Reviews, PayPal, etc.

I have enabled Flat Categories as well but I have tried enabled/disabled everything but it seems to remain gone :(


texts: Magento2 : I am seeing same block code i have added in CMS page

texts:
I am trying to insert phtml block in home page CMS in Magento 2. But I am seeing the same block code I have added in CMS backend in front end.

{{block type="template" template="page/test.phtml"}}

Please help.


texts: Wishlist info.phtml only contains configurable product, not it's simple

texts:
Currently, my wishlist for a clothing store contains configurables with sizes and colors.  When adding a product to the wishlist, only the configurable is passed to the info.phtml, and not it's simple (the size and color chosen).

This defeats the purpose of the wishlist as trying to share this information with friends/family will not show them the exact item you want.

Has anyone ever heard of this problem? I can't seem to find anything about this issue.  Any input is useful.


texts: I want to show the Price of products through API in mageno2

texts: I want to show the prices of the product which will come through API.This prices are not stored in magento database. I just want to know how can it be achieved with just explanation.


texts: How to disable all the magento functions, to keep only the homepage?

texts:
I have a multistores with one parent domain, and 2 stores on 2 differents domains.
I don't want to sell products on my parent domain, so I would like to disable all the magento functions, and keep only the homepage.

How can I do?

Thanks.


texts: Magento 2 category updated programmatically not working

texts:
from upload the CSV file trying to created&update the category, while I create the category from the below script it's working, but while I update the category with the same script does not work.
I have two store, first store id is 1, then the second store id is 2, in the uploaded CSV I have mentioned that store_id in that

 $categoryFactory = $this->_objectManager->get('Magento\Catalog\Model\CategoryFactory');
    $categoryRepository = $this->_objectManager->get('\Magento\Catalog\Api\CategoryRepositoryInterface');
    $categoryCollection = $categoryFactory->create()->getCollection()->addAttributeToFilter('entity_id', $data['id'])->setPageSize(1);
    if ($categoryCollection->getSize()) {
        $categoryId = $categoryCollection->getFirstItem()->getEntityId();
        $category = $categoryRepository->get($categoryId, 0);
    } else {
        $category = $categoryFactory->create();
    }
     if(isset($data[store_id']) && !empty($data['store_id']))
            $category->setStoreId((int)$data['store_id']);
else
             $category->setStoreId(1);

    $category->setName($data['name']);
    if ($isParent) {
        $category->setParentId(2);
    } else {
        $categoryCollection = $categoryFactory->create()->getCollection()->addAttributeToFilter('entity_id', $data['parent_id'])->setPageSize(1);
        if ($categoryCollection->getSize()) {
            $categoryId = $categoryCollection->getFirstItem()->getEntityId();
            $category->setParentId($categoryId);
        }
    }
    $category->setIsActive($data['is_active']);
    $category->setIsAnchor($data['is_anchor']);
    $category->setIncludeInMenu($data['include_in_menu']);
    $category->setCustomUseParentSettings($data['custom_use_parent_settings']);

    // will set meta details
    foreach ($this->additionalHeaders as $header) {
        if (array_key_exists($header, $this->headersMap)) {
            $additionalData[$header] = $data[$this->headersMap[$header]];
        }
    }
    $category->setCustomAttributes($additionalData);
    $categoryRepository->save($category);

for your further information, I have updated the screens, kindly check and let me share your ideas and thoughts, thanks in advance for your support


texts: How to get random number or string in transact email?

texts:
I want to generate random number or string in forgot password template?
I used directly "getRandomString(6)" that print same thing?
I did not get how should i change?


texts: Magento 2.1.6 : Remove decimals from product view

texts:
I managed to remove the decimals .00 from catalog.

But, I'm not able to remove from product view & the checkout

Please help me.

Thank you.


texts: how to get product list of specified category using rest API?

texts: I want to access specified product list. for example access all the products in Jacket's category.


texts: New extension appears in admin menu but gives error 404 when i click on it

texts:
I have a Magento 1.9.2.4 store and I've installed an extension(by uploading everything that was in the archive trough ftp). It is now visible in the top menu bar in the admin section(it doesn't appear in System > Configuration) but when i click on it it leads me to the front of my store 404 error page.

I tried to reinstall the extension, then reset the roles(found that as a solution to a similar problem) then log out and in again but the problem is still there.

I was thinking about installing that extension trough Magento Connect but the same 404 error page appears when i click on System > Magento Connect > Magento Monnect Manager.


texts:
I am setting a session variable on an event triggered when the url have an extra variable name "pcode" with the following code.

Mage::getSingleton('core/session')->setPcode($pcode);

Now when getting the session from one of template file with the following code..

$data=Mage::getSingleton('core/session')->getPcode();
Mage::Log($data);

*Edit:*Enable the log From back-end and checked

but I am getting nothing.

I also tried the same code by calling a model and also from calling an ajax function from the template but have the same results.

Edit:

When I am getting the session value after setting get, it retrieves the value but in another template page, its have no value.

$request = $observer->getEvent()->getData('front')->getRequest();
        $pcode  = $request->pcode;
        if(isset($pcode))
            //Mage::getModel(‘core/cookie’)->set('pcode', $pcode);
            Mage::getSingleton('core/session')->setPcode($pcode);
            $data=Mage::getSingleton('core/session')->getPcode();
                Mage::Log($data);
        exit;

Edit: Enable the log From back-end and check in var/log/system.log file your value will logged or not.


texts: Looking for module- percent fee on specific product when payed by card

texts:
I'm looking for a module that can solve the following problem.

I need to apply 3% fee for a specific product when payed by card. And the main condition is I need it to apply 3% only on that product (type, category) and not on entire cart on checkout.

Any suggestions?


texts: Display best selling products from a category

texts:
How can I display the 10 best selling products of a category on a specific page or block?

I want to load this inside the category as an entire new page.


texts: How to check if a string is translated or not in Magento 1

texts:
I did a rewrite of this class: Mage_Core_Model_Translate and I focus on this function _getTranslatedString So I changed it into this:

protected function _getTranslatedString($text, $code)
{
    $this->checkTranslatedString($text, $code);
    return parent::_getTranslatedString($text, $code);
}

public function checkTranslatedString($text, $code)
{
    if (!array_key_exists($code, $this->getData()) && !array_key_exists($text, $this->getData())) {
        Mage::log('"'.$text.'",""', null, 'test.log', null);
    }
}

What I want to do is to check all of the non translated strings for a page. So I would like to have it logged in my test.log file. My script seems to check all just the locale folder from my theme, not the app/locale/de_DE/ files (for instance).
How I can adapt my script to check those files too ?

Thank you


texts:
Im looking to set up a shopping cart price rule.

The sale is:

10% off the first item

20% off 2nd item

30% off 3rd item and each additional item

The price rule would be applied to specific categories and I do not want coupon code used.  I need the discount to be applied at checkout.

Please help as I dont know how to set this up.

Thank you!
Krystle


texts: How to enable a custom shipping method for API in Magento 2?

texts:
We have created a custom shipping method in magento2, It's being added to the JSON response when we fetch the order data as well.

But we are not able to append it in post request JSON of order creation as a new method and carrier code respectively.

Can anyone suggest how can we add it to API?


texts:
When we add product under women catalog when we want to change the product to offline / change to out of stock; when we try to cancel the order;   not success, and showed the below sentence..  How to solve it ? Please.

  Warning: is_file() expects parameter 1 to be a valid path, string
  given in /var/www/html/lib/internal/Cm/Cache/Backend/File.php on line
  508


texts: Magento product Image re-sizing when selecting a product option

texts:
I've got that bug, when i selected a product option on the right, like size, color or anthing, my product image, which is a square, is reduced by 25% or something like this

It's still in the center, still the same proportion, but the image is smaller then the div.
How and where can i fix this ?

my website (online) http://www.cosplay-heaven.com/index.php/cosplay/cosplay-assassins-creed1.html
If you wanna have a try, just click on the link, and select a size for the cosplay and you'll see

Thanks a lot


texts: magento 2 : how to use phtml in cms static block

texts:
I want to make a cms static block which should display/render the content of a .phtml file (echo "Test1"). Content of my cms static block:

<div id="something">
     {{block class="Magento\Catalog\Block\Product\View\Description" name="test" template="product/view/test1.phtml" }}
</div>

something like that. Would this work out ?

Location of "test1.phtml" is in vendor\magento\module-catalog\view\frontend\templates\product\view\test1.phtml

Also: what if I change location of "test1.phtml", how can I write it in {{ ... }} ?


texts: prevent order from showing on screen when clicking print order

texts:
Using Magento 1.9.0.1

When i am logged in as customer and placed an order, upon /checkout/onepage/success/ there is a line of text saying: Click here to print a copy of your order confirmation.

When clicking that link, it shows a (unstyled) page with the order details : /sales/order/print/order_id/3/ AND the "popup" for printing the order.

This also works the same when going in my account and viewing orders...

1) how can i prevent the contents showing on page (unstyled) so it will only show the print popup

2) what file would i need to edit to remove that print option all together from the page after placing the order: /checkout/onepage/success/

3) i also want to show that page as 1 column page would that need to be done on that same page?

Thought i might ask all these questions in 1 post as they are all closely related.

Thanks

Carlo


texts:
I wanna integrate a payment online service in my magento website.

I activate saved CC in payment methods and I get a form to put some informations (like card number and expiration date).

Like this:

But my problem is that I want to make this form open in a secure page and not in that same page (prepared in advance by the bank in charge of payment actions).

How can I change that ?

Thank you in advance for your help.


texts: Configurable products & sub-simple product weight issue

texts:
I am looking at configurable products where each sub-simple product has its own weight (impacting shipping cost)

The weight of the simple products does not seem to be passed on to the configurable product so shipping cost shows up incorrectly in the shopping basket.

When I add-up enough items to reach shipping threshold I conclude that weight of the configurable product must be 1.000

Am I missing a configuration option ??? Can't find any issues like this explained on line so my guess is I am missing something here...

recently installed magento community 1.9.1