texts: Product page meta titles - appearance in search results

texts:
Hej.
I'm working on a site with Magento 1.9.2.1 CE, https://www.elcykelsalg.dk/.
In search results, the products are displayed with an attribute (Elcykler) after the meta title separated with a "-", which I have been unable to change or remove.
I have tried to change the standard title under System->Configuration->Design
->HTML Head, but it has still not changed in Google search results.
I have also been looking at the category tree, where both "Elcykler" and "Cykler" are sub categories of the default category, but the only possible explanation, that I can come up with, would be that one comes before the other, or that I have not been setting any of them to be Anchor.
What can I do, or what do I do wrong ?

P.S.
"Elcykler" means e-bikes, and the shop does sell e-bikes, but also normal bikes "Cykler", which makes it somehow misleading, that the first one appears with all products from other categories in search results.


texts: How to create a frontend custom page module with view template files in magento 2.3

texts:
I have doubt as how to create Frontend Module with View template files. I have created Module using this reference Magento Documentation "https://devdocs.magento.com/videos/fundamentals/create-a-new-page/". In this Documentation they have Completed till the Controller section, they haven't explained as how to pass the collected data to view->frontend folder.

Please find the below code for creating frontend module

File path:app/code/VendorName/ModuleName/etc/frontend/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="salesperson" frontName="salesperson">
            <module name="VendorName_ModuleName"/>
        </route>
    </router>
</config>

File path:app/code/VendorName/ModuleName/Controller/Login/Index.php

<?php
namespace VendorName\ModuleName\Controller\Login;
class Index extends \Magento\Framework\App\Action\Action
{
    protected $resultPageFactory;
    public function __construct(
       \Magento\Framework\App\Action\Context $context,
       \Magento\Framework\View\Result\PageFactory $resultPageFactory)
{
       $this->resultPageFactory = $resultPageFactory;
       parent::__construct($context);
}

    public function execute()
    {
        return  $resultPage = $this->resultPageFactory->create();
    }
}

File path:app/code/VendorName/ModuleName/view/frontend/layout/salesperson_login_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template" name="app_login_page" template="VendorName_ModuleName::salesperson_login_index.phtml" />
    </referenceContainer>
</page>

File path:app/code/VendorName/ModuleName/view/frontend/templates/salesperson_login_index.phtml

Template file for Frontend Module

After creating all the above steps, I called the URL as http://domainname.com/salesperson/login/index , It just bring the store default header and footer content without our template code.

Someone help me as to Create View files and pass the data from controller to view files in Magento Custom Frontend Module!!!

Thanks in Advance :)

Regards,
Hari


texts: How to call customer login form in the custom module action magento 2?

texts:
I have created my custom module for specific customer group. so, admin will send link to customer to download some matter after login.

The login URL and login screen will be different for normal customer and specific customer group.

I have created the Module, but now how I can call the customer lgoin form on my custom URL action?

Could anyone help me out this issue?


texts: Magento2.3 display images of a category in .phtml

texts:
I have a block that returns a category by its ID. I loop on the category's children and I would like to be able to display their respective images and names.
for the moment I can display their names but not images urls.

here is my block

<?php

namespace Foo\Bar\Block;

use Magento\Backend\Block\Template\Context;
use Magento\Catalog\Api\CategoryRepositoryInterface;

class Orders extends \Magento\Framework\View\Element\Template
{
    protected $_categoryHelper;

    protected $categoryFlatConfig;

    protected $topMenu;

    /**
     * @var CategoryRepositoryInterface
     */
    private $categoryRepository;

    /**
     * Orders constructor.
     * @param Context                     $context
     * @param CategoryRepositoryInterface $categoryRepository
     */
    public function __construct(Context $context, CategoryRepositoryInterface $categoryRepository)
    {
        $this->categoryRepository = $categoryRepository;
        parent::__construct($context);
    }

    public function getCategoryById($id)
    {
        return $this->categoryRepository->get($id);
    }
}

here is my phtml

<?php

use Magento\Catalog\Model\Category\Interceptor;

/** @var Interceptor $category */
$category = $this->getCategoryById(63);

?>

    <?php echo $category->getName(); ?>

    url : <?php echo $category->getImageUrl(); ?> // OK

<?php

if ($category->hasChildren()) {
    $subCategories = $category->getChildrenCategories();
    echo '
';
    foreach ($subCategories as $subCategory) {
        echo '
' . $subCategory->getName() . '
';
        echo '
' . $subCategory->getImageUrl() . '
'; // NOTHING HERE
    }
    echo '
';
}
?>

I don't understand why my parent category can display the url of the image but not the children....


texts: How to add Page title in a Custom Page Magento2?

texts:
I have set page title in my custom controller like below

public function execute()
    {
        $resultPage = $this->_resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->set(__("My Custom Page");
        return $resultPage;
    }

This displays the title with the title suffix configured in Content->Design->Configuration->Theme edit->HTML Head->Title Suffix

I need to remove title suffix. Can anyone help me?


texts: Problem with Special Price Date in Magento2

texts:
I am running Magento 2. The other day I tried for the first time to set a special price, but when I try to set a date I get an error.
After trying some dates I noticed a pattern.
When I pick a date like 15/01/2018 (15. Jan) I get the error, but when I choose a date that works in both MM:DD:YYYY and DD:MM:YYYY, there is no problem.
My store is in Denmark, and my location and language is as well, but somehow it seems like it only accepts dates in the MM:DD:YYYY-format, even though I can only pick dates from the DD:MM:YYYY-format. So only the dates that fit in both will work...
Is it a wrong setting, or do I have to change some code?
Thank You


texts:
I know this has been asked before but can't find an answer yet.

Our payment provider supports partial refund so that is not an issue.

We created bundled products to sell sets of items. In this is also the option to add extra.

-Require 5 items (choose option for each 5)
-Add extra items at same price (optional)
-Backend: Dynamic pricing / ship seperate

Example:
-Client orders 5 items + 3 extra's
-Client wants to return one of the extra ordered items (too many)
-Creating a credit memo tries to refund the whole bundled set

Is there a way to set this up different/better so that I can refund child items?

Not working: Grouped product
-Can't make items mandatory / QTY or set adjusted price

Not working: Adjustment fee
-Doesn't recalculate the tax amount
-Still credits the whole bundle, so another extra bought too much can't be credited or replaced afterwards


texts: How to remove the footer in compare product print page in magento2

texts:
Currently, Our compare product print page showing the footer section on that.
I want to remove the footer link in compare product print page.
How to do that.
Thanks.


texts: How does Magento 2 load files from pub/static directory?

texts:
I'm running custom modules in my application. I don't understand how the files are called from pub/static folder from the respective theme. Can anyone explain me how this background process works? I know that all folders and files are auto generated and they are used across the application.

I would like to know how these auto generated files are connecting to the modules and how they are processing and working. Please explain me as in detail as possible, and if someone else had discussed the same topic earlier please provide me the link, so that I can have a look and understand.


texts:
I created a new user in System > Web Services > SOAP/XML-RPC - Users.

I created a new project in SoapUI.

Opened login > Request 1 and filled it in:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:loginParam>
         <username>test</username>
         <apiKey>test123</apiKey>
      </urn:loginParam>
   </soapenv:Body>
</soapenv:Envelope>

This is the response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>WSDL</faultcode>
         <faultstring>SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://local.test.dev/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity "http://local.test.dev/index.php/api/v2_soap/index/?wsdl=1"</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


texts:
Since I haven't ever made a robots.txt before, I am little nervous submitting one for a fully working webshop. Does anyone see anything critical in the following, or should I be able to submit it as it is? Any advice is highly appreciated!

# Google Image Crawler Setup
User-agent: Googlebot-Image
Disallow:

# Crawlers Setup
User-agent: *

# Directories
Disallow: /404/
Disallow: /app/
Disallow: /cgi-bin/
Disallow: /downloader/
Disallow: /errors/
Disallow: /includes/
#Disallow: /js/
#Disallow: /lib/
Disallow: /magento/
#Disallow: /media/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /scripts/
Disallow: /shell/
Disallow: /skin/
Disallow: /stats/
Disallow: /var/
Disallow: /maggie/

# Paths (clean URLs)
Disallow: /index.php/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalogsearch/
#Disallow: /checkout/
Disallow: /control/
Disallow: /contacts/
Disallow: /customer/
Disallow: /customize/
Disallow: /newsletter/
Disallow: /poll/
Disallow: /review/
Disallow: /sendfriend/
Disallow: /tag/
Disallow: /wishlist/
Disallow: /catalog/product/gallery/
Disallow: /tilmeld-nyhedsbrev/
Disallow: /tak-for-din-tilmelding/

# Files
Disallow: /cron.php
Disallow: /cron.sh
Disallow: /error_log
Disallow: /install.php
Disallow: /LICENSE.html
Disallow: /LICENSE.txt
Disallow: /LICENSE_AFL.txt
Disallow: /STATUS.txt

# Paths (no clean URLs)
#Disallow: /*.js$
#Disallow: /*.css$
Disallow: /*.php$
Disallow: /*?SID=
Disallow: *dir=*
Disallow: *order=*
Disallow: *mode=*
Disallow: */l/*


texts: Magento 2: Add main menu to checkout page

texts:
Using Magento 2 with my child theme of Luma I would rather the checkout pages showed the header and footer. Thanks to this thread I have found how to add most of it back in. The only bit I am struggling with adding back in is the main menu. Presumably this also needs adding in my checkout_index_index.xml file? It currently looks like this:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="minicart" remove="false"/>
        <referenceContainer name="header.panel" remove="false"/>
        <referenceBlock name="top.search" remove="false"/>
        <referenceBlock name="catalog.compare.link" remove="true"/>
        <referenceBlock name="catalog.topnav" remove="false"/>
        <referenceContainer name="footer-container" remove="false"/>
    </body>
</page>


texts: Class not found error while compiling Magento

texts:
After I copied files for a new Theme, I was able to upgrade and deploy but when I open the main site it is throwing me

Exception #0 (RuntimeException): Class Magento\Framework\View\EntitySpecificHandlesList does not exist

When I ran compile command I'm getting the following error. This is continuation of the issue After Theme Installation Main site is down

Updated with Error Stack trace

sudo php bin/magento setup:di:compile
Compilation was started.
Interceptors generation... 4/7 [================>-----------]  57% 12 secs 164.0 MiBMiB8.0 MiB

  [RuntimeException]
  Class Magento\Framework\View\EntitySpecificHandlesList does not exist

Exception trace:
 () at /var/www/html/lib/internal/Magento/Framework/Code/Generator.php:115
 Magento\Framework\Code\Generator->generateClass() at /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Generator.php:70
 Magento\Setup\Module\Di\Code\Generator->generateList() at /var/www/html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Interception.php:100
 Magento\Setup\Module\Di\App\Task\Operation\Interception->doOperation() at /var/www/html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
 Magento\Setup\Module\Di\App\Task\Manager->process() at /var/www/html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:187
 Magento\Setup\Console\Command\DiCompileCommand->execute() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /var/www/html/lib/internal/Magento/Framework/Console/Cli.php:96
 Magento\Framework\Console\Cli->doRun() at /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /var/www/html/bin/magento:23


texts:
Is there any way to remove shipping method from quote, programmatically.

I have try this code

Mage::getSingleton('checkout/session')->getQuote()->unsShippingAddress();

but not working.

And this code is remove only from the session. How can i remove from the quote table.


texts: Magento 2 memory size needed for process

texts: I am using Magento 2.2. I need to know the suitable RAM Size needed to run my Magento system.


texts:
I am trying to install fresh Magento 2. It gives me HTTP ERROR 500 when hit the URL http://localhost/m2/.
I know 0777 will solve my issue, but it is not good to give 777. I give permission as suggested. Please can any see below is there any file permission issue.
maddy@maddy:/var/www/html/m2$ ls -l
total 872
drwxr-xr-x  4 maddy maddy   4096 May 30 15:39 app
drwxr-xr-x  2 maddy maddy   4096 May 30 15:39 bin
-rw-r--r--  1 maddy maddy 435065 May 30 15:39 CHANGELOG.md
-rw-r--r--  1 maddy maddy   1843 May 30 15:37 composer.json
-rw-r--r--  1 maddy maddy 344683 May 30 15:39 composer.lock
-rw-r--r--  1 maddy maddy   3381 May 30 15:39 CONTRIBUTING.md
-rw-r--r--  1 maddy maddy    631 May 30 15:39 COPYING.txt
drwxr-xr-x  5 maddy maddy   4096 May 30 15:39 dev
-rw-r--r--  1 maddy maddy   2864 May 30 15:39 Gruntfile.js.sample
-rw-r--r--  1 maddy maddy   1368 May 30 15:39 index.php
-rw-r--r--  1 maddy maddy    315 May 30 15:39 ISSUE_TEMPLATE.md
drwxr-xr-x  4 maddy maddy   4096 May 30 15:39 lib
-rw-r--r--  1 maddy maddy  10376 May 30 15:39 LICENSE_AFL.txt
-rw-r--r--  1 maddy maddy  10364 May 30 15:39 LICENSE.txt
-rw-r--r--  1 maddy maddy   5071 May 30 15:39 nginx.conf.sample
-rw-r--r--  1 maddy maddy   1427 May 30 15:39 package.json.sample
-rw-r--r--  1 maddy maddy    814 May 30 15:39 php.ini.sample
drwxr-xr-x  2 maddy maddy   4096 May 30 15:39 phpserver
drwxr-xr-x  6 maddy maddy   4096 May 30 15:39 pub
drwxr-xr-x  7 maddy maddy   4096 May 30 15:39 setup
drwxr-xr-x  7 maddy maddy   4096 May 30 15:37 update
drwxr-xr-x  2 maddy maddy   4096 May 30 15:39 var
drwxr-xr-x 29 maddy maddy   4096 May 30 15:39 vendor


texts: Displaying Product Properties in a Static Block

texts:
Short of creating my own widget or block class to do so, is there a way to display a product's name, sku, price, or other property in a static block or CMS page?

If there isn't a way to do this out of the box, is there a well excepted way to achieve this?

That is, I'd like to be able to do something like this in a block or page

{{block type="some/block" sku="PRODUCT_SKU" variable_to_display="name"}}

and have the product's name appear in the static-block/page.

Does this exist in Magento's core?  Somewhere in the community?


texts: How to minify/optimise Javascript on Magento 2?

texts:
I've been struggling for a while with minify javascript on magento 2. The admin option for minification doesn't work so I've been looking for another solution. I've tried a gulp script to do it but this is causing issues with require js where certain files are not ready in time to be included.

Has anyone found a solution for minifying javascript on magento 2?


texts: How to set up properly Cron job on shared hosting

texts:
I'm trying to set up correctly the Cron job for my Magento so i can send the newsletter.

I've seen many guides but any of them worked for me.

Here is my PHP info file: http://sportsdirect.bg/phpinfo.php

For now any Cron job is running for my Magento, i need to set it up!

Can you please give me the command i should place in my cPanel so it will run ot every 5 minutes.

My Magento version is 1.9.0.1.

Thanks in advance!


texts: Magento Restful Api, Creating a virtual product

texts:
Finally gotten our Restful API working with our third-party app, and of course bumped into what may become a very stressful headache.

How do I go about allowing API Virtual Product Creation?

When I went to go create a virtual product, using the following json...

{
   "type_id":"virtual",
   "attribute_set_id":4,
   "sku":"api-order-json",
   "status":1,
   "visibility":1,
   "name":"Api Virtual Product",
   "description":"Simple Description",
   "short_description":"Simple Short Description",
   "price":125,
   "tax_class_id":0
}

I get the lovely return statement "Creation of products with type 'virtual' is not implemented", which is a huge dream killer. As all of our needed products are virtual.


texts: Magento2 : Undefined Index amount in Order/Totals/Tax.phtml file

texts: I installed one GST module on my local instance. after installing that module i am unable to create invoice for sales order. Getting the attached error message.I disabled all my third party extensions including GST extension as well. Still i am getting issue.


texts: Proceeding to an exception page after save new category

texts:
When I save new category, I proceed to exception page.

exception 'Magento\Framework\Exception\LocalizedException' with
message 'Can't create directory
/var/www/html/var/generation/Magento/Catalog/Model/Indexer/Category/Product/.'
in /var/www/html/vendor/magento/framework/Code/Generator.php:103 Stack
trace:
/var/www/html/vendor/magento/framework/Code/Generator/Autoloader.php(35):
Magento\Framework\Code\Generator->generateClass('Magento\Catalog...')
1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\Catalog...')
2 [internal function]: spl_autoload_call('Magento\Catalog...') 3 /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php(19):
ReflectionClass->__construct('Magento\Catalog...') 4
/var/www/html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44):
Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Catalog...')
5 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71):
Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Catalog...')
6 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(57):
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Catalog...',
Array) 7
/var/www/html/vendor/magento/framework/Indexer/ActionFactory.php(35):
Magento\Framework\ObjectManager\ObjectManager->create('Magento\Catalog...',
Array)  and more...#0

What is the problem? And how can I resolve it?
I use Magento ver. 2.0.0


texts: Magento2 varnish is running but not caching page

texts:
I have configured varnish and enabled this in magento configuration to use in full page cache. Also updated vcl file downloaded from magento. But this doesn't work, every time request's response gives MISS and AGE 0 . Currently running magento in developer mode.

Anyone have any clue why this happening and how can i resolve this.


texts: Possible to index multiple products at a time? (Not all products at a time, not one at a time)

texts:
Back in Magento 1.3x there was a programatic way to kick off the index processing for a list of products. But somewhere between 1.3.x and 1.6.x Magento's indexing code was refactored and I can't figure out how to get that same functionality.

It seems that in CE 1.6+ we have the option of kicking off an indexing process for all products, or we have the option to kick off the indexing process for a single product. But I have a list of products (ten to a couple hundred) that I want to reindex, but I don't want to run them individually if possible.

If it makes a difference, I am only interested in the pricing index process.


texts:
To create extra fields in the backend I use the code below in system.xml:

...
<fields>
    <websiteType>
        <label>Website type</label>
        <frontend_type>select</frontend_type>
        <source_model>frontendview/selectType</source_model>
        <sort_order>1</sort_order>
        <show_in_default>0</show_in_default>
        <show_in_website>0</show_in_website>
        <show_in_store>1</show_in_store>
        <comment>Please select the type of website, this is used to determine certain frontend values</comment>
    </websiteType>
</fields>
...

Even if I set this:

<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>

It's shown als options per storeview.

My question: How can I set this as a GLOBAL option?


texts: To check the user in logged in or not in Magento 2

texts:
I have used the following code to check the user is logged or not. It always show me "Login Failed" after the user is logged to the site also.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
 if($customerSession->isLoggedIn())
   {
    echo'login success';
   }

  else {

   echo 'login failed';
  }


texts:
Ok so i have about 15 footer links of pages at my homepage.I have all the pages designed and i have set them all in footer static block.But i can access them only from my homepage if i access them from any category page or checkout page it gives an 404 error page not found.
Details:
For example here is my page FAQ:
The URL Key of FAQ page is:

apollo-faqs

whereas in footer static block the link of FAQ is as under:

 FAQ's

My site's url is:
My Site


texts: get total number of users on product page

texts:
I am trying to get total number of logged in and not logged in users currently on particular product page.

<?php
            $visitor_count = Mage::getModel('log/visitor_online')
            ->prepare()
            ->getCollection()->count();

        if(!empty($visitor_count) && $visitor_count > 0)
        {
            $cnt =  $visitor_count;
                echo 'Visitors online :'.$cnt;
        }
?>

Using above code I am getting total number of  users  active in the website. How should I filter on current product page to see total number of users on  current product page.


texts: noUiSlider.js is not working in the magento 2

texts:
My sited loaded noUiSlider.js  in the template file in custom module but when I call the function in my custom js I was getting this error:

ReferenceError: noUiSlider is not defined

In this code

require(['jquery'],function($){
(function($){
$(window).on("resize load", toggleNav);
        var textLineHeight = $("#text-line-height").get(0);
        noUiSlider.create(textLineHeight,  {start: 0, range:{'min': 1, 'max': 5}, connect: 'lower'});
});

Can you help me how I fix this error in Magento2?


texts:
Im using a magento site with 1.9.1 version and the site is very slow.
At googlespeedsight im getting 55-60% at gmetrix its better but its 70% but the page load speed is very slow.
There are two main option: Add Expires headers,Leverage browser caching.
I've searched a lot but i can only find one solution what is to add some expire code the htaccess file.I did it but Leverage browser caching only increased to 6%
from 0%, Expires headers didnt change(still zero).
How could i increase this,is there other solution?

Also Minify JavaScript and CSS is only 30% and combine images usin css is 0%, other Minify JavaScript is 65%,optimize images 80% while i use Cloudflare plus
my site is still very slow.

What have i done to increase:
1.Use Business Cloud serves.
2.Use Cloudflare plus.
3.Use SiteGround's SuperCacher
4.At Cpanel i enabled compress all data.
5.At magento admin panel i enabled Merge Javascript and CSS.
6.At magento i enabled Compilation.

I searched on google for days but i only find these as main changes to do to speed up the site.


texts: How to upgrade Magento 2 when Magento was installed via GIT?

texts:
I followed the upgrade instruction:

composer require magento/product-enterprise-edition 2.1.1 --no-update

composer update

Then I get this error message:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/product-enterprise-edition could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

In my case git was only used to clone Magento2 repo for the installation purpose, and it was really quick and easy. However I didn't realise the issue afterwards that I'm unable to upgrade my Magento2.

I did try to setup git and I forked a copy of magento2 repo to use it as my remote origin. But because I'm very limited in git, things get worse and worse, and I messed up my whole local code base, had to restore it via a backup copy.

After all the hassle I wish I never used git for the start, is it possible to upgrade Magento without using git at all (although it was installed by git)?


texts: Customer Group price not add in cart page when we edit quote and quote have bundle items?

texts:
$product = Mage::getModel('catalog/product')->load($item->getProductId());
 $product->setCustomerGroupId($customer->getGroupId());
 $product->save();

 $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
 $info    = $options['info_buyRequest'];
 $request = new Varien_Object();

 if (!$request->hasQty())
 {
      $request->setQty($item->getQty());
 }

 $request->setData($info);
 $cart->addProduct($product, $request); $cart->save();

If you have any idea please share here.

Thank You.


texts: Magento 2: How to add block inside block html content through XML file

texts:
I have created my custom arithmetic captcha. I want add that captcha to my custom form through xml file without defining in phtml file on custom layout.
For example:

Testimonail submit form:  testimonial_form.phtml  file contains

  <form name="testimonial" action="testimonial/post/index" method="post">

 <input type="text" name="name" />
 <!--  I want captcha here through XML --!-->

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

I want to add my custom captcha through xml before th submit button.  How can i do that?

Any help would be appreciated.


texts: Magento 2: Missing required argument $mainTable from Model\ResourceModel\Deal\Grid\Collection

texts:
Missing required argument $mainTable from Model\ResourceModel\Deal\Grid\Collection

But I check my all file and all code working fine but this error show on dashboard.


texts: Magento 2 not able to login to admin pane;

texts:
I just installed a plugin via composer. Note the site and admin panel worked just fine prior and the customer facing sie of the site seems to work fine. After the plugin install I then re-compiled via the command line. Now when I go to the admin panel of our Magento 2 website and enter my username and password I get an error message that says

Exception printing is disabled by default for security reasons.
Error log record number: 1467091421105

Now when I look at that 1467091421105.log file in the report folder it says:

 a:4:{i:0;s:137:"The stream or file "/var/www/html/****.com/v2/var/log/debug.log" could not be opened:
 failed to open stream: Permission denied";i:1;s:6539:"#0 /var/www/html/****.com/v2/vendor/magento/framework/Logger/Handler/Base.php(60):
 Monolog\Handler\StreamHandler->write(Array)

When I look in the exception.log file I see:

[2017-09-06 14:42:03] main.CRITICAL:
Magento\Framework\Exception\FileSystemException: Cannot read contents from file"/var/www/html/***.com/v2/pub/static/frontend/Smartwave/porto_child/en_US/mage/requirejs/mixinss.js"

Warning!file_get_contents(/var/www/html/****.com/v2/pub/static/frontend/Smartwave/porto_child/en_US/mage/requirejs/mixins.js): failed to open stream: No such file or directory in /var/www/html/****.com/v2/vendor/magento/framework/Filesystem/Driver/File.php:149


texts: magento 2 get multi valued attribute field values of product

texts:
I want Dealer store view attribute value of product.

I have tried this

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$eavConfig = $objectManager->get('\Magento\Eav\Model\Config');
$attribute = $eavConfig->getAttribute('catalog_product', 'manufacturer');
$options = $attribute->getSource()->getAllOptions();

$optionsExists = array();

foreach($options as $option) {

    $optionsExists[] = $option['value'];
}

echo "<pre>"; print_r($optionsExists); die;


texts:
I have 3 websites in my current Magento installation and are as follows website1 Code: base, website2 Code: au, website3 Code: ca. Each website has one store and one store_view except for website3 which has 2 store-views.
I want the users to be automatically navigated to a specific website based on their country. For example, all users with the country code US to be navigated to website1.
I have checked that ipinfo.io provides country code through an API call as follow
# Get country ISO code as plaintext
$ curl ipinfo.io/8.8.8.8/country?token=$TOKEN
US

Can anyone help with its implementation for my Magento 2.2.6 instance?


texts: Remove checkboxes in customer-account-edit and show all info

texts:
In customer-account-edit page magento decided (why???) to insert 2 checkboxes:

By default only if you click on those checkboxes the other fields appear so you can change them.

I would like to remove this functionality and to show all fields from page load.

Simply display block will not work as magento2 does some knockoutjs and disables the fields but I cannot find where it is done.


texts: Magento 2 order quantities by groups of 4

texts:
I want to make a B2B wholesale website in M2 and my question is if there is a way (by default or extension) so a registered customer can order items by groups of 4,16, etc.
For example, if the product was batteries, the customer should be able to order 4,16,etc. because they come in packs - he can't order eg. 5 batteries (a 4pack and a single battery...)

Any suggestions?


texts: Import product with media/catalog/product folder

texts: We have 2 servers. Some changes made in the product name, category changes and custom_options in the first server.  So we need to import the products with images in the second server which is exported from the first server.  How to do products import with media/catalog/product folder images in magento import?


texts: Magneto 2.4.1 How can I display my account link in top links?

texts:
I am using custom theme.
How can I show My account link in header after successfully login.


texts: Is it possible to create products with nested attributes in Magento? If yes, how can that be achieved?


texts: Used technology for xml-files in app/design folder

texts:
I try to reach a better understanding of my Magento2 installation. I use a theme which place xml-files in app\design\frontend[,,].
I try to find out, how the xml file is used? In which way or by what technology the xml-files are interpreted?

Thanks, Mario


texts:
Hello is it possible to get the 'price' without shipping & tax?

$transactionAmount = $order->getData('price');


texts:
I'm very new to Magento development, but i've migrated over from wordpress development.

One of the things I love most about wordpress development is how easy it is to make almost everything on the site customisable in the backend.

Whats the best practise for creating custom fields in the backend of magento which I can pull through into my custom modules?

I need to be able to create things like customisable menu's that are global on the site, but also create customisable fields that are unique to each page if I wanted.

Can someone point me in the right direction for the approach I should be taking, as I have no idea whats the correct way to achieve this and don't want to be wasting my time!


texts: Setup:static-content:deploy "Error : vendor/tedivm/jshrink/src/JShrink/Minifier"

texts:
The follwing error occurs during the command php bin/magento setup:static-content:deploy en_US de_DE execution, but the command continues to work.

  "Error : vendor/tedivm/jshrink/src/JShrink/Minifier"

It's in production mode

How to fix it?

#0 vendor/tedivm/jshrink/src/JShrink/Minifier.php(231): JShrink\Minifier->saveString()
#1 vendor/tedivm/jshrink/src/JShrink/Minifier.php(144): JShrink\Minifier->loop()
#2 vendor/tedivm/jshrink/src/JShrink/Minifier.php(110): JShrink\Minifier->minifyDirectToOutput('"no use strict"...', Array)
#3 vendor/magento/framework/Code/Minifier/Adapter/Js/JShrink.php(27): JShrink\Minifier::minify('"no use strict"...')
#4 vendor/magento/framework/View/Asset/PreProcessor/Minify.php(50): Magento\Framework\Code\Minifier\Adapter\Js\JShrink->minify('"no use strict"...')
#5 vendor/magento/framework/View/Asset/PreProcessor/Pool.php(77): Magento\Framework\View\Asset\PreProcessor\Minify->process(Object(Magento\Framework\View\Asset\PreProcessor\Chain))
#6 vendor/magento/framework/View/Asset/Source.php(152): Magento\Framework\View\Asset\PreProcessor\Pool->process(Object(Magento\Framework\View\Asset\PreProcessor\Chain))
#7 vendor/magento/framework/View/Asset/Source.php(105): Magento\Framework\View\Asset\Source->preProcess(Object(Magento\Framework\View\Asset\File))
#8 vendor/magento/framework/View/Asset/File.php(157): Magento\Framework\View\Asset\Source->getFile(Object(Magento\Framework\View\Asset\File))
#9 vendor/magento/framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()
#10 vendor/magento/framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))
#11
vendor/magento/module-deploy/Service/DeployStaticFile.php(89): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))
#12
vendor/magento/module-deploy/Service/DeployPackage.php(185): Magento\Deploy\Service\DeployStaticFile->deployFile('js/lib/ace/work...', Array)
#13
vendor/magento/module-deploy/Service/DeployPackage.php(132): Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), Object(Magento\Deploy\Package\Package))
#14 vendor/magento/module-deploy/Service/DeployPackage.php(103): Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), Array, false)
#15 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}()
...


texts: Autocomplete form field using Knockout Js on Magento2 Checkout

texts:
I have created a module to which autocompletes the city field of Magento. I am facing an issue which says

TypeError: Unable to process binding "shippingAutoComplete: function(){return {
        selected:selectedCity,options:getCities} }"

I have referred this thread to create my module Validation Error with jQuery-UI Autocomplete and KnockoutJs - Magento 2

Please let me know what mistakes I am doing here

Here is my module code:

<?php

namespace Vendor\ModuleName\Plugin\Checkout\Block\Checkout;
class LayoutProcessorPlugin
{
    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array $jsLayout
    )
    {
        $cityField = [
            'component' => 'Vendor_ModuleName/js/shippingAutoComplete',
            'config' => [
                'customScope' => 'shippingAddress',
                'template' => 'ui/form/field',
                'elementTmpl' => 'Vendor_ModuleName/autocomplete/shippingAddress/cityInput',
                'id' => 'city',
                'tooltip' => [
                    'description' => 'Select a City.',
                ],
            ],
            'dataScope' => 'shippingAddress.city',
            'label' => 'City',
            'provider' => 'checkoutProvider',
            'sortOrder' => 53,
            'validation' => [
                'required-entry' => true
            ],
            'options' => [],
            'visible' => true,
        ];

        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['city'] = $cityField;

        return $jsLayout;
    }
}

app/code/Vendor/ModuleName/view/frontend/web/js/shippingAutoComplete.js

define([
    'Magento_Ui/js/form/element/abstract',
    'mage/url',
    'ko',
    'jquery',
    'jquery/ui'
], function (Abstract, url, ko, $) {
    'use strict';

    ko.bindingHandlers.shippingAutoComplete = {
        init: function (element,valueAccessor) {
            var settings = valueAccessor();
            var selectedOption = settings.selected;
            var options = settings.options;
            var updateElementValueWithLabel = function (event, ui) {
                event.preventDefault();
                $(element).val(ui.item.label);
                if(typeof ui.item !== "undefined") {
                    selectedOption(ui.item);
                }
            };

            $(element).autocomplete({
                source: options,
                select: function (event, ui) {
                    updateElementValueWithLabel(event, ui);
                }
            });
        }
    };

    return Abstract.extend({
        selectedCity: ko.observable(''),
        getCities: function( request, response ) {
            $.ajax({
                url: url.build('list/check/cities/'),
                data: JSON.stringify({
                    q: request.term
                }),
                contentType: "application/json",
                type: "POST",
                dataType: 'json',
                error : function () {
                    alert("An error have occurred.");
                },
                success : function (data) {
                    //Data is a string of the form: '[{"label": label, "value": value}]'
                    response( data );
                }
            });
        }
    });
});

app/code/Vendor/ModuleName/view/frontend/web/template/autocomplete/shippingAddress/cityInput.html

<input class="admin__control-text" type="text"
           data-bind="
    shippingAutoComplete: {
        selected: selectedCity,
        options: getCities
    },
    event: {change: userChanges},
    value: value,
    valueUpdate: valueUpdate,
    hasFocus: focused,
    attr: {
        name: inputName,
        placeholder: placeholder,
        'aria-describedby': noticeId,
        id: uid,
        disabled: disabled
}"/>


texts: Magento 2.2.1:- How to add text in between main image and thumbnail image

texts:
I tried to add text between main image and thumbnail image but i can not add image
I also refer this link:- How add div after image block in Magento 2?


texts: Magento 2, how to allow a customer login only one device at the same time?

texts: Using magento 2. I want to allow a user customer use only one device at the same time. Example It look like admin login, admin cannot login to other device while they login current device.


texts: Uncaught TypeError: Argument 1 passed to [...] must be an instance of

texts:
I have been having this issue for several weeks now and after looking through similar issues on this site and others, I still can't figure out how to solve this problem.

After successfully executing setup:di:compile, the var/di folder gets created in my Magento directory. my homepage and CMS pages keep working fine, but after compilation I noticed my category pages (for ex. domain.com/shop) give me the following error:

  Fatal error: Uncaught TypeError: Argument 1 passed to Plazathemes\LayeredNavigation\Controller\Category\View::__construct() must be an instance of Magento\Framework\App\Action\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in directory/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in directory/www/app/code/Plazathemes/Layerednavigation/Controller/Category/View.php:27
  Stack trace: #0 directory/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Plazathemes\LayeredNavigation\Controller\Category\View->__construct(Object(Magento\Framework\ObjectManager\ObjectManager)) #1 directory/www/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Plazathemes\Lay...', Array) #2 directory/www/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\F in directory/www/app/code/Plazathemes/Layerednavigation/Controller/Category/View.php on line 27

My code/Plazathemes/LayeredNavigation/Controller/Category/View file starts with this:

class View extends \Magento\Catalog\Controller\Category\View
{
    private $layerResolver;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Catalog\Model\Design $catalogDesign,
        \Magento\Catalog\Model\Session $catalogSession,
        \Magento\Framework\Registry $coreRegistry,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator $categoryUrlPathGenerator,
        PageFactory $resultPageFactory,
        \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory,
        Resolver $layerResolver,
        CategoryRepositoryInterface $categoryRepository
    )
    {
        parent::__construct($context, $catalogDesign, $catalogSession, $coreRegistry, $storeManager, $categoryUrlPathGenerator, $resultPageFactory, $resultForwardFactory, $layerResolver, $categoryRepository);
        $this->layerResolver = $layerResolver;
    }

    public function execute()
    {
        // somthing
    }

}

I contacted my theme support but they told me this error is not a result of a bug in their theme.

Anyone who can help me figure this out? I'm fairly new to Magento and quite overwhelmed by all these errors. I've already sorted out most of my problems and errors, but this one keeps coming back.

If you need any additional code, please let me know.

I'm running Magento 2.1.5

EDIT: FYI when I delete my var/di folder or just the global.serand frontend.serfiles in it, the category pages work again but uncompiled, making them extremely slow to load. So I need to sort this out in order to have my compiled files working.


texts: Hide magento admin advanced menu and other menu items on left side in System Configuration

texts:
I searched whole of google but could not find a hint to hide many of the admin menu items that are there on left side under System > Configuration. Please help with this. I want to hide few of the items like Advanced, System, Developer etc.

What I am able to achieve so far is disable top menu items by making them dependent on non-existing module, but this is not helping with the above mentioned menu items.


texts: Magento 2 Wrong products count on Advanced Search & Catalog Product List

texts:
I am using Magento 2 and have noticed a wrong products count on Advanced Search & Catalog Product List.

For example for Advanced search it may show 3 products and total count will say 10. Same for Catalog Product List Widget total is incorrect. We have only configurable products visible on front end we have disable all static products.

any ideas?


texts: Get custom controller url in ajax in magento 1.9

texts:
I am trying to get the custom controller in ajax my controller file is located in
app/code/local/Minicart/Quick/controllers/minicartcontroller.php

and the action name of the controller is add_to_minicart here is my code that i tried to access

  function addtoCart(){
    jQuery("#success_message").show();
    jQuery("#success_message").html('<img src="/demo/media/images/loading-round.gif" alt="Loading..." width="77" height="73">');
    var url;
    url = jQuery('#product_addtocart_form').attr('action');

    url = url.replace("checkout/cart", "ajax/index"); // New Code
    if ('https:' == document.location.protocol) {
        url = url.replace('http:', 'https:');
    }
    var data = jQuery('#product_addtocart_form').serialize();
        data += '&isAjax=1';
    try {
        jQuery.ajax({
            url:url,
            dataType:'json',
            type:'post',
            data:data,
            success:function (data) {
                if(data.status=="SUCCESS"){
            //jQuery("#success_message").html(data.message);
            jQuery("#success_message").html(data.message);
             minicartAjax();
             var qty = jQuery("#qty").val();
             var curqty = jQuery(".header-minicart .count").html();
             var newqty=parseInt(qty)+parseInt(curqty);
             jQuery(".header-minicart .count").html(newqty);
                }
            }

        });
    } catch (e) {

    }

}
function minicartAjax(){
    var url = "<?php echo Mage::getUrl('quick/controllers/add_to_minicart');?>";
    alert(url);
    jQuery.ajax({
        url: url,
        dataType: 'json',
        success: function(data){
            //Your minicart html
            alert("hii");
        }
    });
}

when i alert the url it just display this <?php Mage::getUrl('quick/controllers/add_to_minicart');?> how can i get the url of my custom controller


texts: Magento 2 text swatches sort order not working

texts:
I have a problem with the sort order of the text swatches.
I use text swatches for configurable products (clothing with sizes)

On the manage swatch tab of the attribute I have the following options in this order: 92,98,104,110,116,122,128,134,140

in the layered navigation block the swatches show up in the exact order.
on my category and product pages the sort order changes.
I have one product showing the swatches option like: 134,140,92,98,110,122
and another product shows: 134,92,98,104,140

How is this possible and how can I change this?


texts: How to Add New Products Automatically in Magento 1.9?

texts:
I am trying to achieve something like this:

When adding new product, The field for "Set Product as New from Date" will be auto filled with Same day date (Current date) and "Set Product as New to Date"= 1/2/3 months from that date.

I found similar post which advise to create observer event Link(automatic add the product's Set Product as New from Date) . But its not very in detail. Can please someone help me step by step on how to do this?

I want to know how to do that - From start to End - Step by Step.

Thanks


texts: Magento 2 Complete extension translation

texts:
I have created a dictionary with this command:

php bin/magento --output="lang.csv" i18n:collect-phrases app/code/NewModule

This extension has files also into the app/design directory, does I need to create a dictionary from this directory?


texts:
I'd like to find out real world experience on Magento CE (version 2).

Any large scale implementation on CE version?
Implemented headless commerce with CE?
Performance issues, bugs, feature limitations (if any)?
How easy/difficult is to upgrade from CE to EE?

Reason for asking this is that my team is evaluating if we should go for Magento EE or CE from day one. Our business has a vision to grow the platform to cover multiple channels (omni-channel).

The license cost for EE is currently prohibitive.

We are considering to go with CE version first and explore upgrading later to EE version, assuming it is easy.


texts: Category attributes in collection without default value

texts:
I created attribute custom_attribute for category with some default value.
If I save category(for example for store 26) with some value for this attribute I can get via:

Mage::getModel('catalog/category')->load(12); //example where you will get data for your category with this custom_attribute value

But, if you try to load category collection and even use addAttriuteToSelect('custom_attribute'), you won't get a it's value in case you didn't save for default store manually some value.

That's becuase if you look in app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php line 127, you will see that they join table where store_id = 0. That's mean that you need to save category with your custom_attribute for default store.

I've quick idea via observer to assign attribute value for default store.

If there any more clean solutions?


texts: Magento 2 : Show Custom Option value inside summary block sidebar checkout page

texts:
How to add custom option value in summary section of checkout page in magento 2?

For this problems, one field is created in quote_item table with test_option .

I have created one custom option name test_option and its value also set inside quote_item table with serialize.

test_option value are saved in database successfully inside quote_item table.

How to display custom_option value inside summary block of checkout page inside each product item section.


texts: Any reason why I shouldn't automate localization setup with a script?

texts:
Currently working on a localization project. I would like to make it easier for the backend developer I'm working with to deploy to staging/production. Thinking about just writing a simple php script to set all the necessary db values via Magento core write method (instead of the traditional adminhtml drudgery)...

Something like:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once('../magento/app/Mage.php');

Mage::app();

$write = Mage::getSingleton('core/resource')->getConnection('core_write');

$write->query(" INSERT INTO table_name (`whatever`, `columns`, `required`)
VALUES  ( 'corresponding', 'db', 'values')" );
?>

Any compelling reason I shouldn't localize a site via this method?

Thanks in advance for any help!


texts: Remove the + sign from bundled product prices

texts:
How can I remove the leading '+' sign from prices of bundled product components? I have tried changing the $sign = ''; // Originally was $sign = '+'; and also $priceStr = ''; // Originally was $priceStr = $sign; in app/code/local/Mage/Catalog/Block/Product/View/Options/Abstract.php, without luck.

Is this achievable?


texts: Layered navigation filter by attribute - NOT in layered menu

texts:
Layered navigation filter by attribute not in layered menu

Is it possible to filter by an attribute in the url like ?myfilter=1 which is not in the left filter menu? So Use In Layered Navigation is NO.

help appreciated


texts: I have a project Magento 2. It has a folder docker. Please tell me how to deploy an existing project with the help of a docker? Is there a good tutorial?  All I've found is installing a magenta using a docker, ie a new magenta, but I need to install the project.


texts: How to srtip all html from page layout in Magento2

texts:
I am creating a module to generate dynamic product PDFs with  FPDF My problem is I cant get the pdf to render / download as there is already html on the page.

I have created a layout template at Me/MyMod/view/frontent/layout/productpdf_index.xml

  <body>
    <referenceContainer name="content">
         <block class="Modzinc\Productpdf\Block\Product\View\Link"
               name="modzinc.dynamicpdf.linddsk"
               template="Modzinc_Productpdf::product/view/thepdf.phtml"
                after="-">
        </block>
     </referenceContainer>
 </body>

And I have a template file thepdf.phtml

$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(40, 10, 'Hello World!');
header('Content-type: application/pdf');
header('Content-Transfer-Encoding: binary');
header("Content-Disposition: inline; filename='example2.pdf'");
$pdf->Output('example2.pdf', 'I');

Now the pdf libary works but I am getting a page rendered as so

%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream x�3R��2�35W(�r
Q�w3T04�30PISp  �Z*�[����(hx����+���(j*�d��7W
endstream endobj 1 0 obj <> endobj 5 0 obj <> stream
x�]R�n�0��>��L�%�DI�8���~�%E*r�ﻻvҪHX�gvVk? /
���Ῑ��`]�[�x5 �3\z��P�}
����PO���j�Jݍ^���x6/f�����������|���4}�z�����}
���@�,ۖ-��˺E�u�^�,���<� �Z_�K� IQ����Yd����C�K�_�%q�8>�!J"V!2&bGģ%r"H��D��\}2EL1n��h�j���e��"a*H����:��d��9c���[�X1~��"�3�g��Ñ�;O��> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 6 0 R >> /XObject << >> >> endobj 7 0 obj << /Producer (FPDF 1.81) /CreationDate (D:20170512141922) >> endobj 8 0 obj << /Type /Catalog /Pages 1 0 R >> endobj xref 0 9 0000000000 65535 f 0000000228 00000 n 0000000867 00000 n 0000000009 00000 n 0000000087 00000 n 0000000315 00000 n 0000000749 00000 n 0000000971 00000 n 0000001047 00000 n trailer << /Size 9 /Root 8 0 R /Info 7 0 R >> startxref 1096 %%EOF

Now I know why this is its because my page mysiet.com/productpdf is rendering all the usual magento head html and body class stuff so the pdf wont work as the header has already been declared.

I need to know how what I need to put in my page layout file ( productpdf_index_index.xml ) To tell magento just load the thepdf.phtml template file with NO ! other markup, like a completely blank page.

Can anyone help me I suppose I just need a new Blank page layout but I cant figure out how to do it

thanks in advcance


texts: How to get current Url value in magento 2

texts:
In Magento 1 we can the following function to get the referer url

Mage::app()->getRequest()->getServer('HTTP_REFERER');

How to get it in magento 2 I have used,

public function __construct(
    \Magento\Framework\App\Response\RedirectInterface $redirect
) {
    $this->redirect = $redirect;
}
echo $this->redirect->getRefererUrl();
echo $this->redirect->getRedirectUrl();

But it does not return the current Url value

Can anyone help me?


texts: Will Color Swatches Migrated during Magento 1.9 to Magento 2.1 Migration?

texts: I am planning to migrate my site from Magento 1.9 to Magento 2.1. I have a question that I have color swatches on my current site so If I will migrate using Uber Migration tool, Then Can I use those color swatches in Magento-2.1 also?


texts: Success page after redirect from Payment gateway

texts:
I have issues with displaying the success page.Please see process flow below:

After PlaceOrder action, the customer is redirected to payment gateway and after transaction is completed, I redirected to a controller on magento site. This gives me opportunity to get th transaction status and save the details in a custom table.

My issue is after saving, and redirect to check_oneoage_success.xml, it gives me error "1 exception(s):
Exception #0 (Magento\Framework\Exception\InputException): Id required", kindly assist.


texts: Magento 2.3: Can backend pages be cached as well?

texts: My impression is that Magento (2.3.5) does not apply caching on pages in the backend. Is this as intended? If so, why? If not, can caching get enabled for backend pages?


texts: Show Discount Block in Cart Totals using Ajax

texts:
I am working on a custom module where I need to show my discount in cart totals. I am following Classyllama and Turnkey blog posts in order to achieve the same.

I have come to a point where my custom discount is shown in cart totals block. But that is not ajax based. User have to click on a submit button and then only I can see by block being added in cart totals.

What I need to do now is when I click on a checkbox, it should call my controller and after some processing show my block added in cart totals without page reload, as shown below.

<script>
function updateCreditPoints()
{
    var amount = $('discount_amount').value;

    new Ajax.Request("<?php echo $myFormAction?>", {
           method: 'post',
           postBody: "discount="+$('discount_amount').value,
           onComplete: function(data) {
                //somecontainer to update
            }
    });
}
</script>

If checkbox is selected, then container should show the discount block else it should not.

I am unable to find what code should be written in controller action to show my discount block on ajax request.

Please Help.

Thanks.


texts:
I have a dropdown list on the Magento backend extension that I'm developing.

So far, the working code for this dropdown is as follows:

      $fieldset->addField(
            'country',
            'select',
            array(
                'name'  => 'country',
                'class' => 'required-entry',
                'required' => true,
                'label' => 'Country',
                'values' => Mage::getModel('directory/country')->getCollection()->toOptionArray(),
        ));

It works well but doesn't deliver what I'm looking for. Yes, it adds the full list of countries on the backend, but it saves the values with the iso2_code instead of the iso3_code column on directory_country, so instead of saving USA it saves the value US

I've tried adding addAttributeToSelect and addAttributeToFilter but both throw the errors:

  Invalid method Mage_Directory_Model_Country::addAttributeToSelect(Array ( [0] => iso3_code ) )

  Invalid method Mage_Directory_Model_Country::addAttributeToFilter(Array ( [0] => iso3_code ) )

Could you guys please help me?


texts: InstallData Attribute showing only on the frontend and not in customer_entity table

texts:
I have created a module with setup/installdata.php and layout & template files, but the custom attribute is showing up only on the frontside on customer account create form. Am i missing something?

    <?php
    namespace NameSpace\NameSpace\Setup;

    use Magento\Framework\Module\Setup\Migration;
    use Magento\Framework\Setup\InstallDataInterface;
    use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    /**
     * Customer setup factory
     *
     * @var \Magento\Customer\Setup\CustomerSetupFactory
     */
    private $customerSetupFactory;

    /**
     * Init
     *
     * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(\Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory)
    {
        $this->customerSetupFactory = $customerSetupFactory;
    }
    /**
     * Installs DB schema for a module
     *
     * @param ModuleDataSetupInterface $setup
     * @param ModuleContextInterface $context
     * @return void
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;
        $installer->startSetup();

        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
        $entityTypeId = $customerSetup->getEntityTypeId(\Magento\Customer\Model\Customer::ENTITY);
        $customerSetup->removeAttribute(\Magento\Customer\Model\Customer::ENTITY, "reg_code");

        $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, "reg_code",  array(
            "type"      => "varchar",
            "backend"   => "",
            "label"     => "Company Reg. code",
            "input"     => "text",
            "source"    => "",
            "visible"   => true,
            "required"  => false,
            "default"   => "",
            "frontend"  => "",
            "unique"    => false,
            "note"      => ""
        ));

        $reg_code   = $customerSetup->getAttribute(\Magento\Customer\Model\Customer::ENTITY, "reg_code");
        $reg_code = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'reg_code');

        $used_in_forms[]="adminhtml_customer";
        $used_in_forms[]="checkout_register";
        $used_in_forms[]="customer_account_create";
        $used_in_forms[]="customer_account_edit";
        $used_in_forms[]="adminhtml_checkout";
        $used_in_forms[]="customer_address";
        $used_in_forms[]="customer_address_edit";

        $reg_code->setData("used_in_forms", $used_in_forms)
            ->setData("is_used_for_customer_segment", true)
            ->setData("is_system", 0)
            ->setData("is_user_defined", 1)
            ->setData("is_visible", 1)
            ->setData("sort_order", 121);

        $reg_code->save();

        $installer->endSetup();
    }
}


texts: How to get base secure url without index.php

texts:
I want to to get base-secure-url without index.php.

I enabled index.php for some reason. Now I have a PHP file at Magento root directory, and I want to call Magento secure pages from this PHP file.

Note: i have multi stores in my site

Please provide more ideas on this.


texts: How to send custom drop down option on shipping method step

texts:
I have just added a custom drop down option at the payment method section for users to select. Once the payment success, this extra custom option will be sent to the store's email along with all the other shipping/billing/etc information.

Which file do I edit now to allow this added custom field to be sent along with all the other fields? I just don't know how this all handled in the Magento system at the moment.

The code I just added in shipping_method.phtml:

<?php echo $this->__('Special Occassion?'); ?>

        <select>
            <option value="" selected>None</option>
            <option value="birthday">Birthday</option>
            <option value="valentines">Valentine's Day</option>
            <option value="holidays">Holidays</option>
            <option value="anniversary">Anniversary</option>
            <option value="graduation">Graduation</option>
        </select>


texts:
I want to run a sql query in a PHP file and save the result in a csv file (inkl. header). Unfortunately I don't get it done. It looks like I can't use mysql_* on the result. Does anyone know how to fix it?

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

$sql = "SELECT * from sales_flat_order";

$connection = Mage::getSingleton('core/resource')->getConnection('core_read');

$result = $connection->fetchAll($sql); //fetchRow($sql), fetchOne($sql),...

if (!$result) die('Couldn\'t fetch records');
$num_fields = mysql_num_fields($result);
$headers = array();
for ($i = 0; $i < $num_fields; $i++) {
    $headers[] = mysql_field_name($result , $i);
}
$fp = fopen('php://output', 'w');
if ($fp && $result) {
    header('Content-Type: text/csv');
    header('Content-Disposition: attachment; filename="export.csv"');
    header('Pragma: no-cache');
    header('Expires: 0');
    fputcsv($fp, $headers);
    while ($row = $result->fetch_array(MYSQLI_NUM)) {
        fputcsv($fp, array_values($row));
    }
    die;
}


texts: Email template preview is not working on live Magento 2

texts:
When i try to view the template in Live i am getting a blank screen but if try to view the template locally or on staging it works without any issues.

Can anyone give me a hint or any help idea to get this working


texts: What is the difference between Cost and Price?

texts:
I'm currently reviewing code that edit a shipping method and there's

$method->setCost([int]);
$method->setPrice([int]);

What is the difference between those two? When should they be different or the same?

Thanks


texts: How to remove "Select Visible", "Unselect Visible" and Next Page buttons from grid

texts:
I have a custom grid, and I wanna remove the highlighted parts from it:

I wanna remove only from my custom grid. What would be the best way?

This is my Grid.php:

public function __construct()
{
    parent::__construct();
    $this->setFilterVisibility(false);
    $this->setId('integrationGrid');
    $this->setDefaultSort('entity_id');
    $this->setDefaultDir('ASC');
    $this->setSaveParametersInSession(true);
    $this->setUseAjax(true);
}

public function _prepareLayout()
{
    $this->unsetChild('reset_filter_button');
    $this->unsetChild('search_button');
}

protected function _prepareCollection()
{
    $collection = Mage::getModel('novapc_allnations/integration')->getCollection();

    $this->setCollection($collection);
    parent::_prepareCollection();
    return $this;
}

protected function _prepareColumns()
{
    $this->addColumn(
        'integrate_option',
        array(
            'header'    => Mage::helper('novapc_allnations')->__('Integrate'),
            'index'     => 'integrate_option',
            'type'      => 'text',
            'filter'    => false,
            'renderer'  => 'Novapc_Allnations_Block_Adminhtml_Integration_Renderer_Syncproducts',
            'sortable'  => false
        )
    );
    $this->addColumn(
        'updated_at',
        array(
            'header'    => Mage::helper('novapc_allnations')->__('Updated at'),
            'index'     => 'updated_at',
            'width'     => '300px',
            'type'      => 'datetime',
            'filter'    => false,
            'renderer'  => 'Novapc_Allnations_Block_Adminhtml_Integration_Renderer_Updatedat',
            'sortable'  => false
        )
    );
    $this->addColumn(
        'first_update',
        array(
            'header'    => Mage::helper('novapc_allnations')->__('First update'),
            'index'     => 'first_update',
            'width'     => '300px',
            'type'      => 'datetime',
            'filter'    => false,
            'renderer'  => 'Novapc_Allnations_Block_Adminhtml_Integration_Renderer_Createdat',
            'sortable'  => false
        )
    );
    return parent::_prepareColumns();
}

/**
 * get the grid url
 *
 * @access public
 * @return string
 * @author .
 */
public function getGridUrl()
{
    return $this->getUrl('*/*/grid', array('_current'=>true));
}

protected function _afterLoadCollection()
{
    $this->getCollection()->walk('afterLoad');
    parent::_afterLoadCollection();
}

protected function _prepareMassaction()
{
    $this->setMassactionIdField('entity_id');
    $this->getMassactionBlock()->setFormFieldName('allnations_integration');

    $this->getMassactionBlock()->addItem(
        'integratecat',
        array(
            'label' => Mage::helper('novapc_allnations')->__('Integrar Categorias'),
            'url'   => $this->getUrl('*/*/massCategory')
        )
    )
        ->addItem(
            'integrateprod',
            array(
                'label' => Mage::helper('novapc_allnations')->__('Integrar Produtos'),
                'url'   => $this->getUrl('*/*/massIntegrateProduct')
            )
        )
        ->addItem(
            'updatestock',
            array(
                'label' => Mage::helper('novapc_allnations')->__('Atualizar Estoque'),
                'url'   => $this->getUrl('*/*/massUpdateStock')
            )
        )->setUseSelectAll(false);

    return $this;
}


texts:
We have a website with 2 store views.

One is the frontend that the public sees the other is an 'offline' store that runs a POS system for our staff. I want the offline store to be a completely standard version of magento i.e. run none of the many theme and extra modules we have running on our live store.

I have set the theme to default but now I need to disable the modules. Is there a way to edit the module.xml files so that for the particular store view <active>false</active> or something that achieves that?


texts:
I'm currently developing a Magento 2 site, but I'm having quite a lot of issues with permissions/ownership.

I'm running Magento on a VPS, and I have followed Magentos official documentation for multiple users, not shared hosting.

Currently, I have these users:

root (Web server root)
user (part of the sudoers file)
Magento (Magento filesystem user - Is there any way I can double check/change this?) Also part of www-data group
sftp (My SFTP, locked into /var/www/html)

When I try and upgrade from 2.1.2 to 2.1.3, I get the error :

  Fatal error: Interface 'Psr\Log\LoggerInterface' not found in
       /var/www/html/magento/update/vendor/monolog/monolog/src/Monolog/Logger.php
  on line 27

The file in that directory is there, with 775 permissions for magento:www-data. I have tried user:www-data, magento:www-data .. etc.

My Cron job also fails, it only works via CLI if I append sudo before the commend - I believe this is permissions related too. This fails with the error:

  Command line user does not have read and write permissions on
  var/generation directory.  Please address this issue before using
  Magento command line." - This has 775 permissions, recursive through
  the /var/ dir.

I'm using:

Ubuntu 14.04.1 LTS x64
PHP 7.0.11-1
MySQL 5.6.33
Apache/2.4.7

Aside from chmod 777, I don't know what else to do. I believe that my Magento 2 isn't using the Magento user - how can I check?

Thanks for your time


texts:
I have created new user from admin > permission > user .

Now I want to get current user permission role

 $roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
 $role = Mage::getSingleton('customer/group')->load($roleId)->getData('customer_group_code');
 $role = strtolower($role);

but its now working


texts: Testing/Development Environment on local server

texts:
I need to create a local development environment and struggling a little with the setup. I want to replicate my live server as close as I possibly can. I hope I'm posting this question in a right place...

I want to install Magento ver 2.1.8, running MySQL 5.6, PHP 7.0 with NginX and Debian.

Now, it would be more than one person which will be working on the development sites, therefore, it will have to stored on our local server.

We are working on Windows 10 Pro machines.

I had a look at tools such as VirtualBox, Vagrant and Docker but reading about them got me even more confused. Could anyone help me or direct me a little?

I had a brief look at the LAMP stack too. Could you recommend the best way to go for my situation?

Do I have to use these tools in combination with each other?

Do I have to install the software on each computer or on local server?


texts: Anyone know how conversions are recorded by FB pixel extension?

texts:
I have a Facebook ad running, and via the magic of the pixel, I can see that our website got a conversion today. Hooray! When I look at our Magento orders, though, I see a transaction yesterday but nothing placed today. However, yesterday's order did get invoiced today. This makes me wonder at which point the extension triggers the conversion so that we see it in Facebook. As soon as the order is in the system (at which point it's still processing) or only after it's technically complete on our end?

As a marketing person who knows nothing of coding or how Magento sends data, I kind of just want reassurance that we're seeing a real, completed conversion (especially since there's no means of cross-checking, like with a transaction ID or $ amount). I think my explanation is perfectly logical but does anyone know for sure?

Thank you :)


texts: the category buttons are redirecting me to the home screen on the front end

texts:
On the front end, I have categories that people can click to redirect them to a specific item category. However, whenever I click on the button it redirects me to the home screen, not the item category.

I have already flushed the cache and refreshed it as well. I have also re indexed it.


texts:
Could really use some help...

Trying to connect to SOAP on Magento 1.9.3.8 - can't get it to work on production site, so testing with a fresh install
I'm getting the exact same errors...

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from http://127.0.0.1/api/v2_soap/?wsdl=1
Premature end of data in tag html line 1
If I use our website address instead of 127.0.0.1, I get fatal error "document is empty".

If I access via web http:// or https:// and use our web address, it appears to report the complete xml information fine

I've added our i.p. addresses to hosts file and to hosts allow files

I've tried running secure with everything, then unsecure with everything,

I've increased the default socket timeout to 300

I've tried with default admin routing, and custom also admin routing

If I run PHP info, It shows Soap enabled... I've also checked soap with curl...

I've experimented with the use http settings in Magento... seems to be no difference...

But I still can't get the soap functionality to work...

Am I missing something?...Does anybody have any pointers...

Any help much appreciated... Thank You, Bud


texts: How to disable modules during installation with Magento CLI?

texts: Is there a way to disable some modules during install using cli, same way as it is possible in web wizard? Or is there a way to force composer to not even download some modules?


texts: How to add available qty to cart when customer request more than available qty?

texts:
As asked in the question, Is there any possibility to add available qty(in stock) to the cart when customer requesting more than available qty.

How magento behave with this situation?

ex :

I have 5 qty in product A, Customer requesting 10. I want to add the available 5 to the cart and show a message to customer.


texts: Google Universal Analytics detailed funnel tracking not possible anymore?

texts:
Before, the funnel tracking was working with the following setup.

   /checkout/cart/
   /checkout/onepage/
   /checkout/onepage/opc-billing/
   /checkout/onepage/opc-shipping/
   /checkout/onepage/opc-shipping_method/
   /checkout/onepage/opc-payment/
   /checkout/onepage/opc-review/
   /checkout/onepage/opc-review-placeOrderClicked

But after I upgraded to 1.9.2.1, I can only track

/checkout/cart/index.php
/checkout/onepage/index.php

these steps.

Is it not possible anymore to track other steps such as payment?


texts: How is the Mage::getUrl() method useful?  Why can't I just use a normal relative link?


texts: Unable to activate integration in Magento 2.0

texts: I have created an integration in Magento 2.0. But I am unable to activate it.It gives warning as "Integration 'xyz' has been sent for activation." Can anybody let me know how much time it takes to activate the integration?


texts: Magento 2.2.8: How to solve the message “Unable to send email”?

texts:
I have just installed magento 2.2.8 in XAMPP in local and run folllowing code but it throw error "unable to send mail"
then after When I changed password for customer,it throws same error
I executed php mail() function so This php works fine and it sending mail

 public function execute()
    {
        try {
              $sender = [
                'email' => "a@gmail.com",
                'name' => "aaaa"

            ];
            $sentToEmail = "bbbb@gmail.com";
            $sentToName = "bbbb";

            // $this->state->setAreaCode(Area::AREA_FRONTEND);
            echo "ddd";
            $this->transportBuilder
                ->setTemplateIdentifier(self::TEST_TEMPLATE_IDENTIFIER)
                ->setTemplateOptions(['area' => Area::AREA_FRONTEND, 'store' => 1])
                ->setTemplateVars([])

               ->setFrom($sender)
                ->addTo($sentToEmail,$sentToName)
                ->getTransport()
                ->sendMessage();

           // print_r(__('Everything is fine, email has been sent.'));
        } catch (\Exception $e) {
            echo "<pre>";print_r(__($e->getMessage()));
        }
    }


texts: Linking files with Filezilla - not working

texts:
I have copied and pasted a working link and adjusted it to match the PDF I currently have in Filezilla. But I cannot get it to work... the code I have is:

href="/media/brochure/work_shelter_flyer_general.pdf" target="_blank">

Work and Storage Shelter

the file is in the correct folder in Filezilla so I'm wondering - what have I missed?!


texts: disallowing links in Magento contact form

texts:
I had a working "disallow links" in the contact form in my 1.7.0.2

this was the basic code and did its job:

if(preg_match('/www\.|http:|https:/i',$post['comment']){
    $error = true;
}

it was in Indexcontroller.php and worked well. I them added the same code (on the same Linux server) in the same file on Magento 1.9.3.1  It causes a white screen.

Cache is disabled.

I understand that this is not the ideal way of achieving this, I will move this file to Local pool once it is working.


texts: Magento 2.0 API response is not in JSON format

texts:
Unable to get response in JSON format with POST/PUT requests for adding/updating a Product to the category

Reference link: http://devdocs.magento.com/swagger/index.html#/

API: catalogCategoryLinkRepositoryV1 -> /V1/categories/{categoryId}/products

End point URL ->  http:///rest/default/V1/categories/4/products

Header:

Content-Type: application/json
Authorization:

Request body:

{
  "productLink": {
    "sku": "Happiest_Minds_Bag",
    "position": 0,
    "categoryId": "4",
    "extensionAttributes": {}
  }
}

Response: "true"

The response which I get is a plain string "true" with status code "200 OK". But for any other error status code for this request I get a proper JSON response.

Why am I not getting response in JSON format for status code "200 OK"?


texts: Magento 2 - shipping after clicking next Checkout shows empty

texts:
Console ::

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.paypal.com/xoplatform/logger/api/logger. (Reason: CORS request did not succeed).[Learn More]
JQMIGRATE: Logging is active jquery-migrate.js:21:2
Object { disabled: false, create: null, url: "http://www.test.mydomain.com/" }
searchsuggestion.js:19:17
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More]
checkout
Firefox can’t establish a connection to the server at wss://sg12.zopim.com/s/W/ws/2eT-e3okp++pm1XF/c/1543654229898. v2.zopim.com:39224:8
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More]
checkout
JQMIGRATE: jQuery.browser is deprecated jquery-migrate.js:41:4
console.trace() jquery-migrate.js:43:5
migrateWarn
http://www.test.mydomain.com/pub/static/frontend/Smartwave/porto/en_AU/jquery/jquery-migrate.js:43:5
get
http://www.test.mydomain.com/pub/static/frontend/Smartwave/porto/en_AU/jquery/jquery-migrate.js:58:6
f<
http://www.test.mydomain.com/pub/static/frontend/Smartwave/porto/en_AU/jquery/jquery.ba-hashchange.min.js:9:677
<anonymous>
http://www.test.mydomain.com/pub/static/frontend/Smartwave/porto/en_AU/jquery/jquery.ba-hashchange.min.js:9:389
<anonymous>
http://www.test.mydomain.com/pub/static/frontend/Smartwave/porto/en_AU/jquery/jquery.ba-hashchange.min.js:9:2
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More]
checkout
Use of Mutation Events is deprecated. Use MutationObserver instead. script.js:60:8
Error: You cannot apply bindings multiple times to the same element. knockout.js:2908:23

When click next after shipping

the checkout page shows empty

any payment gateway problem ????


texts: Magento 2.4.1 New Account Key Confirmation

texts:
after updating to 2.4.1 from 2.3.5-p2 we facing the issue that if a customer open an account, mainly try to open an account, Magento will just send the 'Default' New Account Email, instead of the 'New Account Key Confirmation' email. Of course 'Require Emails Confirmation' is set to 'Yes'
After checking, it basically that it use the 'E-Mail' Template of 'Default Welcome Email'. So the Setting under 'Confirmation Link Email' and 'Welcome Email' (email will be sent instead of the Default Welcome Email, after account confirmation) is completly ignored.
Any idea to solve this?
Regards
Joerg


texts: coupon code restrict for only some associated products in magento 1.9.0

texts:
I want restrict coupon code some associate products I have one configurable product it have 25 simple products(associate products)
i have create coupon code to apply only 5 simple product
if i add separate simple products it working fine but when i add configurable it not working can any one tell how to create

Configurable product :: testconfig
simple products :: 1,2,3,4,5,6,7,8,9,10,11,DG10NYHS, DG10NYLS,14,15,16,17,18,19,20,21,22,23,24,25

what i want is my coupon need to apply DG10NYHS and  DG10NYLS product only.

if i add DG10NYHS product to cart it working fine
if i add configurable products it not working


texts:
How to filter drop-down in custom grid in my case its throwing error Below is my grid code

protected function _prepareColumns()
{
    $this->addColumn('attribute', array(
        'header'    => Mage::helper('moduelname')->__('Test'),
        'align'     =>'left',
        'index'     => 'attribute',
        'type' => 'options',
        'renderer'  => 'ModuleName_Namespace_Block_Adminhtml_Renderer_Test',
        'options' => array(
            '0' => Mage::helper('moduelname')->__('Please Select'),
            '1' => Mage::helper('moduelname')->__('On Hold'),
            '2' => Mage::helper('moduelname')->__('Credit Hold'),
            '3' => Mage::helper('moduelname')->__('Open'),
        ),
    ));
    return parent::_prepareColumns();
}

protected function _prepareCollection()
{
    $collection = Mage::getModel('sales/order_status')->getResourceCollection();
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

ERROR:

  a:5:{i:0;s:203:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'attribute' in 'where clause', query was: SELECT COUNT(*) FROM sales_order_status AS main_table WHERE (attribute = '1')";i:1;s:5177:"#0 /var/www/test
  /lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)


texts: Adding transactional email template to transaction email list by custom module

texts:
Can somebody please explain the best practice to add a transactional email to the transactional email list that can be found in the backend at system->transactional emails ?

I know that I need to define a transactional email in config.xml, e.g.

<global>
[...]
    <template>
        <email>
            <mycompany_mymodule_general_email_template translate="label" module="mycompany_mymodule">
                <label>Name of my email template</label>
                <file>my_email_template.html</file>
                <type>html</type>
            </mycompany_mymodule_general_email_template>
        </email>
    </template>
[....]
</global>

After this I can reference it from my module. But it doesn't add automatically to the transactional email list.

If I want my default email template to be shown in the transactional email list (where it can be edited any further by a user) when installing my module, what is the best way to do it?


texts: Dropdown button for "topLinks" in header. Issues with dropdown-menu placement

texts:
I'm working on a bootstrap magento theme. My intentions are to have a dropdown menu for the

Here is a jsFiddle of the exact code I am using to produce the dropdown: jsfiddle/BqKNV/9/ (Must add .net as im <10 rep)

It works, on click it will produce a dropdown menu, although the menu appears on the left side of the header, whilst the button is on the right.

Here is a shot of before click: http://imgur.com/ErWYL8Y after click:http://imgur.com/lQKoQB1

My CSS is form bootstrap, with zero edits regarding dropdown menus.

$this->getChildHtml('topLinks')

    <?php if ($this->getIsHomePage()):?>

<?php echo $this->getLogoAlt() ?><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />

        <?php else:?>
        <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><?php echo $this->getLogoAlt() ?><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />

    <?php endif?>

    <?php echo $this->getChildHtml('topMenu'); ?>

            Action

            <?php echo $this->getChildHtml('topLinks'); ?>

    <?php echo $this->getChildHtml('topContainer'); ?>


texts: Magento 1.9.0.1 to 1.9.1.1 upgrade fails, existing tables

texts:
I tried to upgrade from 1.9.0 to 1.9.1 a long time ago.
Unfortunatly there were some bugs in 1.9.1 which forced me to go back to 1.9.0.
Today I tried to upgrade from 1.9.0 to 1.9.1.1 which failed (internal server error due to existing tables).

I think my mistake was that i didnt restore my database too, so now i already have these tables of 1.9.1, causing an error.

Is there any way to solve that issue? Or is there any way to get my data (or at least parts of it) into a new magento installation?
Exporting and importing products, customers, etc using magento functions would be lots of work.

EDIT:
here is the error message (first three lines)
a:5:{i:0;s:1064:"Error in file: "/var/www/vhosts/austrokamin.at/httpdocs/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'core_email_queue' already exists, query was: CREATE TABLE core_email_queue (


texts: How to get new customer id using customer_save_before event in observer in magento2

texts:
I want to get id of the customer when I add new record of customer new account in customer_save_before event.

Id will be display before record saved in customer_entity table.

How to get id using customer_save_before in observer?

Please help me.


texts: a select attribute created via installer script doesn't show the options as given

texts:
I am trying to create a product attribute through module (custom) install via installer script. here is my code:

$installerx = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup();

$installerx->addAttribute('catalog_product', 'osn_allowed', array(
    'group' => 'General',
    'type' => 'int',
    'backend' => '',
    'frontend' => '',
    'label' => 'Enable Notification',
    'input' => 'select',
    'option' => array(
        'value' => array(
            '1' => array( 'Yes' ),
            '2' => array( 'No' ),
        )
    ),
    'class' => '',
    'source' => '',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible' => true,
    'required' => false,
    'user_defined' => true,
    'default' => '',
    'searchable' => false,
    'filterable' => false,
    'comparable' => false,
    'visible_on_front' => false,
    'unique' => false,
    'apply_to' => '',
    'is_configurable' => false
));

the attribute does create but not with required options as was given rather (using firebug) it shows like this:

<option selected="selected" value=""></option>
<option value="126">No</option>

i want it to be like:

<option value="1">Yes</option>
<option value="2">No</option>

how can i achieve this by updating/correcting the installer code above?

thank you for your time.


texts:
While sales data(customers/orders) keeps growing on the Magento 1 environment, the amount of products in the Magento 2 environment keeps growing as well. Now when I want to migrate the delta, I get errors from the Map step like:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '22883-1' for key 'CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_WEBSITE_ID'

So the delta stumbles upon a duplicate entry MySQL error, because the incremental index on the Magento 2 side has grown faster than the incremental index on the Magento 1 side.

Anyway, I don't need to import products/categories/inventory stock. I tried excluding the Map step by commenting it in the config:

<step title="Customer Attributes Step">
    <delta>Migration\Step\Customer\Delta</delta>
    <volume>Migration\Step\Customer\Volume</volume>
</step>
<!-- Exclude this step...
<step title="Map Step">
    <delta>Migration\Step\Map\Delta</delta>
    <volume>Migration\Step\Map\Volume</volume>
</step>
<!-- -->
<step title="Log Step">
    <delta>Migration\Step\Log\Delta</delta>
    <volume>Migration\Step\Log\Volume</volume>
</step>

Can I just exclude the Map step(containing the catalog migration) or do I need to do something else?


texts: Magento 1.9 checkout page CSS is disturbed after clearing the cache

texts:
Last night I cleared the cache of magento under the magento directory:

/var/cache/

After which the css on checkout page is disturbed now. I try to rollback my changes but still its not working any idea why this is happening.

Only checkout page is effected rest of the website is working properly.

URL: http://54.191.132.18/checkout/onepage/


texts: One or more indexers are invalid. Make sure your Magento cron job is running. (winadows LocalHost wampserver)

texts:
please help, i am using WAMP server 3 on windows and i have installed Magento 2.
but i am getting the following issue.

  One or more indexers are invalid. Make sure your Magento cron job is
  running.

what is the solution for this one

and thanks


texts: Shopping Cart Price Rule for Free Shipping does not work in admin panel

texts:
This bug popped up when I upgraded to Magento 1.9.3(Community Version)

I have set a Shopping Cart Price Rule to allow free shipping from 59.95 euros (Tax included).

This rule works fine in the frontend, when our user wants to order stuff on the site itself.
But when an administrator tries to create an order in the admin panel for a user. The system keeps adding the shipping costs. And does not give the expected free shipping at 59.95 euros. Even when I exceed this amount by a lot.

Edit: Seems like the admin panel doesn't accept coupon codes either....


texts: The value of attribute "Is Active" must be set -error always when trying to create category via SOAP

texts:
I'm trying to create a category via SOAP

    $category_data = [
    'parentId' => 2,
    'name' => 'NIMI',
    'is_active' => 1, // also tried 'isActive' => 1
    'position' => 1,
    'includeInMenu' => 1,
    'category' => 1,
];
// $category_client     $category_client = new SoapClient(
    'http://host/soap?wsdl&services=catalogCategoryRepositoryV1', $category_client->catalogCategoryRepositoryV1Save($category_data);

I'm getting an error Could not save category: %1
with details The value of attribute "Is Active" must be set.

What is wrong here?


texts: Magento 1.9.3.6 new customer account form not working

texts:
I am also facing the same issues after upgrading the magento version from version 1.9.2 to version 1.9.3.6 ...pages simply show flas..
your help would be much appreciable.

Thanks


texts: how to add product sort by newest filter option using pwa theme and graphql magento 2.3.5

texts:
im using scandiweb theme based on react.js ,grphqls and magento version magento2.3.5, i want to add a sort by newest option on category pages. like price and product name already available.
i have successfully add an attribute from store->product->attribute->new attribute and it is showing on category pages but filtering the wrong products.
thanks in advance


texts: Magento 2 - Make log file accessible from browser

texts:
I created a custom log file like this:

$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/my_oh_my.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('TikTok');

How to make this log file can be accessed from the browser?

For example:

  http://base_url.com/var/log/my_oh_my.log


texts: How to Set Store Config (system configuration)

texts:
We can get system configuration values using

Mage::getStoreConfig($xmlPath);

But how can we set such configuration field programatically? I would expect some method like

Mage::setStoreConfig($xmlPath, $val);

But the closest thing I'm seeing is

Mage::app()
    ->getStore()
    ->setConfig($xmlPath, $val);
    ->save();

But this is not updating the config value. Thanks for your time and help.


texts: How to remove page title (h1) from home page, cms_index_index.xml not working

texts:
I´m trying to remove the home page main title on my custom theme (wich is running on top of luma theme).

I´ve tried to add the usual tag to remove, as follows (and as it was already answered here), full content of my current cms_index_index.xml file:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="page.main.title" remove="true"/>
    </body>
</page>

I´ve already tried other aproaches such as

<referenceBlock name="page.main.title" display="false"/>

And

<referenceBlock name="cms_page" display="false"/>

With no success either. Cache is being cleaned and files deployed.
The cms_index_index.xml file i´m working in is located on folder

/app/design/frontend/<vendor>/<theme>/Magento_Cms/layout

What other options do i have? Why isn´t this aproach working?


texts: How to setup Subfolders for multiple Store Views?

texts:
Before asking this question, I did Google search but could not find a clear answer.

I have:

  01 Website + 01 Store
  03 Store Views (vi, en, zh) sharing same products and categories

I want to setup:

mydomain.com/vi (for Vietnamese)
mydomain.com/en (for English)
mydomain.com/zh (for Chinese)

(All the URLs above include "http://", StackExchange wants me to remove it away from the post)

I did: go to Stores -> Configuration -> General -> Web -> choose Store View (vi, en, zh) -> edit Base URL for each Store View to be domain.com/vi (or zh, en) -> Save Config -> go to Cache Management -> select all rows and Refresh

THE RESULT: when going to the store home page (mydomain.com), the system redirects to the default Store View (which is mydomain.com/en), and then it shows 404 error.

What am I missing? Please give me a clear step-by-step answer. I'm using Apache with cPanel, PHP 7, Magento 2.1.2 Community Edition. I'm completely new to (2 days), I understand some basic fundamental ideas of Magento.

Your answers not only help me, but those newbies who would Google the same issue in the future.


texts: How to disbaled flat_catalog on processing time

texts:
I want to disable the flat_catalog on run time for my collection. I am adding the filters but they are causing the problem because of flat_catalog. I want to disable the flat catalog on processing time.

$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('*')
    ->addFieldToFilter('configurator_product_category', array('notnull' => true))
    ->addFieldToFilter('conf_diepte', array('in', $SelectedOptionId));


texts: Magento 2 - i want get customer by id and set custom attribute to customer

texts:
I am working on extension and need to set customer custom attribute value.
I tried the following code, but it's not working , can you please help me with this.

$customer = $this->customerFactory->create();
$customer->setId($observer->getEvent()->getCustomer()->getId());
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('mobilenumber','123465798');
$customer->updateData($customerData);
$customer->save();


texts: Magento2.2.x how to set admin Filter functionality on custom page on frontend grid?

texts:
I have created a custom page and I want to set admin filter functionality on a custom grid on the frontend.

Admin Filter - look the first image.

Frontend grid - want admin type filter above on grid

thanks


texts: How to get recently added sort by option?

texts: I need to have recently added sort by option how can I get this.I searched google and also SE's but cannot found the solutions but not worked.


texts:
I need to add all products widget as a table on my login page
I use magento 2.4
How can I do it?
Used default widgetes, didn't help me.


texts:
Why are there so many thumbnails when I first go to the details page?
After a while, it was gone


texts:
Many times we heared that server side optimization is the first thing we should consider for better performance. What's included in server side optimization?

I try to find and found increase RAM and install varnish are only 2 things we can do for server side optimization.

Is there any other things we can do on server side to optimize the magento's performance?

What else we can do to optimize Magento on  server side?

Is there any different method for Magento 2 on server side?

Any help would be appreciated.


texts:
I am using a magento 2 custom infinite scroll module. When I scroll down ajax request initiate and response come with new page content . But this response not updating on current content . I checked the selector which is fine.
I can see below warning . Is this related to above issue?

$(html) HTML strings must start with '<' character


texts: Cannot upgrade to 2.3.0 using Web Setup Wizard

texts:
I cannot upgrade using the admin System upgrade wizard. When I run the readiness checks everything passes apart from "Check Component Dependency".
The problem reads:

  " We found conflicting component dependencies. Hide detail Command
  "update" failed: Loading composer repositories with package
  information Updating dependencies (including require-dev) Your
  requirements could not be resolved to an installable set of packages.
  Problem 1
  - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
  - magento/product-community-edition 2.3.0 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.32) does not satisfy that requirement. "

So I changed that in the server PHP manager the version to 7.1 and 7.2 and tried both. 7.2 just won't allow the site to work, 7.1 allows the site to work but still won't upgrade.

Can anyone please help, the server PHP from what I can tell is PHP Version 7.2.12.

Thank you.


texts:
Hy everyone. I have a problem and i can't seem to find a solution. When i try to submit the contact form, it remains stuck at "please wait" after sending.
This is an image of the form code.