texts: How to change Shipping & Handling charges to custom text on order email magento 2

texts:
We need to display the shipping amount to static text "TBD" To be decided.
 I have narrow down to this file vendor/magento/module-sales/Block/Order/Totals.php Line no:124

if (!$source->getIsVirtual() && ((double)$source->getShippingAmount() || $source->getShippingDescription())) {
        $this->_totals['shipping'] = new \Magento\Framework\DataObject(
            [
                'code' => 'shipping',
                'field' => 'shipping_amount',
                //'value' => $this->getSource()->getShippingAmount(),
                'value' => 'TBD',
                'label' => __('Shipping & Handling'),
            ]
        );
    }

But this not work. can anyone have the Idea


texts: Magento 2: Creating dynamic matrix in new/edit product page

texts:
I need to create a custom matrix for every product on Magento 2 product add/edit page. I need to have both the rows and columns to be dynamic so when someone click add button for either row or column there should be a row or column created depending upon his choice.

I tried to find solution for my problem but I don't think Magento 2 supports anything like this however we can only add dynamic rows in Magento 2 but not Dynamic columns either.

So I decided to create a custom block on product page to use third-party extension for achieving my goal and then serializing the matrix data when the save button on product page is clicked and append it to form data somehow and get in my observer/plugin and process it according to my need.

Problems:

I tried to add a custom block in Magento 2 product page by this article but I couldn't see that it's rendered on the page (may be some xml related stuff is updated in M2.2).
Is there really a way we can do so with Magento2? If no then please suggest me how can I add custom block on product page and how to link the matrix data with product form so when I submit it it can be captured on back-end.


texts: 2 Tables ScanHospitals and Scanpricelist not getting added in Magento 1.9...I need correct code to add these tables

texts:
$installer = $this;

$installer->startSetup();

$installer->run("
-- DROP TABLE IF EXISTS {$this->getTable('scanpricelist')};
CREATE TABLE {$this->getTable('scanpricelist')} (
`id` int(11) unsigned NOT NULL auto_increment,
'city' varchar(100) NOT NULL default '',
'scan' varchar(150) NOT NULL default '',
'scan_type' varchar(250) not NULL default '',
'hospital' varchar(250) not NULL default '',
'hospital_price' int(50) not NULL default '',
'bms_price' int(50) not NULL default '',
'consultation_charge' int(50) not NULL default '',
'additional_charge' int(50) not NULL default '',
PRIMARY KEY ('id')
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
");


texts: how to add custom block field data in db from shipping method page in magento 2

texts: I have made block below the shipping method selection block in which I have 2 fields now I want to save the data in database. on which file c I can get the custom field values.


texts: How To change Product Detail Page Image Section Height In Magento2?

texts:
How Can I change Product Detail Page Image Section Height.
I Need To Decrease That Section Height.

i need to fixed this left column height as right column in magento 2 can any one help me how can i change that.


texts: Magento success page (1.9.3.9) is showing weird message (Item has been added to your shopping cart)

texts:
The code message is shown between 'Your order has been received' and 'Thank you for your purchase'. The template success.phtml looks like this:

<?php echo $this->__('Your order has been received.') ?>

<?php echo $this->getMessagesBlock()->toHtml() ?>

<?php echo $this->__('Thank you for your purchase!') ?>

Why is this showing this message? What could be going wrong? Where I should look for?


texts: How can i add Country Name or flag Display on Ordered page Panel Grid?

texts: I need to show Country Name or flag on ordered  page, How can i add custom field on ordered panel grid?


texts: Magento 2 How to show count 0 on mini cart when no product is in cart?

texts: Basically i want to show count on cart when no product is in cart.


texts: Why add UPWARD to a live Magento PWA site?

texts:
I've been hacking my way through PWA Studio and UPWARD, mostly trying to build React PWAs (connected to Magento) without using the tools provided by PWA Studio, so using generic technology like Redux, Apollo Client and Apollo Server (with Express).

Now, when playing around with UPWARD, I understand that it is handy to have UPWARD running together with Venia in development: You'll get a nice hostname and SSL to play with service worker and to skip CORS issues. But other than that, there doesn't seem much added value in using UPWARD, because it doesn't have state (so no middleware-based caching). And out of the box, the Venia setup doesn't require other services except for Magento (so that the proxy-feature of UPWARD isn't needed). Also note that even in development, CORS-issues could be avoided with simple modules like mine (https://github.com/yireo-training/magento2-corshack).

What would be the added value of keeping UPWARD in the Venia configuration when pushing the PWA to production? I've seen some other StackExchange mentions around how to push Venia to a live environment, but they seem to be repeating the assumption that UPWARD is needed. Am I overseeing some additional benefit of UPWARD?

To put it differently, I've been playing with modifying the apiBase constant in Venia's index.js and replacing it with a regular Magento instance and this seems to run fine. But why wouldn't I make this adjustment?


texts:
I recently started using Lesti FPC in one of my M1.9 sites and for the most part it works pretty well.

But I came across an issue with customer login/logout.

To better explain the issue, let's say there are 2 customers.

The 1st one logs in and searches for "PANTS" and gets some results, but then logs out and leaves the site.

Then the 2nd customer visits some product page (e.g. "T-SHIRT") and then logs in.

After logging in, he should be redirected back to the T-SHIRT product, but he's instead being redirected to the search results of the previous logged in customer.
So I presume that either the referrer url gets cached on the customer login form or the previous customer session gets cached and is then resumed after the 2nd customer logs in.

I've tried setting the customer_form_login block as lazy or dynamic and tried setting a refresh action customer_account_loginPost, but it's not working.
I've also tried various other combinations, but none have worked so far.

Any ideas what causes this issue or how to solve it?


texts: Magento 2 : How to create Store Configuration multiselect with Payment methods

texts:
I want to create a multiselect in the admin area which lists out payment methods.

Has anyone got any experience of this?

Just need system.xml and source model if applicable.  I can sort rest.


texts: Success.phtml - how to trigger affillate script based on product-ID ordered by customer?

texts:
First of all - I'm not a developer..I´ve tried google, but can't seem to find out how to do this..

I need to add a function to my success.phtml that triggers a spesific tracking script that I got from my affilate provider.
I have two different tracking scripts, where the first script should be triggered if a customer purchased a product where the product ID matches one these ID's "19, 76, 84, 85, 86, 95" , and another script that should be triggered if the customer don't buy any of the mentioned products..

--
I've tried to add this to my success.phtml, but this obviously dosen't work. Could someone be an angel and help me sort this out?

<?php
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
$items = $order->getItemsCollection();

$sku = $ids = array();
foreach($items as $item){
  $p_ids[] = $item->getProductId();
}

$p_id = 19, 76, 84, 85, 86, 95;
?>

<?php if(in_array($p_id, $p_ids)){
   //run script 1
   <script type="text/javascript" src="https://track.adtraction.com/t/t?t=1********************************************************"></script>
} else {
    //run script 2
   <script type="text/javascript" src="https://track.adtraction.com/t/t?2********************************************************"></script>
}
<?php endif;?>


texts: How to show categories in Layered Navigation magento 2 ( always )

texts:
I am trying to add all categories in Layered Navigation after clicking on one to the categories.

Now I can see all in the first page, after clicking I can't see any categories in Layered Navigation.

Please check here below the pic.


texts: Timeout accessing SOAP API (Magento 1.9.x) after clearing caches

texts:
I've been running into this issue multiple times now—whenever I either,

Delete the cache folder for Magento (in my case, /tmp/magento/var/cache/);
Turn off WSDL caching in Magento (under System > Configuration > Services > Magento Core API > Enable WSDL Cache); and/or,
Turn off WSDL caching from the SOAP client's side (via PHP)

I keep hitting a connection timeout error reaching the SOAP server, whether 2, 3 or more minutes.

I've been testing the SOAP client calls with a PHP script from my local server (localhost, Mac with Homebrew—running Nginx/PHP 7.1), while I'm running Magento in a Vagrant instance (Ubuntu, running Apache2 + PHP 7.0—on 33.33.44.10). Currently my test script:

<?php
ini_set('max_execution_time', 300);
ini_set('default_socket_timeout', 300);
ini_set("soap.wsdl_cache_enabled", 0);

// Forwarding the Vagrant/Magento server over 33.33.44.10:
$client = new SoapClient('http://33.33.44.10/api/v2_soap/?wsdl', array(
    'trace' => 1,
    'connection_timeout' => 180
));

// Timeout happens here at the line below:
$sessionId = $client->login('testuser', '123456');

$result = $client->catalogProductCustomOptionList($sessionId, 39);
$resultXml = $client->__getLastResponse(); ?>

If I call http://33.33.44.10/api/v2_soap/?wsdl directly in my browser, it loads fine—but apparently not in the script.

Any clues?


texts:
I'm having some problems running di:compile, when running it stops at 57% with one error in braintree an braintreegraphql.

Those modules are both disabled, but the problem is still there.
I«m running magento 2.3.4 and all is working but the compilation.

Running compilation:

Compilation was started.
Interceptors generation... 4/7 [========>-----] 57% 19 secs 259.0 MiB
In Generator.php line 139:

  Class Magento\Braintree\Gateway\Config\Config does not exist
  Class Magento\BraintreeGraphQl\Model\Resolver\CreateBraintreeClientToken\Interceptor generation error: The requested class did not generate properly,
  because the 'generated' directory permission is read-only.

If --- after run
ning the bin/magento setup:di:compile CLI command when the generated di
rectory permission is set to write --- the requested class did not generate
properly, then you must add the generated class object to the signature of
the related construct method, only.

Hope someone can help me, since i found some solutions but none worked..

Thanks in advance,

Best regards,

Leonel Nunes


texts: I want to add a password to access to the frontend ONLY for one store of my multi-stores

texts:
I have a multi-stores who contains 2 different store.
One store is OK and is in production.
The second store is ine developpement, and I would like to add a password to avoid people to see it during the developpement.

Please could you explain to me how to do that?

Thank you.


texts: Magento 1.9 Action Handle not Identified

texts:
I'm facing a problem developing Magento 1.9 custom module. Magento somehow doesn't recognize the action handle in my module's layout XML file. Below is simplified code that reproduces the problem for me.

Namespace: MAX
Module Name: News

app/code/local/MAX/News/etc/config.xml

<config>
    <frontend>
        <routers>
            <max_news_news>
                <use>standard</use>
                <args>
                    <module>MAX_News</module>
                    <frontName>news</frontName>
                </args>
            </max_news_news>
        </routers>
        <layout>
            <updates>
                <news module="MAX_News">
                    <file>max_news.xml</file>
                </news>
            </updates>
        </layout>
    </frontend>
    <global>
        <blocks>
            <news>
                <class>MAX_News_Block</class>
            </news>
        </blocks>
    </global>
</config>

app/code/local/MAX/News/controllers/IndexController.php

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

app/design/frontend/base/default/layout/max_news.xml

<?xml version="1.0"?>
<layout version="0.1.0">

    <news_index_index>
        <reference name="content">
            <block type="news/featured" name="max_news_featured" template="max_news/featured.phtml"/>
        </reference>
    </news_index_index>
</layout>

app/code/local/MAX/News/Block/Featured.php

class MAX_News_Block_Featured extends Mage_Core_Block_Template
{
    public function getModData()
    {
        return array('ok', 'it', 'worked');
    }
}

app/design/frontend/base/default/template/max_news/featured.phtml

Block template

<?php var_dump($this->getModData()) ?>

Problem:
My custom block doesn't show up on http://site.dev/news. But if I change the handle from <news_index_index> to <max_news_news_index_index>

(<namespace>_<module>_<frontname>_<controller>_<action>), it shows up. I cannot figure out where I went wrong. Might be something trivial.

I've inspected addActionLayoutHandles() and it indeed adds handle as max_news_news_index_index as a result of following line

app/code/core/Mage/Core/Controller/Varien/Action.php

$update->addHandle(strtolower($this->getFullActionName()));

I've error reporting turned on and magento is in developer mode. I'm seeing no exceptions on frontend nor in logs.

Any help would be really appreciated.

Thanks.


texts: How can I add a different static block to each paginated page in my catalog?

texts:
Right now I have a static block with content on each of my category catalog pages.

When users page through the paginated catalog results, the block is static and does not change content.

I would like to create say 3 or 4 static blocks per category, and assign them to the first 3 or 4 pages in the paginated results.

So page 1 would display static block 1. Clicking on page 2 would now display static block 2, and so on.

Is there a way to conditionally render static blocks based on the URL or path?


texts: How to write redirections in .magento/routes.yaml (regex)?

texts:
Our site has two websites with different domains. For security reasons, we want to sanitize the URl which has  tags. I am not sure how to add a case insensitive redirection applicable for both domains for this scenario in routes.yaml through the regex.
Example:
Domain 1: www.domain1.com
Domain 2: www.domain2.com
I want the URLs which has  tag in it either in the path or as a query string to be redirected to the specific domain home page.

www.domain1.com/cms/\<script>     --->  www.domain1.com

www.domain2.com/test?\<script>    --->  www. domain2.com


texts: Magento 2 Category Position wise product not display

texts:
I have trouble in Magento 2 default setting. They have not provided by product position wise list in category page if "Is Anchor" is set to Yes.
If  "Is Anchor" is set to No then list works perfect by position wise.


texts:
I set up my magento 2.3 on localhost via Xampp and all works perfectly.
I transferred magento forder and imported the database on server phpmyadmin
I changed The core_config_data base URL and edited correctly the env.php informations

When I Search the store address in browser, it redirects me to Localhost (127.0.0.1)
If I clean the Var/cache folder, I can finally access to the live store, but all CMS seems to be down and the store frontend aspect completly destroyed.

Any solution for this issue ? is it a matter of htaccess ? Why does the store design turns down each time I clear the cache ?
Thank you for your advices


texts: magento 2 can't use same url key for different store view pages

texts:
I have 2 store view on my website, one in English and one in Italian, I'm trying to set different privacy and cookie page for each view, but I need to use the same url key, to autoredirect to the right page.

But when I try to set the url on the differente page view I get this error:

  URL key for specified store already exists.

I read here how to do, but It doesn't works


texts:
Quick question. Does anyone know if I can upgrade my Magento 2.2.5 straight into 2.4, or do I have to first upgrade to 2.3.x? I know there are some packages that 2.3.x needs that I have to install as well, but assuming I have all the dependencies and other requirements in check, will there be any issues from jumping from 2.2 to 2.4?
Thanks.


texts: How to modify the Discount caption in shopping cart

texts:
If I apply 2 discount codes, I end up with a caption in my sub-total area will be :

Discount (discount number one, discount number two)

with the discount labels in brackets and separated by a comma

I want them as below

Discount
   - discount number one
   - discount number two

With the discount labels shown as a list

I can't locate which file is doing this generation of the Discount label.

It is for use in Magento EE


texts: How to add radio button value in email template magento2

texts:
Blockquote

i have added radio button in contact form.but unable to fetch value in email template.anyone knows??


texts: How to get the product ID in Magento 2 plugin

texts:
Hi all I am using Magento 2 and I want to get the product Id on all pages.
Now i amable to get the product id in product details pae (Product single page). but i am not getting those in product listing pages. it says calling undefined object like error message.

 <?php

namespace Vendor\module\Plugin;

class Product
{
public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result)
{
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager
    $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');

    $product- = $objectManager->get('Magento\Framework\Registry')->registry('current_product');//get current product
    // here this $product is seems like undefined only in product listing pages.

    return $result + 100;
}
}

Please see comment in my code,  how can I get the product id here?
Please help.


texts: Need help with collection joinField() - Magento 2

texts:
Can anyone describe how to use joinField() method of collection (Magento\Eav\Model\Entity\Collection\AbstractCollection).

I actually don't know what means each argument:

public function joinField($alias, $table, $field, $bind, $cond = null, $joinType = 'inner')
...

Great Thanks!


texts:
It's a really simpel question but I'm struggling to long on this one so I'm dropping the question here hoping someone could help me...

I want to get all the subcategories from a parent categorie (this one I got, I can choose the categorie id and I get all the subcategories). But I want to retrieve also the images from those subcategories. I have this in the .phtml file which is loaded on the homepage. So far I got this piece of code:

            <?php
            $category_childs = Mage::getModel('catalog/category')->getCategories(3);
        ?>

        <?php if($_productCollection->count()): ?>

<?php echo $this->__($this->getBlockTitle());?>

                <a href="#" class="jcarousel-prev-horizontal" id="shopper_carousel_prev<?php echo $time; ?>">
                <a href="#" class="jcarousel-next-horizontal" id="shopper_carousel_next<?php echo $time; ?>">

            <ul id="featured_<?php echo $time; ?>" class="products-grid jcarousel-skin-tango clearfix">
                <?php foreach ($category_childs as $_category): ?>

                        <a href="<?php echo $_category->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>" class="product-image">
                            <?php echo $this->helper('shoppersettings')->getLabel($_category);  ?>
                            <img id="product-collection-image-" src="<?php echo $this->helper('catalog/image')->init($_category, 'small_image')->resize($imgX, $imgY) ?>" data-srcX2="<?php echo $this->helper('catalog/image')->init($_category, 'small_image')->resize($imgX*2, $imgY*2) ?>" width="<?php echo $imgX; ?>" height="<?php echo $imgY; ?>" alt="<?php echo $this->htmlEscape($_category->getName()) ?>" />

                            <?php $_categoryNameStripped = $this->stripTags($_category->getName(), null, true); ?>

<a href="<?php echo $_category->getProductUrl() ?>" title="<?php echo $_categoryNameStripped; ?>"><?php echo $_helper->productAttribute($_category, $_category->getName() , 'name'); ?>

                <?php endforeach; ?>


texts: How to setup LavaPay extension for Magento

texts:
I want to setup LavaPay extension for Magento, I install the extension I add the ID but I don't know what I need to do next.

I have this URL: https://www.lavapay.com/en/developers/sci/index.html

and here is the extension for Magento: https://www.lavapay.com/en/developers/shop-systems/magento/index.html

I create movie to understand how is look the error: http://screencast-o-matic.com/watch/cDnjYyh90a


texts: magento2, rest API, Auth 1.0 oauth_problem=The+signature+is+invalid.+Verify+and+try+again, BUG

texts:
i have problem with oauth_problem=The+signature+is+invalid.+Verify+and+try+again.
https://github.com/magento/magento2/issues/19159?fbclid=IwAR3D_BJokrXw8qP7cDOOjhF7r3uBSe50D31ej7qWXopQdIPwHqf9OW4PMsc
Is it so?
And is it possible to fix it somehow?
Or maybe I misunderstood something and make a mistake somewhere


texts: How to edit the footer links in magento 2

texts:
I want to edit the Footer links in Magento 2. I have installed magento 2.0.2(with sample data). At backend, when I go to content/blocks I don't see any blocks there (the page is empty with no blocks). But when I open the frontend , footer links are available.I don't know from which file are they coming from.
Someone please guide me with explanation to edit and rearrange the footer links.


texts: magento new order send mail not work in 1.9

texts:
When create a order mail not received Admin only received by user for order..
i try to change cron setting but not working yet..please give me answer is that default magento problem?


texts: How to get Shipping method name and shipping price in onepage checkout

texts:
I am trying to get shipping address title and shipping price for the selected shipping method in onepage checkout at the section 'Shipping methods' so that I can show those to my customer at the section "Payment methods" in onepage checkout which is just the next step after selecting 'shipping methods'.

Can someone help me to get shipping label and price in 'payment methods' section of onepage checkout.


texts:
I am using Magento ver. 1.6.2.0 and Payflow Express checkout.
I am not able to continue to paypal payment when I use percentage discount coupon.

Its working fine with the fix amount coupon.

Its always showing me following error.

  PayPal gateway rejected the request. Field format error: 10431-Item amount is invalid.

I already tried to change the roundPrice decimal to 4 from 2.

Can anyone help me to fix this issue?


texts: Magento 2.3, patch PRODSECBUG-2198-2.3-CE-2019

texts:
Having difficulty applying this patch using git apply, as returns missing directories because our magento was installed using composer, so does not have lib/internal/magento.

How can I apply this patch?


texts:
Magento 2 search 3 characters with hyphen not working
Example -
product SKU is 4-e - it gives lots of search results instead of related to 4-e results(not giving related with 4-e)
there is no description,short description, and even no attributes related to 4-e
I checked view page source no related with 4-e
The same thing is working fine in my localhost and but it is not working with live server.
Does anyone know how to solve this?


texts: What's the best way to count the results of a custom search

texts:
I use this code :

$queryText = 'test';
$query = Mage::helper('catalogSearch')->getQuery();
$query->setStoreId(Mage::app()->getStore()->getId());
$query->setQueryText(Mage::helper('catalogsearch')->getQuery()->setQueryText($queryText));

$collection = $query->getSearchCollection();
$collection->addSearchFilter(Mage::helper('catalogsearch')->getQuery()->getQueryText());
$collection->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes());
$collection->addAttributeToFilter('status', 1);

to make a custom search collection.
I don't want to have a full collection, but only to count the number of results.

What's the best way to make this ?
Thanks a lot.


texts: Check if Invoice can be refunded online programmatically

texts: Is it possible to check programmatically if an given invoice can be refunded online via a payment gateway like Paypal/Braintree?


texts:
i need to upload the file of downloadable products via ftp because are video and are big, upper 2gb.
So in downloadable information i need to put the url of file but i try different test but somethings wrong, the link is always invalid.
Someone can explain me some solution of this problem?
If i put the file into directory /media/downloadable/files/ what is the exactly url i need to write in Products info.

Thanks


texts: when create on add Product then default automatic set customization option is open and radio button selected with three radio options ?


texts:
I need to override _colors.less to change color on admin backend.

The file is here : vendo/theme-adminhtml-backend/web/css/source/variables/_colors.less

I don't find solution to do it, I need to make it in custom module, to separate the core from custom.


texts: SUPEE-5344 and SUPEE-1533 solution for magento ce-1.3?

texts: Reading about those security risks, I wonder if there is something I can do for clients with 1.3 ce stores, where upgrade will require a new theme development.


texts: How to get the Magento 2 SITE URL inside a module?

texts:
I want to send POST request from my magento 2 module to a Rest API with details like site URL.
Example: if my site is http://thisisademostore.com.
I should get this value inside my module.


texts:
How to create custom address renderer with the following template in one line
{{var street}}, {{var city}}, {{var region}} {{var postcode}}, {{var country}}

I can't change the native address templates, because they are used for order view pages, pdf, etc.

When i try

$renderer = Mage::helper('customer/address')->getRenderer(Mage_Customer_Model_Address_Config::DEFAULT_ADDRESS_RENDERER);
$renderer->render($address, $format);

i catch Fatal error:  Call to a member function getCode() on a non-object in <b>app/code/core/Mage/Customer/Block/Address/Renderer/Default.php on line 85


texts: problem adding items to cart from outside magento

texts:
I'm having this problem and getting pretty annoyed by it.

here's the situation.

I was running a website on the codeigniter framework, and our customer wanted to add a shop to sell a couple of products. I decided to try to use magento, since its widely used and the documentation seemed ok.

My test setup on my local machine looks like this.

"localhost/project/" is the website root, where the codeigniter installation files are.

I added a new folder "store" to the root and installed magendo 1.9.2.2 into it. The magento installation runs as baseurl 127.0.0.1

Now i tried to add products from a codeigniter library to a magento cart via the following code:

require_once 'store/app/Mage.php';
umask(0);
Mage::init('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));

// Get customer session
$session = Mage::getSingleton('customer/session');

// Get cart instance
$cart = Mage::getSingleton('checkout/cart');
$cart->init();

// Add a product with custom options
$productInstance = Mage::getModel('catalog/product')->load($productId);
$param = array(
    'product' => $productInstance->getId(),
    'qty' => 1,
);
$request = new Varien_Object();
$request->setData($param);
$cart->addProduct($productInstance, $param);

// update session
$session->setCartWasUpdated(true);

// save the cart
$cart->save();

Seemed pretty straigforward. no errors or anything. I can verify that the adding works by

$cart->getItemsQty();

It shows the right amount of items.

But whenever I try to switch to the cart in the store itself using

Mage::helper('checkout/url')->getCheckoutUrl()

It is empty.

The interesting part is, I can get all the info I need from magento, but I cant seem to add anything to a cart.

Im guessing it has something to do with sessions getting mixed up.

EDIT:
Mage::helper('checkout/url')->getCheckoutUrl()
delivers something like

  http://127.0.0.1/project/store/index.php/checkout/onepage/?SID=5068c0335528f0713360cc3d6b302f8481ebb732

where as 5068c0335528f0713360cc3d6b302f8481ebb732 is the codeigniter session id. so im guessing the code never creates a magento session at all and links to a cart that with the CI session and not a magento session?

EDIT2:
i think im getting closer to the root of the problem. after printing the data for the magento session with
echo print_r($session->getData());

im getting the following

Array ( [_session_validator_data] => Array ( [remote_addr] => ::1 [http_via] => [http_x_forwarded_for] => [http_user_agent] => Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36 ) [cart_was_updated] => 1 [id] => ) 1

the curious part for me is that the 'id' is empty. so i think the session is just not created correctly.


texts: Call default Magento 2 authentication popup from a custom module

texts:
I would like to call the existing authentication modal popup built into Magento 2 from a custom module. It must already be in the body somewhere since it can readily be called by clicking the checkout button when not logged in (guest checkout is disabled).

I found this javascript code in my source,

**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
/*jshint browser:true jquery:true*/
/*global alert*/
define(
    [
        'jquery',
        'ko',
        'Magento_Ui/js/form/form',
        'Magento_Customer/js/action/login',
        'Magento_Customer/js/customer-data',
        'Magento_Customer/js/model/authentication-popup',
        'mage/translate',
        'mage/url',
        'Magento_Ui/js/modal/alert',
        'mage/validation'
    ],
    function($, ko, Component, loginAction, customerData, authenticationPopup, $t, url, alert) {
        'use strict';
        return Component.extend({
            registerUrl: window.authenticationPopup.customerRegisterUrl,
            forgotPasswordUrl: window.authenticationPopup.customerForgotPasswordUrl,
            autocomplete: window.checkout.autocomplete,
            modalWindow: null,
            isLoading: ko.observable(false),

            defaults: {
                template: 'Magento_Customer/authentication-popup'
            },

            initialize: function() {
                var self = this;
                this._super();
                url.setBaseUrl(window.authenticationPopup.baseUrl);
                loginAction.registerLoginCallback(function() {
                    self.isLoading(false);
                });
            },

            /** Init popup login window */
            setModalElement: function (element) {
                if (authenticationPopup.modalWindow == null) {
                    authenticationPopup.createPopUp(element);
                }
            },

            /** Is login form enabled for current customer */
            isActive: function() {
                var customer = customerData.get('customer');
                return customer() == false;
            },

            /** Show login popup window */
            showModal: function() {
                if (this.modalWindow) {
                    $(this.modalWindow).modal('openModal');
                } else {
                    alert({
                        content: $t('Guest checkout is disabled.')
                    });
                }
            },

            /** Provide login action */
            login: function(loginForm) {
                var loginData = {},
                    formDataArray = $(loginForm).serializeArray();
                formDataArray.forEach(function (entry) {
                    loginData[entry.name] = entry.value;
                });

                if($(loginForm).validation()
                    && $(loginForm).validation('isValid')
                ) {
                    this.isLoading(true);
                    loginAction(loginData, null, false);
                }
            }
        });
    }
);

Then tried to call it from a link in my custom.phml file:

Log in or create an account for additional features.

This just gave me an error that top wasn't defined. How can I call this popup from a custom module?


texts: Get option selected image for conformation email attached

texts:
I like to get selected option image of swatch option, for design email template. Now i'm getting a parent image instred of selected image.
Eg:
  in my website parent image is black color, i choose swatch option in red colour.
In order conformation email template parent image ie., black colour image was displaying. i like to get selected (red colour) image.

Thanks.


texts: Magento 1 custom Model, Can't get data from table

texts:
I created my own module, the table is created in the database and in a phtml I can call:

$res = $model->getExample();

and effectively it function is called.

In Model:

protected function _construct() {
    $this->_init('table_name', 'column_id');
}
public function getExample(){
    $result = $this->getData();
}

but 'result' is empty and I know there're data in a database, so... what's the problem?

CLUES

gettype($this) // is object

$this->load() // Call to a member function load() on a non-object


texts: Magento 1.9 observer on only new product added ( no updated product )

texts:
I need an observer when a new product is added, I don't need one when a product already exists and it is updated.
I found catalog_product_save_after and _before but this is triggered when a product is saved.
Is there a way to get Magento knows when a product is new?


texts:
Installed language pack for magento, but getting error on Current Configuration Scope 404 page not found. However I have all 3 languages also don't work and getting the same message every time.

Please see images for the steps and error occur when clicking on current configuration scope from dropdown list.


texts:
I want to display language and currency option in registration form so that when user login he get the home page in the language that he selected.
whether it is possible using admin?
Or I have to write code.
Thanks in advance.


texts: Magento 2 - mage/url is not working in module. Uncaught ReferenceError: url is not defined

texts:
I am running the Magento 2 on the localhost server. http://127.0.0.1/magento3
here I've built a custom module for payment gateway.
In custom JS I want to use the mage/url.
I need to use ajax for the checkout process. Below is the code where I want to get use url.build.

But I get,

  Uncaught ReferenceError: url is not defined in the console for console.log(url.build) ;

Also, I've got a function method where I want to use the ajax in Custom JS file at PATH
app\code\vendor_name\module_name\view\frontend\web\js

       "IOST",
       "jquery",
       "mage/url"], function ($,url) {
       console.log(url);
   });
   function transfer () {
       console.log(url.build);
   }

Button at this path with which i used to call the transfer() method.
app\code\vendor_name\module_name\view\frontend\web\template\payment
CODE

</button>

FILE:-
requirejs-config.js
CODE:-

    map: {
        '*': {
            lazyloadScript:'vendorname_modulename/js/custom_func'
        }
    }
};```

Does anyone know how to do it?

Thanks in advance.


texts: How to create Main Navigation with Product Attribute instead of category menu, like: Brand or Manufacture and product count will be added also?

texts:
I want a navigation menu build with a specific product attribute in magento 1.9.2 and product count will also show there like: Samsung (14) Hyundai (13) Asus (44)

Can any one great help me please and many many thanks in advance.


texts: Custom store view range attribute can't be modified in admin panel

texts:
The problem : I used a custom attribute : store view scope, dropdown type, no unique values, no values required.

For an unknown reason, I can modify the value of the attribute options only until a specific option (and even a specific store value). Every modifications applied after this option are not take into account, but the previous one are. Every option has a position at 0. If I modified the position of a modifiable option  to put it at 1 (for a modifiable value option) it is take into account, but this specific option will now appear at the end of the list, so after the problematic option, and will not be modifiable anymore.

Question : How can I fix this ?

Additional information :

I have already tried this solution :
Global product attribute empty on store view level
with no result (I have modified the is_global parameter because I use a store view scope, and applied the request to every tables specified, but nothing)
I've dumped the mysql requests generated and I've noticed that the transaction delete each values and the set them again everytime you save, even if they have not been modified. I can clearly see that the transaction simply finished at this problematic value, whereas there is much more after :

 108 Query  DELETE FROM `eav_attribute_option_value` WHERE (option_id =350)
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('350', '0', '6L2L1')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('350', '6', 'qsd')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('350', '3', 'qsd')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('350', '4', 'qsd')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('350', '2', 'qsd')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('350', '5', 'qsd')
          108 Query UPDATE `eav_attribute_option` SET `sort_order` = '0' WHERE (option_id =213)
          108 Query DELETE FROM `eav_attribute_option_value` WHERE (option_id =213)
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('213', '0', '6L4C')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('213', '6', 'qsd')
          108 Query INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES ('213', '3', 'qsd')
          108 Query UPDATE `eav_attribute` SET `default_value` = '375' WHERE (attribute_id ='135')
          108 Query SELECT `main_table`.* FROM `index_process` AS `main_table`
          108 Query SELECT `core_flag`.* FROM `core_flag` WHERE (`core_flag`.`flag_code`='catalog_product_flat')

Those attribute options are added by a script which import the products. It only import the admin value, then we have to set the store values. I've done my tests on a dev environnement with a backup, and since a few products have been added in production environnement, with new options. The problem is still the same, but the limit is now before the one of the backup, probably because a few option has been added after and before the previous limit.

I've reach the limit of my magento database and code knowledge here, and I would be really glad if you could help me with this problem. I also apologize in advance for my english, I'm not native.


texts:
I have created a custom module. The custom.phtml file lists all the products of a category and subcategory. I want to place toolbar with sort by price on the top of the category.

I have included the toolbar using the following code in custom.phtml.

$category = new Mage_Catalog_Model_Category();
$category->load($catid); // My parent category id is 15
$prodCollection = $category->getProductCollection()
                      ->addAttributeToSort('name', 'asc');  //gives me collection of products from parent as well as products of subcategory

$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
$toolbar->setCollection($_productCollection);
$toolbar->setChild('product_list_toolbar_pager');

echo $toolbar->toHtml();

List and grid view is working but Sort by is not working in custom phmtl Collection to pass to toolbar to work??.


texts: Magento 2 - Importing LESS mixins/variables from lib

texts:
Explanation

I'm really not a fan of loading all the CSS on every page regardless of whether it's required, to me this is bad practice. Therefore I am creating CSS files for certain areas, e.g homepage.css, account.css, product-page.css.

My problem is I now need to import Magento 2's variables and mixins, especially the media queries and media-common variables.

My Code

I have tried adding the below code to my LESS file but it returns an error, I have also tried reverse paths (../) but this didn't work and apparently is forbidden for security reasons (read in the Magento2 repo).

This is app/design/frontend/PartyShowroom/default/Magento_Cms/web/css/homepage.less.

// As this file is not imported we need to import the variables/mixins etc.

@import 'source/lib/_responsive.less';

@media-target: 'mobile'; // Sets target device for this file
@media-common: true; // Sets not to output common styles

@import 'source/_theme.less';

// My custom less being imported
@import 'layout/homepage/_homepage-carousel.less';
@import 'layout/homepage/_homepage-themes.less';

This still returns the error:

NameError: variable @media-common is undefined
in _homepage-carousel.less on line 4, column 9:

//  _____________________________________________
& when (@media-common = true) {

Yet the same code works in vendor/magento/theme-frontend-blank/web/css/styles-l.less despite the lib not being in the same directory.

Question

How can I import the mixins/variables from lib into my own custom CSS file?


texts: Magento 2: Mailchimp Ecommerce Configuration

texts: Has anyone any idea about the use of E-commerce Configuration in MailChimp for Magento 2? https://prnt.sc/no95d5


texts: Webservice Magento integration with SUPPLIER CROSS DOCKING

texts:
I am trying to connect my magento to WEBSERVICE my Supplier
but I have no knowledge of how to
Make an import of vendor inventory of products and connect applications approved so called CROSS DOCKING

My supplier casette following date has the SOAP 1.1 and SOAP 1.2

http://wspub.allnations.com.br/wsIntEstoqueClientes/ServicoReservasPedidosExt.asmx?op=RetornarListaProdutos

Integrating the stock with my supplier of my store for webservice connection
I have these data given by more Supplier do not know what to do

http://wspub.allnations.com.br/wsIntEstoqueClientes/ServicoReservasPedidosExt.asmx/RetornarListaProdutos

thanks for help!


texts: Add last 4 digits and type of card to Payment Information in admin view order

texts:
After customer create order with Authorize.net, the info in Payment Information in admin view order says "Credit Card Direct Post (Authorize.net) The order was placed using USD.".
How can I add type of card and last 4 digits to this block also?


texts: Category page, static block and layered navigation

texts:
On Magento 1.9 I have a category page with produts and static block.

For static block I used a block type="catalog/product_list with a custom template.
In the html template I loaded a custom productCollection to filter on a specific category (different from category page).

<?php
$_productCollection = Mage::getModel('catalog/product')->getCollection()
->joinField('category_id','catalog/category_product','category_id','product_id=entity_id',null,'left')
->joinField('rating_summary', 'review/review_aggregate', 'rating_summary', 'entity_pk_value=entity_id',  array('entity_type' => 1, 'store_id' => Mage::app()->getStore()->getId()), 'left');
$_productCollection->addAttributeToSelect(array(
                                   'image',
                                   'small_image',
                                   'name',
                                   'short_description',
                                   'rotator_image',
                                   'formato',
                                   'author',
                                   'artist',
                                   'regista',
                                   'formato',
                                   'showpercdiscount',
                                   'sort_order'
                   ))
                   ->addFieldToFilter('visibility', array(
                               Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
                               Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
                   )) //showing just products visible in catalog or both search and catalog
                   ->addFinalPrice()
                   ->addAttributeToFilter('category_id', '498')
//                   ->addAttributeToFilter('attribute_set_id','9')
                   ->addAttributeToSort('sort_order', 'asc') //in case we would like to sort products by price
                   ->getSelect()
//                   ->where('price_index.final_price < price_index.price')
                   ->limit(8) //we can specify how many products we want to show on this page
//                        ->order(new Zend_Db_Expr('RAND()')) //in case we would like to sort products randomly
                   ;

Mage::getModel('review/review')->appendSummary($_productCollection);

$_helper = $this->helper('catalog/output');
?>

When I try to sort, change pagination or use layered navigation, Magento changes also the product list in the static block.
Why?


texts: edit grid in admin section is not showing

texts:
I have a grid from a custom module in my admin section which displays users that fit a specified criteria. When I click on one of those users to edit details I am transferred to a blank content area where I would expect to see a form.

I have gone over my code and what I understand to be correct and have changed the _blockGroup to = [module], [namespace], [module_namespace] but don't have any success.

class Ps_Prefs_Block_Adminhtml_Prefs_Edit
extends Mage_Adminhtml_Block_Widget_Form_Container
{
public function _construct()
{
    parent::_construct();

    $this->_objectId = 'id';
    $this->_blockGroup = 'prefs';
    $this->_controller = 'adminhtml_prefs';
    $this->_mode = 'edit';
}

config.xml

<config>
.......
    <admin>
    <routers>
        <adminprefs><!--arbitary name but needs to be unique-->
            <use>admin</use>
            <args>
                <module>Ps_Adminprefs_AdminprefController</module>
                <frontName>admin</frontName><!--admin works!but all other custom admin modules fail! adminPrefs produce 404! -->
                <modules>
                    <Ps_Prefs after="Mage_Adminhtml">Ps_Prefs_Adminhtml</Ps_Prefs>
                </modules>
            </args>
        </adminprefs>
    </routers>
</admin>
........
</config>

adminhtml.xml

<config>
<menu><!--adds menu item called prefs > example onto the admin menu bar-->
    <customer>
        <children>
            <Prefs translate="title">
                <title>Prefs Centre</title>
                <sort_order>90</sort_order><!--sets the prefs towards the end of the list-->
                <action>adminhtml/adminprefs</action>
            </Prefs>
        </children>
    </customer>
</menu>
........
<layout>
    <updates>
        <prefs>
            <file>prefs.xml</file>
        </prefs>
    </updates>
</layout>

Ps_Prefs_Adminhtml_AdminprefsController

public function editAction()
{
    $model = Mage::getModel('prefs/prefs');
    Mage::register('prefs_data', $model);
    $id = $this->getRequest()->getParam('id');

    try {
        if ( $id ) {
            if ( ! $model->load($id)->getId() ) {
                Mage::throwException($this->__( 'No record with that ID "%s" found', $id ));
            }
        }

        if ( $model->getId() ) {
            $pageTitle = $this->__('Edit %s (%s)', $model->getName(), $model->getType());
        } else {
            $pageTitle = $this->__('New User');
        }

        $this->_title($this->__('Customer'))
             ->_title($this->__('Preference'))
             ->_title($pageTitle);

        $this->loadLayout();
        $this->renderLayout();
    }

    catch (Exception $e) {
        Mage::logException($e);
        $this->_getSession()->addError($e->getMessage());
        $this->_redirect('*/*/');
    }
}

I believe it is in the edit file but I have added the other files incase it helps with a solution.

===

EDIT

===

the problem was with the config. The below works

<admin><!--new way to define an admin route-->
  <routers>
     <prefsadminhtml>
        <use>admin</use>
        <args>
            <module>Ps_Prefs_Adminhtml</module>
            <frontName>admin</frontName>
           <modules>
              <syntax after="Ps_Prefs_AdminprefsController">Mage_Adminhtml</syntax><!--what is this syntax node mean? -->
              <prefsmodule before="Mage_Adminhtml">Ps_Prefs_Adminhtml</prefsmodule>
           </modules>
        </args>
     </prefsadminhtml>
  </routers>


texts: How to check whether a product is in the cart?

texts:
How to create a module that will check if there is an item in the basket?
Verification is needed on the product page.


texts:
how to add a prefix to a product attribute value?.
i want to add a prefix to a product attribute.
for example: i have an attribute named general_weight with a number value: 1000 . i want to add a prefix like: Kg to its value. i want it to be shown this way:

General Weight: 1000 Kg .

how to do that?
i will thankful if you experts help me with this.


texts:
I'm upgrading from 1.7.0.2 to the latest (1.9.2.4) and I seek to have as little template customization as possible.

Following a guide that made the most sense to me, I performed a mysqldump of production 1.7.0.2 site and restored to local dev server with same db name, user, etc. I got the latest Magento code. I navigated to the internal webserver and went through the install procedure and got the generic store view with the dog we all know. Surprisingly, everything seemed to go well: current orders showed up, the same nagging messages are in admin, etc etc.

I read Alan Strom's parent/child theme blog, went through the steps and got the "blank" or "broken css" look he gets but then I couldn't get the "modern" theme to show up:

I did add a theme directory and change from the previous a304 template master theme to this name. There have been no extensions or template files copied.

My goal is the most plain and simple 2 column layout with the minimum number of files. I let a dev friend talk me into modding the template when we first adopted Magento in 2011 and that is the biggest mistake ever. Even with github version control, upgrading the site isn't fun.

Any thoughts on where to start digging around?


texts: Algolia REST Api's to apply category, Price and Brand filters using PHP curl process on Algolia?

texts:
I Have sample curl code, It is working perfectly but I don't know, how to apply filters on category, price, and brands to get all products list. we are using algolia REST API's.

$APPI_ID = "xxxxxxxxxxxxxx";
$APPI_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
$url ="https://xxxxxxxx-dsn.algolia.net";
$headers =  array(
'X-Algolia-Application-Id: '.$APPI_ID,
'X-Algolia-API-Key: '.$APPI_KEY
 );
//GET /1/indexes/{indexName}
$ch = curl_init($url."/1/indexes/staging_default_products?query=Avalon");
 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 $result = curl_exec($ch);
 $result = json_decode($result, 1);
 //var_dump($result);
 print_r($result);


texts: In a PHTML template, how would I determine if the module rendering me is a specific module?

texts:
For example, I have a root template shared by all customer account pages. I want to display a link to the dashboard on all pages except the dashboard (obviously).

How could I detect the page is the dashboard (from PHTML) and hide it? Like this:

<?php if (someMagicDetectTheModuleMethod() !== 'someDashboardIdentifier'): ?>
    Dashboard
<?php endif; ?>


texts:
I have been trying everything to get order emails to work on a new Magento 1.9.2.1 installation. Despite everything being enabled under System > Configuration > Sales > Sales Emails and setting up a proper cron in cPanel, nothing ever happens. I have setup the same exact cron in cPanel for another installation and it works fine. Nothing I do seems to matter.

The cron_schedule table seems to periodically re-populate with new schedule_id's but they always show as "pending", and executed_at and finished_at are all null. The core_email_queue table has all the unsent emails there (with null in the "processed_at" fields).

Nothing appears in the exception or system logs.


texts: How to add custom column in admin grid using block in magento2.2.5?

texts:
How to add custom column in admin grid using block in magento2.2.5. I dont know how
to implement this task. Could you please help me? please find the below screenshot.
https://prnt.sc/q267fw


texts:
after adding SSL in my site i got warrning :
The value of the 'Access-Control-Allow-Origin' header in the
    response must not be the wildcard '*' when the request's credentials mode is 'include'.
I have add below code in htaccess :

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>


texts: How to save samples in downloadable product programmatically?

texts:
I want to add samples in downloadable product programmatically.

I am trying this

 $samplefiles[] = array(
                    'file' => '/u/n/untitled_1.png',
                    'name' => 'Untitled.png',
                    'size' => 4672,
                    'status' => 'new'
            );
 $sampleModel = Mage::getModel('downloadable/sample')->setData(array(
                    'product_id' => $product->getId(),
                    'sort_order' => 0,
                    'sample_url' => '',
                    'sample_file' => json_encode($samplefiles),
                    'sample_type' => 'url',
            ));
            $sampleModel->save();

But its not working..And how to save sample title


texts: Magento2: How to redirect user from cart page to any other page?

texts:
I have a magento site in ver 2.3.5-p1
I want to redirect /checkout/cart/ this page to homepage, because my site is Quote only store and so no need of normal cart page. For that I have created a module to override Magento\Checkout\Controller\Cart\Index this controller. Then added following code in my new controller:
namespace MyCompany\RedirectShoppingCart\Controller\Cart;

class Index extends \Magento\Checkout\Controller\Cart\Index
{
    /**
     * Shopping cart display action
     *
     * @return \Magento\Framework\View\Result\Page
     */
    public function execute()
    {
        return $this->_response->setRedirect('/quotation/quote/', 301);
    }
}

But this is giving following error:
Fatal error: Uncaught TypeError: Argument 2 passed to Amazon\Login\Plugin\CartController::afterExecute() must implement interface Magento\Framework\Controller\ResultInterface,
instance of Magento\Framework\App\Response\Http\Interceptor given, called in /var/www/html/vendor/magento/framework/Interception/Interceptor.php on line 146 and defined in /var/www/html/vendor/amzn/login-with-amazon-module/Plugin/CartController.php:44

Please help!


texts: How to show and hide select box field in adminhtml form in backend

texts:
By default, Footer group select box  should not be displayed.
 And when clicked on position select box footer it should display Footer group select box

$Lastfield =  $fieldset->addField(
            'position',
            'select',
            [
                'label' => __('Position'),
                'title' => __('Position'),
                'name' => 'position',
                'onchange'  => 'onchangeStyleShow()',
                'options' =>
                'disabled' => $isElementDisabled
            ]
        );

         $fieldset->addField(
            'footer_group',
            'select',
            [
                'title' => __('Footer group'),
                'label' => __('Footer group'),
                'name' => 'footer_group',
                'values' => $value,
                'disabled' => $isElementDisabled
            ]
        );
        $Lastfield->setAfterElementHtml(
            '<script>
             function onchangeStyleShow(){
                $("footer_group").toggle()
                }
            </script>'
    );


texts: Should i build a new site with 1.8 Alpha

texts:
I am about to start building a new site in 1 week.  I would like to use 1.8 but it is only alpha release so im not sure.

Given that a site will take around 12 weeks to create i am almost certain the stable release will be out by then and it will be an easier upgrade than from 1.7 to 1.8.

Can anyone advise what is best to do here.


texts: Change .product-item-name font-weight to bold

texts:
How to change .product-item-name (see image) font-weight to bold in my Magento 2 child theme? My parent theme is Luma theme. I can't find in which less file:

.product-item-name, .product.name a {
    font-weight: 400;
}

is defined? What is best practice to make it bold?


texts: How to add Color Picker in Admin Ui Component in Magento 2?

texts:
My file path is

app/code/ColorPicker/Sample/view/adminhtml/ui_component

How can I add color picker in Admin Ui Component in Magento 2?


texts: How to limit search to not show price in Magento2?

texts: Hi currently the realtime search will display everything including icon and price.  For example if I type spice it will show a bunch of spice in the database as well as icon and price.  What I like to do is limit it only show the search query and/or icon but not the price.  Is this possible?  thanks.


texts: Why does Magento_Cookie refresh page as default behaviour?

texts:
This is very ugly behaviour that I want to change, I am wondering if there is any necessity in the action so I can decide to customise it or rewrite the whole thing.

Magento/Cookie/view/frontend/web/js/notices.js

define([
    "jquery",
    "jquery/ui",
    "mage/cookies"
], function($){
    "use strict";

    $.widget('mage.cookieNotices', {
        _create: function() {
            if ($.mage.cookies.get(this.options.cookieName)) {
                this.element.hide();
            } else {
                this.element.show();
            }
            $(this.options.cookieAllowButtonSelector).on('click', $.proxy(function() {
                var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000);

                $.mage.cookies.set(this.options.cookieName, this.options.cookieValue, {expires: cookieExpires});
                if ($.mage.cookies.get(this.options.cookieName)) {
                    window.location.reload();
                } else {
                    window.location.href = this.options.noCookiesUrl;
                }
            }, this));
        }
    });

    return $.mage.cookieNotices;
});


texts:
I have done this in Magento 1 but I am struggling with Magento 2.

I am building a module to observe failed admin logins and email.

My module.xml located in etc/adminhtml/module.xml

        Modzinc_Adminmonitor
        <tab>modzinc</tab>
        <resource>Modzinc_Adminmonitor::modzinc_adminmonitor</resource>
        <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
            Admin Monitor Settings
            <field id="enable" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                Enable Admin Monitor
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <comment>
                    Must be set to yes for any part of this module to work
                </comment>
            </field>
            <field id="notifyEmail" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                Notification Email
                <comment>
                    Where emails will be sent when a monitored event occurs ( Optional if blank no emails will be sent )
                </comment>
            </field>

I want to get the value that has been saved in the field notifyEmail and use it in my adminFail.php

    <?php
namespace Modzinc\Adminmonitor\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;

class AdminFailed implements ObserverInterface {

public function execute( Observer $observer ) {

    $notifyEmail= ???? How do I get this from my module config

### IF I simply set the variable like this :

### $notifyEmail = 'me@mysite.com'  email works so I know all my other code is fine

    mail($notifyEmail,'Failed Login','Failed');

}
}

Any help is greatly appreciated.


texts: Rewriting META logic for product view page - need assistance

texts:
One of the biggest SEO flaws with magento is that if you do not populate the meta information for the meta title, the title page for all products will be the name followed by the store name.

I have a requirement to include the manufacturer part number ($icecatcode), manufacturer name followed by the product name then my store name for my product page titles.

Since my programing ability is limited I am not capable of creating a module the next best thing is to copy /app/code/core/Mage/Catalog/Block/Product/View.php to /app/code/local/Mage/Catalog/Block/Product

I came across this post as a guide.

The problem is if I modify the logic, the page will not load.

Block of code:

  $manufacturer = $product->getResource()->getAttribute('manufacturer')->getFrontend()->getValue($product);
    $shortDescription = $product->getShortDescription(); $icecatcode = $product->getResource()->getAttribute('icecatcode')->getFrontend()->getValue($product);
    $suffix = Mage::getStoreConfig('design/head/title_suffix');
    // SEO values end

    if (!$title) {
        $title = $product->getName() .' '.$manufacturer. ' - '. $topCategory->getName() . $suffix;

        }

    $headBlock->setTitle($title);

Specifically:

 $title = $product->getName() .' '.$manufacturer. ' - '. $topCategory->getName() . $suffix;

Tried the following and variations:

 $title = $product->getIcecatcode() .' '$manufacturer' - '. $product->getName() . $suffix;

How can I change the page titles using the above logic?

EDIT

I have the following working:

 $title = $product->getIcecatcode() . $manufacturer  . $product->getName() . $suffix;

However everything is stuck together. If I add '' to create a space between the page doesn't load.


texts:
The error I'm getting.

  Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\xampp\htdocs\onlinestore\lib\internal\Magento\Framework\View\Element\Template\File\Validator.php on line 2

My validator.php file

<?php
namespace Magento\Framework\View\Element\Template\File;
use \Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Component\ComponentRegistrar;
use \Magento\Framework\Filesystem\Driver\File as FileDriver;

Anyone knows how I can fix this problem?


texts:
I am currently using magento 1.9.2.4 and i built the custom theme

I am using custom made configurable swatches color then I did some little hack it was working

I made custom radio button with the product super attr in array then i made size configurable now when i click on add to cart it asks me for the:

  Please specify the product option

As both are ticked I can check by dumping and when i create product without size it works.

Here is my whole code for colour and size as i have written custom js for colour switch

select a colour

<?php if ($_product->isConfigurable()): ?>
    <?php $attributes = $_product->getTypeInstance(true)->getConfigurableAttributes($_product) ?>
    <?php if (count($attributes)): ?>
        <?php
        $counter = 0;
        foreach ($attributes as $att): ?>

            <?php $pAtt = $att->getProductAttribute();
            //get the child products
            // var_dump($pAtt->getAttributeCode());
            if ($pAtt->getAttributeCode() == 'color'):
                $allProducts = $_product->getTypeInstance(true)->getUsedProducts(null, $_product);
                $frontValues = array() ?>

                    <?php
                    $count = 1;
                    foreach ($allProducts as $p): ?>
                        <?php if (!$p->isSaleable()) continue;
                        ?>
                        <?php $out = $p->getAttributeText($pAtt->getName()); ?>

                            <figure class="option-click swatches1" data-id="<?php echo $p->getEntityId(); ?>"
                                    data-url="<?php echo $actualImage[strtolower($out)] ?>">
                                <img src="<?php echo $swatches[strtolower($out)]; ?>" alt="">

                            <input type="radio" name="super_attribute[<?php echo $att->getAttributeId(); ?>]"
                                   value="<?php echo $p->getColor(); ?>" <?php if ($count == 1) echo "checked"; ?>> <?php echo $out; ?>

                        <?php $counter++;
                        $count;endforeach; ?>

            <?php endif; ?>
            <?php if ($pAtt->getAttributeCode() == 'size'): ?>

select a size

                    <?php
                    $count = 1;
                    foreach ($allProducts as $p): ?>
                        <?php if (!$p->isSaleable()) continue;
                        ?>
                        <?php $out = $p->getAttributeText($pAtt->getName()); ?>

                                <img src="<?php echo $swatches[strtolower($out)]; ?>" alt="">

                            <input type="radio" name="super_attribute[<?php echo $att->getAttributeId(); ?>]"
                                   value="<?php echo $p->getColor(); ?>" <?php if ($count == 1) echo "checked"; ?>> <?php echo $out; ?>

                        <?php $counter++;
                        $count;endforeach; ?>

            <?php endif;
        endforeach; ?>
    <?php endif; ?>
<?php endif; ?>


texts: Magento2 : How to hide a Product from a specific Customer Group?

texts: I want to create an extension that will hide a product from a specific customer group.


texts: Magento 2 : How to fetch product thumbnail images in admin grid?

texts:
<?php namespace Magneto\PopupQuestion\Ui\Component\Listing\Column;
 use Magento\Framework\View\Element\UiComponentFactory;
 use Magento\Framework\View\Element\UiComponent\ContextInterface;
 class Thumbnail extends \Magento\Ui\Component\Listing\Columns\Column
 {
  const NAME = 'thumbnail';

  const ALT_FIELD = 'name';

/**
 * @param ContextInterface $context
 * @param UiComponentFactory $uiComponentFactory
 * @param \Magento\Catalog\Helper\Image $imageHelper
 * @param \Magento\Framework\UrlInterface $urlBuilder
 * @param array $components
 * @param array $data
 */
public function __construct(
    ContextInterface $context,
    UiComponentFactory $uiComponentFactory,
    \Magento\Catalog\Helper\Image $imageHelper,
    \Magento\Framework\UrlInterface $urlBuilder,
    array $components = [],
    array $data = []
) {
    parent::__construct($context, $uiComponentFactory, $components, $data);
    $this->imageHelper = $imageHelper;
    $this->urlBuilder = $urlBuilder;
}

/**

 * Prepare Data Source
 *
 * @param array $dataSource
 * @return array
 */
public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        $fieldName = $this->getData('name');
        foreach ($dataSource['data']['items'] as & $item) {
            $product = new \Magento\Framework\DataObject($item);
            $imageHelper = $this->imageHelper->init($product, 'product_listing_thumbnail');
            $item[$fieldName . '_src'] = $imageHelper->getUrl();
            $item[$fieldName . '_alt'] = $this->getAlt($item) ?: $imageHelper->getLabel();
            $item[$fieldName . '_link'] = $this->urlBuilder->getUrl(
                'catalog/product/edit',
                ['productid' => $product->getEntityId(), 'store' => $this->context->getRequestParam('store')]
            );
            $origImageHelper = $this->imageHelper->init($product, 'product_listing_thumbnail_preview');
            $item[$fieldName . '_orig_src'] = $origImageHelper->getUrl();
        }
    }

    return $dataSource;
}

/**
 * @param array $row
 *
 * @return null|string
 */
protected function getAlt($row)
{
    $altField = $this->getData('config/altField') ?: self::ALT_FIELD;
    return isset($row[$altField]) ? $row[$altField] : null;
}}


texts: Magento 2 - Assign drop down attribute value to product programmatically

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

$productID = 12; // Product ID

$option_label = 'XL'; // atttribute option label

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

$attribute = $product->getResource()->getAttribute('size'); // Get attribute
details by code

if ($attribute->usesSource()) {

    $option_id = $attribute->getSource()->getOptionId($option_label); // Get Option id using option label

}

$product->setSize($option_id);

$product->save();


texts: Grouped products with no associated products - code not working

texts:
I'm trying to get a list of all grouped products with no associated products.

I have the following code but it is not showing anything.

I know there is a least one grouped product with no associated products because I created a test one.

require_once '*<path-to>*/app/Mage.php';
Mage::app();

$products = Mage::getModel('catalog/product')
    ->getCollection()
    ->addAttributeToFilter('type_id', array('eq' => 'grouped'));
foreach ($products as $product) {
    $associatedProducts = $product->getTypeInstance(true)->getAssociatedProducts($product);
    $NoAssociatedProducts = count($associatedProducts);
    if ($NoAssociatedProducts <1){
    $grouped_name = $product->getName();
    echo $grouped_name;
    }
}

Can anyone see what's wrong?


texts: Find the block class instantiated into a phtml file

texts:
I need to modify a block class called in a phtml file, this is the customer.phtml file:

<?php
// @codingStandardsIgnoreFile

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

            <button type="button"
                    class="action switch"
                    tabindex="-1"
                    data-action="customer-menu-toggle">
                <?php /* @escapeNotVerified */ echo __('Change')?>
            </button>

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

            <?php echo **$block->getChildHtml()**;?>

        <?php endif; ?>

<?php endif; ?>

I'm interested in the block beetween the div with class customer-menu.
I want to remove
 tag but not their li children, this ul tag is inside the
 when someone is logged in.


texts: How to print the TAX or GST of products seperately with tax rates

texts:
I need to print the tax rates of different products separately.Currently i could get the total tax when i'm placing order.I had already changed Tax Calculation Method Based On unit prize in configuration.Please help me to fix it.

Configuration settings


texts:
We are getting ready to open a second store on one Magento 2.3 installation. I wonder if anyone had an experience with having 2 stores on the same installation but with different IP addresses.

We need to achieve this for SEO purpose. Both stores will be selling similar items therefore content will be similar but not the same.

Do you know how it can be achieved?

Thank you


texts: Magento - Multiple Store - 2 domains, but 2nd store is in a subfolder

texts:
I have 2 stores:

domain.ca
domain.com (Domain Alias to /usa subfolder)

domain.ca is already working and online. I'm trying to add domain.com to as an additional store.

I've setup the Admin part.

What I want to do is to:

have index.php and .htaccess in a separate folder -> /usa and have that folder use symlinks or w/e to get it's skin/app/etc/media folders.

I've setup the symlinks in that folder, but they are throwing 404 error when i go to domain.com

I've tested symlinks through FTP and SSH both worked.

I wonder maybe because I created them as root account, they are not working?

Is there a way to make this method work?

I have made the normal method without subfolder work, but we have a live site and some customers have squeezed through to domain.com by mistake - I want to limit their access to domain.com so its blocked until the site is ready.

Plus this will allow extra mobility when I make changes to either store.

Edit:
Webserver that I'm using is Litespeed, im not sure if that makes any difference or not.


texts:
i made changes in

app/code/core/Mage/Customer/etc/api2.xml

now i want to override this xml in my local module how i do


texts: Magento2 custom module overrides layout: The element "checkout.cart.item.renderers" already has a child with alias "simple" in exception log

texts:
In a custom module I override the cart item template. It works, but my exception log is filling up with The element "checkout.cart.item.renderers" already has a child with alias "default" and alias "simple" errors.

How do I correct my code to fix this?

In my custom module I have the file app/code/MyCompany/MyModule/view/frontend/layout/checkout_cart_item_renderers.xml with the following code:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.item.renderers">
            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="MyCompany_MyModule::cart/item/default.phtml">
                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.default.actions" as="actions">
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.default.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.default.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
                </block>
            </block>
            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="MyCompany_MyModule::cart/item/default.phtml">
                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions" name="checkout.cart.item.renderers.simple.actions" as="actions">
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit" name="checkout.cart.item.renderers.simple.actions.edit" template="Magento_Checkout::cart/item/renderer/actions/edit.phtml"/>
                    <block class="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Remove" name="checkout.cart.item.renderers.simple.actions.remove" template="Magento_Checkout::cart/item/renderer/actions/remove.phtml"/>
                </block>
            </block>
        </referenceBlock>
    </body>
</page>

My custom template is in /app/code/MyCompany/MyModule/view/frontend/templates/cart/item/default.phtml.

I have tried removing the block first, then it doesn't load anything. Any help how to do this the right way is appreciated.


texts: We are running Magento ver. 1.7.0.2.  On the admin page, there is no option under system for Magento Connect.  We have an account with Magento Connect.  Is there something that needs to be done to associate that account with the Magento Admin page?


texts: After installation, I have problems with Magento 2

texts:
When I click on Products or another category the options are not displayed.

Does anyone has the solution of this problem?


texts: Magento 1.9.2.0: Amazon Pay For Europe (version 3.0.10) return error when checkout

texts:
I had an error

  Your session has expired. Please sign in again by clicking the Pay
  with Amazon button.

When I checkout without logging to the shop.

But the request from my customer is that we can still use Amazon Payment account event when not logging to any shops.

The thing is I can use the same account with another shop without logging. There is only one shop that requests me to do so.

My step:

  Place an order without logging.
  Click "Amazon Pay" and logging the Amazon Pay account.
  The page was redirected Amazon Checkout Page and had an error

  Your session has expired. Please sign in again by clicking the Pay
  with Amazon button.

How can I purchase with the Amazon Payment without login to the shops?


texts: Programatically check free shipping is active or not in magento 2?

texts: How can I programatically check free shipping is active or not in Magento 2?


texts:
How do I properly overwrite Magento core functionality? I want to create a module that does it.
I need to edit this file: app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php
I know there is a option to copy this file to app/code/local/Mage/Adminhtml/Model/Sales/Order/Create.php and add my functionality to it which will let Magento read this file from local folder instead of core folder.
It's a easy way of doing but by creating a custom module it's easier to manage all the changes I have done.

So here is what I have done so far:
I have created a /app/etc/modules/MyCompany_MyModule.xml config file with following content:
<?xml version="1.0"?>

<config>
    <modules>
        <Vendor_CustomPriceRevert>
            <active>true</active>
            <codePool>local</codePool>
        </Vendore_CustomPriceRevert>
    </modules>
</config>

This is my second file in app/code/local/MyCompany/MyModule/etc/config.xml and it's content:
<?xml version="1.0"?>

<config>
    <modules>
        <MyCompany_MyModule>
            <version>0.1.0</version>
        </MyCompany_MyModule>
    </modules>
</config>

I know these two files are essential for any module to work.
Now, what file do I need to create now if I want to overwrite this file? Could someone explain this to me?


texts:
What does this code do in magento ?

 $customer = $this->_getCustomer();

this code in createPostAction in customer/accountController .

Why put underscore "_" in most of Method


texts:
I am using Magmi to import all my products, I get the following errors. Can someone suggest a fix or what is causing it:

plugin;Magmi_CSVDataSource;warning:CSV Datasource v1.3 - warning: line 3 , wrong column number : 122 found over 118, line skipped

error:No sku info found for record #10

error:No sku info found for record #11

error:No sku info found for record #18

error:No sku info found for record #19

error:No sku info found for record #21

error:No sku info found for record #22

plugin;Magmi_CSVDataSource;warning:CSV Datasource v1.3 - warning: line 28 , wrong column number : 20 found over 118, line skipped

plugin;Magmi_CSVDataSource;warning:CSV Datasource v1.3 - warning: line 29 , wrong column number : 100 found over 118, line skipped

plugin;Magmi_CSVDataSource;warning:CSV Datasource v1.3 - warning: line 30 , wrong column number : 119 found over 118, line skipped

plugin;Magmi_CSVDataSource;warning:CSV Datasource v1.3 - warning: line 31 , wrong column number : 119 found over 118, line skipped

plugin;Magmi_CSVDataSource;warning:CSV Datasource v1.3 - warning: line 33 , wrong column number : 119 found over 118, line skipped

Thanks


texts:
I'm trying to draw a bar graph on a page in the backend:

$values = array ('Jan' => 10, 'Feb' => 20, 'Mar' => 30);
$img_width=450;
$img_height=300;
$margins=20;

# ---- Find the size of graph by substracting the size of borders
$graph_width=$img_width - $margins * 2;
$graph_height=$img_height - $margins * 2;
$img=imagecreate($img_width,$img_height);

$bar_width=20;
$total_bars=count($values);
$gap= ($graph_width- $total_bars * $bar_width ) / ($total_bars +1);

# -------  Define Colors ----------------
$bar_color=imagecolorallocate($img,0,64,128);
$background_color=imagecolorallocate($img,240,240,255);
$border_color=imagecolorallocate($img,200,200,200);
$line_color=imagecolorallocate($img,220,220,220);

# ------ Create the border around the graph ------

imagefilledrectangle($img,1,1,$img_width-2,$img_height-2,$border_color);
imagefilledrectangle($img,$margins,$margins,$img_width-1-$margins,$img_height-1-$margins,$background_color);

# ------- Max value is required to adjust the scale -------
$max_value=max($values);
$ratio= $graph_height/$max_value;

# -------- Create scale and draw horizontal lines  --------
$horizontal_lines=20;
$horizontal_gap=$graph_height/$horizontal_lines;

for($i=1;$i<=$horizontal_lines;$i++){
    $y=$img_height - $margins - $horizontal_gap * $i ;
    imageline($img,$margins,$y,$img_width-$margins,$y,$line_color);
    $v=intval($horizontal_gap * $i /$ratio);
    imagestring($img,0,5,$y-5,$v,$bar_color);

}

# ----------- Draw the bars here ------
for($i=0;$i< $total_bars; $i++){
    # ------ Extract key and value pair from the current pointer position
    list($key,$value)=each($values);
    $x1= $margins + $gap + $i * ($gap+$bar_width) ;
    $x2= $x1 + $bar_width;
    $y1=$margins +$graph_height- intval($value * $ratio) ;
    $y2=$img_height-$margins;
    imagestring($img,0,$x1+3,$y1-10,$value,$bar_color);imagestring($img,0,$x1+3,$img_height-15,$key,$bar_color);
    imagefilledrectangle($img,$x1,$y1,$x2,$y2,$bar_color);
}

Now that I have the $img file set up, I'd like to print it onto the screen (between other information).

If I try this:

header("Content-type:image/png");
imagepng($img);
$_REQUEST['asdfad']=234234;

It just prints out gibberish, I'm assuming as Magento has already set the page headers

�PNG  IHDR�,-8[$PLTE@����������OS� (IDATx���n�(��dqY�4}�8!^bi�����> � ���S����)���t�!���t�� i��)�6c�Z\�D$"��YP���&�����XDP��c�E�%��G4b#,2���k�����?c�y�;�sF��@���HD"]�=-��Ml*�ݪJa+�=��i��K���v�L����g=&גį;l����8�H�'�C,��h����Db���(�K,��x%�g��>.0:�H�;%���ǩ��Zlѕ��Wr٢+���"�V�_s���z~te�uğ������ �#��k�U(���]!"WL{<:�� ~�~;�(�BD"^ 1����צ*9zt��C���JN�"�j��C�����D-��!��ONJND"�,ѡGW�BW�5��i� �x��zsq �'"�_|W�9yTn���2EW���i�J�U���|�v!��w���C��y�c�h�DRĐ%�����>�V]^ɇj˫��5:�H�[!扮$5'Kt%٪Ybɹ]�|��+)%���G�x+�<;I�J.֠��>z��&�Y�d�5:�H�[!�!�������,{W�J�>?�a<���F��͠�܁����o �GWEW�x�ݨr��u��@|�@�4�i�='�Tte7����?���>��Q�����ǔ��h���US���=����=��V]�j2�)&����)��CL}3(��+!~��/��7�d;��_L�q���ʽ��� �č�#:�NTu/�]����h�G�Y�XAlԒ�1>Z�>�r�ޗ����}椒_��鬦_Ǿ�M3�5:�όG썈�:6WG\t<�"���M����E�����2J�=z��ݪ�Ƕ�c�ى�>����>���/�����L�5�����NF�Ab���)��0����}GD2"��1%��6�-�e��c��[����z��V����� ��P�[���z��<� ۊ"~���ڟ�q�ۏ��=��%v����N,@7��7���~ ꘭#JX������*U��=�1N�s�6���i�B�,��Go7Aq͋B;ŕҲ,2�R��E���J�u�u�`�s�?�='Z!CЪ\�B8��+&��Q�)38M��Ghu�>�Ҁ;�qo!g��G�8i��.�h��  \G�$�(�:J#��=��ڿ�9h�/�� ���,AE飏��Qb8�"k�,�i��|��=�P���ot(���-��ˢS(��Ъ >x[hh|k.� �+hj�'��P�6�B(�_薕� �sf�=��Jy���K��H�H�O����NB�mIEND�B`�

Anybody got some pointers for me?


texts: category page with static block not listing products

texts:
I'm using magento 1.9 with molly theme. I added sub-category static blocks on category pages(reference:https://www.templatemonster.com/help/magento-listing-sub-categories-on-a-category-page.html#gref). I have selected the display option for category as ' static and products '

For some reason, one category page shows all products but another doesn't show any or only 1 or 2 products.

Below are the links to refer:

http://dcgears.com.sg/power.html

http://dcgears.com.sg/console-server/console-server-by-port.html

http://dcgears.com.sg/console-server.html

I have checked the products are added in desired category also did reindexing after adding products and cache is disabled.

Please help to resolve this issue.


texts:
I am learning how to use dependency injections to get the classes I need.

The following will work when creating a controller.

...
use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{

  protected $_resultJsonFactory;
  protected $_directoryList;

  public function __construct(
    Context $context,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
    \Magento\Framework\App\Filesystem\DirectoryList $directoryList
    )
  {
    $this->_resultJsonFactory = $resultJsonFactory;
    $this->_directoryList = $directoryList;
    parent::__construct($context);
  }
...

It can inject the dependencies I need. and I can then later use $this->_directoryList as needed.

I have tried to do the same for a helper class which needs access to this

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

  protected $_directoryList;

  public function __construct(
    \Magento\Framework\App\Filesystem\DirectoryList $directoryList,
    )
  {
    $this->_directoryList = $directoryList;
    parent::__construct();
  }
...

Whenever I add a constructor I start receiving 500 errors on any page that tries to call this helper.

Is there a proper method or way to inject dependencies into a helper class.


texts: Problem getting custom payment gateway setup on Magento Cloud

texts:
So I am working on a custom payment gateway extension. It installs and works beautifully in my test server. Right now I'm trying to get it install on Magento Cloud.

I follow their installation instructions, and can see that my database changes are present, but my payment gateway doesn't show up in the store configuration.

Here is my repo: https://github.com/apruve/apruve-magento2

Any ideas?


texts: Magento- 2 How to show custom option type SKU code at the packing slip?

texts:
I want to add custom option SKU in custom option type value. like,

Custom option : custom ( SKU )


texts: ReferenceError: jQuery is not defined error owl Carousel slider

texts:
I am trying to use slider in my magneto custom module

I did Following steps:

1 create a file requirejs-config.js

var config = {
    map: {
        '*': {
            my: 'Vendor_Module/js/owl.carousel',
        }
    }
};

created a owl.carousle.js fine in web/js

jQuery(document).ready(function($) {
var owl = $("#owl-demo1");
     owl.owlCarousel({
    // Most important owl features
margin:10,
items : 4,
itemsCustom : false,
itemsDesktop : [1199,2],
itemsDesktopSmall : [900,4],
itemsTablet: [768,3],
itemsTabletSmall: [700,2],
itemsMobile : [479,1],

singleItem : false,
itemsScaleUp : false,

//Basic Speeds
slideSpeed : 200,
paginationSpeed : 800,
rewindSpeed : 1000,

//Autoplay
autoPlay : true,
stopOnHover : false,

// Navigation
navigation : true,
navigationText: ["Left","Right"],
rewindNav : true,
scrollPerPage : true,

// Responsive
responsive: true,
responsiveRefreshRate : 200,
responsiveBaseWidth: window,

//Mouse Events
dragBeforeAnimFinish : true,
mouseDrag : true,
touchDrag : true,

});
});

The slider is not working giving an error in the console

  ReferenceError: jQuery is not defined error


texts: Added last name and search functionality in Customer Grid

texts:
Currently, only first name show on 'Customers -> Manage Customers' admin page if there are a lot of same first name user, it's hard to find right customer at once

How can I make show last name on 'Manage Customers' admin page? Between Name and Email column

(last name should be also searchable like other field)


texts: Magento 2 - 500 Internal Server Error when try to customer inline edit

texts:
When i am trying to edit customer data through inline edit i am getting 500 internal server error. As far as i debug it's giving the error when calling customerRepository->save($customer) function in InlineEdit.php file. Not sure what's happening. Does anyone have any idea?

Note: Magento version 2.3.2


texts: Magento 1: Use of <![CDATA in the system configuration XML

texts:
I've noticed that some comments in the native Magento 1 system.xml files are enclosed by <![CDATA[ / ]]> tags and some are not.

For example in app/code/core/Mage/Captcha/etc/system.xml we have:

<length translate="label comment">
    ...
    <comment>Please specify 8 symbols at the most. Range allowed (e.g. 3-5)</comment>
    ...
</length>

And:

<symbols translate="label comment">
    ...
    <comment><![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]></comment>
    ...
</symbols>

I first thought it could be because of HTML tags in the comment but in app/code/core/Mage/Catalog/etc/system.xml we have:

<flat_catalog_product translate="label comment">
    ...
    <comment><![CDATA[Enable for reindexing a big number of SKUs]]>.</comment>
    ...
</flat_catalog_product>

So my questions are :

in which case one should use the CDATA tags in system configuration comments ?
does the use of CDATA tags affect the translations ? (understand do we have to write the CDATA tags in the translation files ?)


texts:
I have a magento site deployed at for example www.example.com and a test site deployed at test.example.com. To resolve cookie conflict between the domain and the sub domain, I was forced to make the Session Cookie management configuration like this:

Now I am only able to login to admin via www.example.com/admin
If I write example.com and try to login, I can not login.
So, I want to add 'www' to the admin url automatically if the user does not add that to the url.

How that can be achieve. Any help in this regard will be much appreciated.


texts: Remove Links from 'My Account' side navigation

texts:
I am trying to remove some links from the 'My Account' section of Magento 2.2.5.

the links i want to remove are

My Downloadable Products
Stored Payment Methods
Billing Agreements
My Subscription Profiles
My Saved Card Identifiers

after some research, i need to do this in customer_account.xml

and the code i am trying to use is

<referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
<referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
<referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>

However when i use these, it only displays the top 3 existing navigation links and i cant find the remove statements for the other mentioned links


texts: magento 2: cron to run after exception also

texts:
I have created a custom module which has cronjob to run after certain interval:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <!--cron job to import customer,customer assignment,product data,pricing data and listing master-->
        <job name="import_customer_product" instance="Singh\Import\Cron\CustomerProduct" method="execute">
            <schedule>* * * * *</schedule>
        </job>
        <!--cron job to import order,invoice and shipment-->
        <job name="import_order_edi" instance="Singh\Import\Cron\OrderImport" method="execute">
            <schedule>* * * * *</schedule>
        </job>
    </group>
</config>

There are 5 processes running for 1st cron and 3 for 2nd cron. If any exception or error comes in process 1, the cron stops and its status change to error, it bypass other 4 processes and execute the next cron.

Content of CustomerProduct.php:

public function execute() {
    $cron = $this->_cronfactory->create();
    $this->_logger->info("customer and product import cron started");
    $this->_customer->execute();
    $this->_logger->info("customer imported");
    $this->_customerAssignment->execute();
    $this->_logger->info("customer ass imported");
    $this->_product->execute();
    $this->_logger->info("product imported");
    $this->_listingMaster->execute();
    $this->_logger->info("listing imported");
    $this->_productPricing->execute();
    $this->_logger->info("pricing imported");
    $this->_logger->info("customer and product import cron finished");
}

What I want is: the cron should run the next process if it found any exception or error in 1st process, it should not bypass other process.


texts: Magento 2: What is the "Stored Payment Methods" in my account section?

texts:
I see "Stored Payment Methods" option in my account section, but there is not payment method stored.

Please can anyone explain me how to use this option to store payment methods used on the website.


texts: Filtering admin grid when using observer-inserted custom column

texts:
I have a custom column in my catalog product grid for a custom attribute. I'm using the observer method of inserting the column: on core_block_abstract_prepare_layout_before:

public function appendAuthorColumn(Varien_Event_Observer $observer)
{
    $block = $observer->getBlock();
    if ($block->getType() == 'adminhtml/catalog_product_grid') {
        $authors = Mage::helper('companyx_authors')->getAuthorOptionHash();
        $block->addColumnAfter('author_id', array(
            'header' => 'Author',
            'type' => 'options',
            'index' => 'author_id',
            'options' => $authors,
            'width' => '150',
        ), 'name');
    }
}

I am updating the collection using the catalog_product_collection_load_before event:

public function addAuthorToCollection(Varien_Event_Observer $observer)
{

    $collection = $observer->getCollection();
    if (!isset($collection)) {
        return $this;
    }
    $collection->addAttributeToSelect('author_id');
    return $this;
}

Everything works as expected, except when I want to filter by product name: the author column is blank. When I filter by any other column, it is populated.

The only difference with product name is that it's a free text field. I can't think of anything else.


texts:
I'm trying to remove the main menu from the homepage, for this I used the following code in my custom template:

<referenceBlock name="store.menu" remove="true" />

But the menu is still there while other settings in the template work fine.

What else should I do to remove this main menu ?


texts: Is there any extension available in Magento 2 for integrating Shop pay.


texts: Remove sale order grid total count in magento 1

texts:
I am on Magento 1.9 and would like to remove one of the block in

  sales -> orders page

See attachment. Can someone please show me which file that i need to edit in order to remove that?


texts: CSS / JS Not Loading on FrontEnd after flushing Cache with Custom Theme

texts:
I'm having issues with getting my custom Magento 2 theme to compile correctly.

I installed it on a remote server and configured it. All is working on that end. I can flush the cache and deploy the static - it seems fine.

However when I download the files for local development the CSS and JS is not compiling correctly. The only thing I have changed is the url in the core_config_data table to http://localhost - When I switch the database to a fresh install of Magento and do a static deploy and remove all var/cache etc files it loads back fine.

However, when I change the env.php file back to the downloaded DB with the edited URL and I flush the cache it goes back to not loading any CSS files.

Have followed the guides here.

  Magento 2 CSS and JavaScript not loading from correct folder

  Magento 2: Not loading CSS and JS after successful installation in windows


texts: Magento Product Detail Page doesn't fully load and description and options are missing

texts:
I've flushed the cache on my browser and inside Magento, re-indexed and even tried to recreate products but eventually they always stop showing the description and options.

It doesn't do it on all products but it keeps doing it in the same products no matter how many times I duplicate or recreate new ones.

It seems RWD theme is just not working the way it used to with previous deployments. I am in Magento 1.9.3.7.