texts: Error Code appears when editing product and category links no longer work on website

texts:
my website went down a few days ago, I use fast hosts, they reconnected my VPS but since then my category pages no longer work, products do not show on home page and whenever I save a product I get the following error
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_mysteryfunkos.catalog_category_product_index_store1_replica' doesn't exist, query was: SELECT DISTINCT catalog_category_product_index_store1_replica.category_id FROM catalog_category_product_index_store1_replica WHERE (product_id IN (210))
Where would I find the solution for this ?
Website to view is: www.mysteryfunkos.co.uk
Thanks


texts: Add a title field in magento product image

texts:
I have followed this : Adding an extra text area in product images tab backend post to add text field, Now field is showing but i am not getting the value in observer. Here is data :

2017-01-31T06:02:06+00:00 DEBUG (7): Array
(
    [images] => Array
        (
            [0] => Array
                (
                    [value_id] => 2347
                    [file] => /b/h/bh_tread.jpg
                    [product_id] => 1673
                    [label] => BH Fitness S7Ti Treadmill
                    [position] => 1
                    [title] =>
                    [disabled] => 0
                    [label_default] => BH Fitness S7Ti Treadmill
                    [position_default] => 1
                    [title_default] =>
                    [disabled_default] => 0
                    [url] => http://localhost/gym/media/catalog/product/b/h/bh_tread.jpg
                    [removed] => 0
                )

                   )

    [values] => {"image":"\/b\/h\/bh_tread.jpg","small_image":"\/b\/h\/bh_tread.jpg","thumbnail":"\/b\/h\/bh_tread.jpg"}
)

I want add a text field in image section same as Label field as shown in below pic.

I have added the following code in gallery.phtml

 <input type="text" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> class="input-text" onkeyup="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" onchange="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" />


texts: how to pass data from one action to another, with a form in between?

texts:
I found here a way to do a direct passing of data (magento 1) but what if the first controller serves a BO form and then the other controller gets the data,  kinda like edit and save of customer module.

I'm currently trying this approche:

overriding \Magento\Customer\Model\Customer\DataProvider
modifying meta of said form $this->meta = $this->modifyMeta($this->meta);
in modifyMeta() do this:

//adding my field to be processed in the save controller (BO)
$meta['customer']['children']['my_field']['arguments']['data']['config'] = [
    'formElement'   => 'input',
    'componentType' => 'field',
    'visible'       => '0',
    'value'         => 'my value'
];

But in the processing controller, the param is not retrieved with $this->getRequest()->getParam('my_field') (I get a big fat NULL)

if there's maybe a better way, please advise.


texts: How to show product custom attribute next to product in product detail page in magento2.2.5?

texts:
I want to show product custom attribute next to product in product detail page in magento2.2.5?
Any help would be appreciated.


texts: SSL certificate works for the magento backend but doesn’t for frontend

texts:
I’m working for a very good customer of mine, however he has a webshop which runs on an outdated magento version (1.9) and hosting/maintaining ot has been quite of a challenge up until today.
There was a problem with the SSL certificate and the customer asked me to take ama look at it. I installed a newly obtained certificate and updated the base and base secure variables in the backend as per usual.
Now the SSL seems to be working when in the backend (green/secure connection) but not on the frontend (unsecure/red). How can this be?
Anyone experienced this before?
Thank you for advice


texts: Add to Cart button disappears for products with custom options

texts:
Please bear with me as I'm fairly new to Magento. I'm using v1.9.3.2 Community Edition.

So I've bought the Shoppy Store theme on Themeforest and managed to install it but sadly now products with custom options (like size for t-shirts) do not show the 'Add to Cart' (Buy It Now) button on the front-end.

See two different examples here:

Without Buy It Now button: http://www.mytrade.mu/hip-hop-plain-shirt.html
With Buy It Now button: http://www.mytrade.mu/catalog/product/view/id/244/s/big-hair-spinning-brush/category/2/

If I remove the custom options for the product, the Buy It Now button reappears.

Unfortunately the theme developers haven't been of much help.

I'm pretty much at my wits' end here. Any help will be much appreciated!

Thanks!


texts: Get LoggedIn Customer Details in a custom module block

texts:
I am trying to get the customer details from customer session. But I am not able to get it. Below is my code:

class Review extends \Magento\Framework\View\Element\Template
{
protected $customerSession;
protected $logger;

public function __construct(\Magento\Framework\View\Element\Template\Context $context,
        \Magento\Customer\Model\Session $customerSession,
        \Psr\Log\LoggerInterface $logger,
        array $data = []
) {
    $this->logger = $logger;
    parent::__construct($context, $data);
    $this->customerSession = $customerSession;
}

public function getCustomer()
{
    if($this->customerSession->isLoggedIn())
        $customerId = 1;
    else
        $customerId = 0;
    return $customerId;
}

I have tried other solutions also. Like to get customer Id & Name. But I didn't find the solution. I have gone through the Github issues also. But there also I didn't find any solution.

If anyone can help please let me know.


texts: Magento : Advance Search Result as Per Attribute Value

texts:
In my magento search form, there is two attribute (qty, price_each). It's  working fine. I want to show exact result with selected attribute value.

Example : if qty value is 100 and price_each range is 200 to 500 then only  product should show qty is equal or greater than 100 and price 200 to 500.

Currently it shows products whose attribute value is 100 and 200 to 500 since this has 100 as well. I have changed search type mode from LIKE to FULLTEXT but both of mode are giving same result for me.

Any help will be highly appreciated.


texts: Where do I find magento 2 cart buttons action?

texts: I'm using magento 2 , and I need to find the cart close button and go to checkout button actions , and edit it , but I can't find the right files for that, does anyone knows where to find them ?


texts: My Payment Methods not Showing for downloadable/virtual product when checkout?

texts:
My Magento 2.2.6. My Payment methods work properly for product having weight but not Showing My Payment methods with virtual product or downloadable product had no weight, when checkout.

The error message is "No Payment Method available" when checkout[Show If Enable Cash On Delivery & Check / Money order displaying ]. But I configure right and working for product have weight or sample product.

virtual product or downloadable product no need shipping methods my custom payment methods not showing because my payment methods select shipping methods.

For More details issue as No Payment Method Available Virtual Product
also our module


texts: URL's creating Duplicate Content best practices?

texts:
I am using the Community Edition and recently started working on Magento on a site that has been live for 3.5 years. I noticed that in Google Analytics, I am getting 2 different results on the CMS Page

"www.baseurl.com/cms-page" and "www.baseurl.com/cms-page/"

I also noticed that the CMS pages do not have a .html like the products, is that normal? Is there a code I can drop into the .htacess to just reroute the URLS from "/cms-page/" to "/cms-page"? Or should I look at an SEO plugin? The CMS pages have interlinks as well that do not have consistency, so before I go in and do everything by hand...

What are the best practices here and best fix? Thank you.

Current Rewrite Rules and Conditions

############################################
## enable rewrites

# For security reasons, Option followsymlinks cannot be overridden.
#    Options +FollowSymLinks
    Options +SymLinksIfOwnerMatch
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/

############################################
## uncomment next line to enable light API calls processing

#    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

############################################
## rewrite API2 calls to api.php (by now it is REST only)

    RewriteRule ^api/rest api.php?type=rest [QSA,L]

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]

############################################
## redirect for mobile user agents

    #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
    #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
    #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

</IfModule>


texts: Magento 1.9 Fast Loading Responsive Theme

texts:
Does anybody know of a fast loading responsive theme that works with Magento 1.9.
We don't need anything fancy - just main nav bar on the top, and 2-column category pages. Oh yes, we have a slider on the home page - that's about it.

We don't really need anything special, just need it to load fast and efficiently. Can you recommend something fast?


texts: Dockerfile for php to install magento 1.9.x on docker

texts:
I need to install magenot 1.9 on docker. Now, I have to create Dockerfile for php 7.2 with extensions which need magento.
Extensions:

curl
dom
gd
hash
iconv
mcrypt
pcre
pdo
pdo_mysql
simplexml

How can I do this?


texts:
I've got a Magento 2 dev installation all setup, I've pulled from my repo and setup the site.

The frontend seems to be working OK, I can see information being pulled from the database.

The issue is when I try and do anything in the admin, it's just broken, the Magento logo isn't showing on the top left and none of the sub-menus is working.

I have this error in the console:

http://domain.co.uk/static/version1570049246/adminhtml/Magento/backend/en_US/requirejs/require.js net::ERR_ABORTED 404 (Not Found)

I've tried setting the site to developer mode, clearing cache, upgrading and compiling again but with no such luck.

Any help would be great.

EDIT

After looking in this folder:

pub/static/adminhtml/Magento/backend/en_US/requirejs

I can't see the require.js file, does this need to be symlinked?


texts:
I haven't made any changes my website was working properly. Magento version is 2.3.1 CE While I was going through configuration options suddenly getting 500 internal server error. Below is error log

Fatal error: Uncaught InvalidArgumentException: Unable to unserialize
value, string is corrupted. in
/home/j9pt3t5cpkfw/public_html/check/vendor/magento/framework/Serialize/Serializer/Serialize.php:39
Stack trace: #0 [internal function]:
Magento\Framework\Serialize\Serializer\Serialize->Magento\Framework\Serialize\Serializer{closure}(8,
'unserialize(): ...', '/home/j9pt3t5cp...', 43, Array) #1
/home/j9pt3t5cpkfw/public_html/check/vendor/magento/framework/Serialize/Serializer/Serialize.php(43):
unserialize('a:1483:{s:11:"p...', Array) #2
/home/j9pt3t5cpkfw/public_html/check/vendor/magento/framework/App/ObjectManager/ConfigLoader.php(79):
Magento\Framework\Serialize\Serializer\Serialize->unserialize('a:1483:{s:11:"p...')
3 /home/j9pt3t5cpkfw/public_html/check/vendor/magento/framework/App/ObjectManager/Environment/Developer.php(79):
Magento\Framework\App\ObjectManager\ConfigLoader->load('global') #4
/home/j9pt3t5cpkfw/public_html/check/vendor/magento/framework/App/ObjectManagerFactory.php(188):
Magento\Framework\App\Object in
/home/j9pt3t5cpkfw/public_html/check/vendor/magento/framework/Serialize/Serializer/Serialize.php
on line 39


texts: Best way to mass enable / disable products (probably sql?)

texts:
I need to add several products with different categories in a magento store and leave them disabled. After certain date, I need to enable all of them and disable current enabled product.

My first thought is to:
Add special name int prodcut name, for instance:

sp1-Donut
sp1-Coffee
sp1-Tea

afterwards select all items via sql and set their status on disabled

select all items that contain sp1 and enable those.

Would there be another option in order to do that?


texts: Magento2.1.1: Theme static pages doesn't load

texts:
I have recently installed Magento 2.1.1 CE with Ultimo theme. Unfortunately predefined CMS static pages doesn't load on home page. Al other static blocks are loading ok (eg. in the footer). The cache was flushed. I reimported several times to make sure that there was no error but without success. Permissions on server are ok.

I don't have any idea why is not working.

Can anyone have a suggestion?

Thank you,
Cornel


texts: how to set product attribute value programmatically magento2

texts:
I've made a product attribute "inbound" and it has two options, yes and no, I have assigned "no" to it initially but when I'm checking out I'm using an observer to change its value to "yes" programmatically if product quantity less then 100, everything is working fine but can't able to change its value to yes.

Thanks in advance


texts: Make Magento 2 Module installable from github/bitbucket

texts:
I want to make my extension, say Easy Template Path Hints which is available on github(may be on bitbucket someday) installable via composer. Tried many variation but it's not working.

Here are some of my attempts

1. Using following series of composer commands

composer config repositories.magepsycho git https://github.com/MagePsycho/magento2-easy-template-path-hints.git
composer require magepsycho/magento2-easy-template-path-hints:1.0.0

This resulted in error

  The requested package magepsycho/magento2-easy-template-path-hints
  could not be found in any version, there may be a typo in the package
  name.

2. Manually editing the composer.json

Added the following under "require" node

"magepsycho/magento2-easy-template-path-hints": "master"

And the following under "repositories" node

"magepsycho": {
    "type":"package",
    "package": {
        "name": "magepsycho/magento2-easy-template-path-hints",
        "version":"master",
        "source": {
            "url": "https://github.com/MagePsycho/magento2-easy-template-path-hints.git",
            "type": "git",
            "reference":"master"
        }
    }
}

And then

composer update

There was no any error and it successfully downloaded the extension under vendor folder. But was not installed in app/code folder

May be listing the module to packagist.org may help but I want it to be installable via git also.

Any Suggestions?


texts: Resolved - M2: user creation fails with "class does not exit"

texts:
Magento 2 site, that had data transferred from a Magento 1.9 site.

When attempting to create a user, it fails with:

  Class Magento\Eav\Model\Attribute\Data\Datetime does not exist

There are no entries that look like that in the eav_attribute table.

Is it looking for an eav_attribute in that table that isn't there? or is there an entry in another eav table that is making it look for a class somewhere?

Solution:

The migration had brought over some customer eav attributes from a HORRIBLE module (FME Booking and Reservation).  It was probably my fault for not mapping things correctly, however the solution was to delete the entries from the table customer_eav_attribute.


texts: Missing js & css after install extension in magento2

texts:
Everything was fine before install a marketplace extension.
I installed with the following code:

composer require mailchimp/mc-magento2

and then I check the frontpage, some of the JS and CSS file are unable to load. (at this moment I didn't do setup:upgrade & deploy)

The error message is as follow:

(index):665 GET https://kuohua.ca/online-store/pub/static/version1539890455/frontend/Smartwave/porto/en_CA/icon-fonts/font/porto-icons.woff2 net::ERR_ABORTED 403
GET https://kuohua.ca/online-store/pub/static/version1539890455/frontend/Smartwave/porto/en_CA/images/select-bg.svg 500
(index):840
GET https://kuohua.ca/online-store/pub/static/version1539890455/frontend/Smartwave/porto/en_CA/icon-fonts/font/porto-icons.woff net::ERR_ABORTED 500
GET https://kuohua.ca/online-store/pub/static/version1539890455/frontend/Smartwave/porto/en_CA/js/jquery.stellar.min.js net::ERR_ABORTED 403
Uncaught Error: Script error for: js/jquery.stellar.min
http://requirejs.org/docs/errors.html#scripterror
    at makeError (24ff3db778301e9fe22234bb3893e837.min.js:16)
    at HTMLScriptElement.onScriptError (24ff3db778301e9fe22234bb3893e837.min.js:112)
GET https://kuohua.ca/online-store/pub/static/version1539890455/frontend/Smartwave/porto/en_CA/Mageplaza_Core/js/jquery.autocomplete.min.js net::ERR_ABORTED 403

Anyone knows what happened? and how to solve it?


texts: How to create custom drop down field on checkout page in Magento 2?

texts:
How to create custom field on checkout billing address in magento2?

I want simple drop down on checkout page just we can use for admin order and this field also saves in the database table like order table and  b/c I will use in advertisement.


texts: magento 2 : Data tool migration transform date/time

texts:
I have a problem with the tool for the migration of data.
My old magento use 1.7.0.2 end my new magento use 2.1.

Actually, my column purchase date are transformed with strange differences.

I verified the configuration in my php.ini!All is well. I don't know what i can do to solve the problem.

in documentation, it is said

  The Data Migration Tool has special handler \Migration\Handler\Timezone for transforming time to a different time zone. Using it you can change time for some fields of database. These fields can be specified in your map.xml file with offset parameter.

Then I looked in the file map.xml.
i think it need to copy this code :

<transform>
  <field>cms_page.root_template</field> <handler class="\Migration\Handler\Convert"> <param name="map" value="[one_column:1column;two_columns_left:2columns-left;two_columns_right:2columns-right;three_columns:3columns]" /> </handler>
</transform>

but i don't know what are fields i must change, and what do I have to change in section param?

i thank you for your help.


texts: How to disable marketing notifications within the Magento 2 Admin Panel?

texts:
How do I stop getting these types of notifications?

Are you set up to achieve your eCommerce goals? Make upgrading your resolution for 2020.
Upgrading to Magento Commerce might cost less than you think. Watch our webinar to learn the true cost savings of upgrading to Magento Commerce 2. Watch Now: (removed bitly link)

Jan 2, 2020, 12:26:08 PM


texts: How does one extend magento. Not build an extesion, but acutally fix magento

texts:
I've found a smidge of a hole in some of the core magento api. There doesn't seem to be a way to create configurable products.

Now I know there's a way to extend magento on my system, or install any number of plug-ins.  I however am a simple man, and I rather love the DRY principle.  I figure if there are 1000 people out there kludging something, then someone should actually fix it so they don't have to anymore.

I'd like to offer up a plug-in as a new core api.  I'm wondering how one would do this.


texts: How can I translate SORT BY, COMPARE and SHOW text to dutch?

texts:
I want to know how I can change the text from the "compare", "sort by" and "show". I want to translate them to Dutch. Everything else is translated but some parts are not.

I'm really new to Magento...

thx for the help.


texts:
when I am calling

echo $this->getChildHtml('topLinks') and echo $this->getChildHtml('cart_minicart')

in header.phtml file than it outputs like

Is anybody having the same issue. if yes than please tell me how to solve it because i search related to this but i did't found anything about it.

Any help will appreciated.

This is header.phtml

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

                        <?php echo $this->__('Country') ?>

                    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('country')->toHtml(); ?>

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

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

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


texts: Magento 2 How to get customer collection from website id?

texts:
I want to get collection for customer website wise. I have a website id, and now I want all the customers which belong to that particular website id.

I am trying here:

using \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerFactory

$customers = $this->_customerFactory->create();

foreach($customers as $customer)
{
    $this->dataHelper->assignLocationToCustomer($location,$customer);
}

How can I get collection website wise?


texts: Products get unassigned from category once in a while

texts:
as the title says, I'm having a problem that's repeating from time to time and I don't know the final solution to avoid happening it again.
I have lots of products assigned to certain categories under one main root category. But from time to time, they just dissapear by getting unassigned.

My reassigned them 2 times already but now is treading on my nerves!

What might be the problem? Where should I look ?

Another thing that may help someone give me a proper diagnostic: when I assing products, I assign them only to the subcategories, I never check the root category when I add a new product.

Still, some products remained assigned even though they are included only in a subcategory.

Any clues would do much good.

Thanks.


texts: How to find the static error during deploy static

texts:
I have Magento 2.1.9 version with apache2 in local. After run setup:upgrade and run deploy static file I got this:

magento setup:static-content:deploy -a frontend en_US fi_FI -vvv
Successful: xxxx files; errors: 2.

I wonder if by any chance we can know what are the exact error files to fix that?

Any sharing experience and advice are very welcome and appreciated.

Thanks in advance.


texts:
I created a new media attribute called 'rollover_image' for some frontend rollover functionality. Reindex was completed and attribute set was also changed - I can see the new 'Rollover Image' radio button when I go to the Images panel under Configure Products. When trying to retrieve this file, I get the following error:

Image file was not found.
#0 /home/www/booboo/app/code/core/Mage/Catalog/Helper/Image.php(166): Mage_Catalog_Model_Product_Image->setBaseFile(NULL)
#1 /home/www/booboo/app/design/frontend/enterprise/booboo/template/catalog/product/list.phtml(175): Mage_Catalog_Helper_Image->init(Object(Mage_Catalog_Model_Product), 'rollover_image')

Anyone had a similar issue? I am on Magento Enterprise ver. 1.12.0.0.

UPDATE

If there are ANY images with the 'rollover_image' media attribute not set from the category list, Magento seems to crash. Any reliable way to patch this?


texts:
I am working on theming my Magento 2.2.1 store. I have purchased, installed, and activated the Porto theme. I have a phone number in the header that I need to change the color, but nothing I do seems to change it.

In my header, I have the following line:

CALL US NOW
+1 XXX-XXX-XXXX

The "CALL US NOW" text is displayed properly, but I can't get the phone number to change colors. I have changed D92A2E to several other colors, but it never makes a change. However, changing the font size or text itself works fine.

I thought maybe the text color for the phone number is being overwritten elsewhere in Porto's settings, but I can't find anything that makes it change.

I am posting here on the off chance that someone knows something about why a "color" tag in CSS would just be ignored like this.

Any help is appreciated.

EDIT: I have "fixed" the issue by changing the telephone number from text to a link using an anchor tag and setting the color there. The line now reads (edited for privacy):

CALL US NOW
+1 XXX-XXX-XXXX

After some searching though, I believe I found where the text color might be getting overwritten. In the backend, under Stores > Config > Mageplaza Extensions > Porto > Porto - Settings Panel > Customization Settings >  Custom Style 1, there is css that sets the style of the header, and I believe this to be where it was overwritten, although since changing the text to a tel link, I have not tweaked it enough to confirm this. I hope this will help anyone else facing a simliar issue.

Thanks to all who have answered this question for your help!


texts: Get Submit button Data in the Controller

texts:
I have created one custom form with two Buttons. 1 is Save and 2 is Submit.

When admin submit the form I have to check in controller which button is clicked.

<button id="save_btn" name="save" title="Save" type="submit" class="action-default scalable action-save action-secondary" value="save" data-ui-id="widget-button-0">
    Save
</button>

<button id="submit_btn" name="submit" title="Submit" type="submit" class="action-default scalable action-save action-secondary" data-ui-id="widget-button-1">
    Submit
</button>

In controller I have used

$post = $this->getRequest()->getPostValue();

$post = $this->getRequest()->getPostParams();

I'm getting all other data but not getting button data in the controller.


texts: Category page showing empty search result is empty in Magento 2

texts:
I'm using magento 2.3.4 and in my category page breadcrumbs are showing this empty search result :

I checked if this is a bug from the theme, but it turns out it is being generated by the

vendor/magento/module-catalog-search/Block/Result.php:193

public function getSearchQueryText()
{
    return __("Search results for: '%1'", $this->catalogSearchData->getEscapedQueryText());
}

is this a bug from magento? how can i stop this showing up in the breadcrumb if the query text is empty?


texts:
So i am trying to set up a coupon code. But whenever i use the coupon code in my cart it overrides the other cart price rules.

For example :

i have a rule when a product is ordered by 6 pcs they get 10% discount on that product.
When i use my coupon code that is overruled.

Settings :
Coupon code :


texts: Magento: Is possible to show in place of "Not available" to show ex. "Comming in 2-4 days"

texts: In the product list or in the product page is this possible to replace the Not available text when the product is out of stock with something like "Coming soon in 2-4 days" ?


texts: My local.xml file doesn't have a session tag defined. Is it normal?

texts:
I was wondering changing the way Magento deal with sessions and for my surprise I discovered my /app/etc/local.xml doesn't have a session_save tag set.

Is it seems to be a problem? Is it safe to set it up manually?

Thanks in advance


texts:
I cannot find an (official or not) API reference for Magento 2.

/!\ I'm not looking for the reference of the REST API (http://devdocs.magento.com/swagger/index.html) or SOAP API, but I'm looking for the internal API reference /!\

I can't believe there is no one :)

Any help would be appreciated.


texts:
I have create custom attribute in product upc

I want custom query (sql) to get SKUs and UPCs

Can anyone tell me the related tables from where I can get data, or if anyone can share query that would be great.


texts: Warning: Declaration of Validator::_canProcessRule should be compatible with...

texts:
Good Morning!
Getting an error all over the place after installing a module. I can't find much on Google about this kind of error. The module seems to work fine but I get this error:

2016-05-23T13:31:54+00:00 ERR (3): Warning: Declaration of EbayEnterprise_MultipleCoupons_Model_Validator::_canProcessRule(Mage_SalesRule_Model_Rule $rule, Mage_Sales_Model_Quote_Address $address) should be compatible with Mage_SalesRule_Model_Validator::_canProcessRule($rule, $address)  in /home/public_html/app/code/community/EbayEnterprise/MultipleCoupons/Model/Validator.php on line 15

Here is app/code/community/EbayEnterprise/MultipleCoupons/Model/Validator.php with the function _canProcessRule:

protected function _canProcessRule(Mage_SalesRule_Model_Rule $rule, Mage_Sales_Model_Quote_Address $address)
{
    /**
     * check if validation already occurred
     */
    if ($rule->hasIsValidForAddress($address) && $address->isObjectNew() === false) {
        return $rule->getIsValidForAddress($address);
    }

    /**
     * check per rule usage limit
     */
    if ($rule->getId() && $rule->getUsesPerCustomer() &&
        $this->isValidRuleUsageForAddress($rule, $address) === false
    ) {
        $rule->setIsValidForAddress($address, false);
        return false;
    }

    $rule->afterLoad();

Here is the place I believe the error is referring to app/code/core/Mage/SalesRule/Model/Rule.php:

public function getCouponTypes()
{
    if ($this->_couponTypes === null) {
        $this->_couponTypes = array(
            Mage_SalesRule_Model_Rule::COUPON_TYPE_NO_COUPON => Mage::helper('salesrule')->__('No Coupon'),
            Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC  => Mage::helper('salesrule')->__('Specific Coupon'),
        );
        $transport = new Varien_Object(array(
            'coupon_types'                => $this->_couponTypes,
            'is_coupon_type_auto_visible' => false
        ));
        Mage::dispatchEvent('salesrule_rule_get_coupon_types', array('transport' => $transport));
        $this->_couponTypes = $transport->getCouponTypes();
        if ($transport->getIsCouponTypeAutoVisible()) {
            $this->_couponTypes[Mage_SalesRule_Model_Rule::COUPON_TYPE_AUTO] = Mage::helper('salesrule')->__('Auto');
        }
    }
    return $this->_couponTypes;
}

And here also app/code/core/Mage/Sales/Model/Quote/Address.php I find a couple places:

protected function _isSameAsBilling()
{
    return ($this->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING
        && ($this->_isNotRegisteredCustomer() || $this->_isDefaultShippingNullOrSameAsBillingAddress()));
}

and here:

public function addShippingRate(Mage_Sales_Model_Quote_Address_Rate $rate)
{
    $rate->setAddress($this);
    $this->getShippingRatesCollection()->addItem($rate);
    return $this;
}

Anyone familiar with these kinds errors can help me?


texts: Where else magento save the customer details who has made an order except "sales_flat_order"?

texts:
I was searching the list of customer's name, email who has made orders.
Searching the internet I got to know that it is saved in the "sales_flat_order" table.

But in some record the "firstname" and "lastname" field have value "NULL". But they have the "email address".

So is there any other table present where the customer (who has made the order) details are stored ?

Thank you.


texts: Preloader gif have white pixels on edges

texts:
When I insert GIF into pre-loader - there are white pixels on edges.

                <img src="<?php echo $block->getViewFileUrl('images/CustomLoader-1.gif')?>" alt="<?php /* @escapeNotVerified */
                 echo __('Loading...');?>" style="width: 100px; height: 100px;">

Preloader downloaded from loading.io


texts: Error Add Foreign Key Using Install Schema Magento 2

texts:
<?php namespace Magneto\BookFreeLayout\Setup;
use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
class InstallSchema implements InstallSchemaInterface
{

 public function install(SchemaSetupInterface $setup,
 ModuleContextInterface $context)
 {

 $newsTableName = $setup->getTable('magneto_book_free_layout');

if($setup->getConnection()->isTableExists($newsTableName) != true) {

  $newsTable = $setup->getConnection()
      ->newTable($newsTableName)
      ->addColumn(
          'id',
          \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
          null,
          ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
          'id'
      )
      ->addColumn(
          'name',
          \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
          255,
          ['nullable' => false, 'default' => ''],
            'name'
      )
      ->addColumn(
          'email',
          \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
          null,
          ['nullable' => false, 'default' => ''],
            'email'
      )
      ->addColumn(
          'phoneno',
          \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
          null,
          ['nullable' => false, 'unsigned' => true],
            'phoneno'
      )
      ->addColumn(
          'heigth',
          \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
          null,
          ['nullable' => false],
            'heigth'
      )
      ->addColumn(
          'width',
          \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
          null,
          ['nullable' => false],
            'width'
      )
      ->addColumn(
          'image',
          \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
          null,
          ['nullable' => false],
            'image'
      )
      ->addColumn(
          'entity_id',
          \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
          null,
          ['nullable' => false],
            'entity_id'
      )
      ->addColumn(
          'status',
          \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
          null,
          ['nullable' => false,'default' => 0],
            'status'
      )
      ->addForeignKey(
            $installer->getFkName(
                'magneto_book_free_layout',
                'entity_id',
                'catalog_product_entity',
                'entity_id'
            ),
            'entity_id',
            $installer->getTable('catalog_product_entity'),
            'entity_id',
            \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
        )
      ->setComment("News Table");

  $setup->getConnection()->createTable($newsTable);
}
}
}


texts: How to add a new field (or attribute) on Create Order Page in admin - magento 1.9?

texts:
I want to create a field "add gift to this order" similar to  "Order History->Order Comments" on create order page of admin.

I have tried this : https://stackoverflow.com/questions/12936470/adding-a-new-attribute-to-order-in-magento and some other tutorials.

EDITED :

I have put the following code in /app/design/adminhtml/default/default/template/sales/order/create/comment.phtml

<textarea style="width:98%; height:8em;" id="order-freegift" name="order[freegift][freegift_note]" rows="2" cols="15"><?php echo $this->getFreegiftNote() ?></textarea>

and created a function in core file which is not recommended : /app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php
I have modified this file only for testing purpose.

 public function getFreegiftNote()
    {
        return $this->escapeHtml($this->getQuote()->getCustomerNote());
    }

Then I created an order with free gift 'xyz' from admin.
How can I get this gift on the Order View Page?
In which table this custom attribute value is saved? For this I have looked into all tables of 'sales_order' but not found the gift 'xyz'.


texts: Magento 2 custom module images folder not deploying to pu/static on developer mode

texts:
I am constantly failing to try to deploy images folder from my custom module to

pub/static

I have css, js and images folder in my custom module but only js and CSS are deployed to pub/static.


texts:
i have try to refund invoice in following code

$invoice = $this->_invoiceService
                ->prepareInvoice($order_refund,$itemsArray);
$invoice  ->setRequestedCaptureCase
                           (\Magento\Sales\Model\Order\Invoice::CAPTURE_ONLINE);
$count=count($orderDetail->getAllItems());
$totalShipping=$orderDetail->getShippingAmount();
$ship=($totalShipping/$count);
$invoice->setShippingAmount($ship);
$invoice->register();
$invoice->save();
$creditmemoItem = $this->itemCreationFactory->create();
$creditmemoItem->setQty(1)->setOrderItemId($items_Id);
$itemIdsToRefund[] = $creditmemoItem;
$this->invoiceRefunder->execute($invoice->getId(),$itemIdsToRefund,true);

invoice automatically refund full amount of shipping
when an i have already changed its shipping amount.

what is wrong with this?


texts: How to change the required field of Zip/Postal Code with "not required"?

texts:
How to change required field of Zip/Postal code with "not required" from checkout page?
i have changed the lines 106-111 in app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml

                    <?php echo $this->__('Zip/Postal Code') ?>

                        <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php// echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />

Also i have removed these lines from the file "app/code/core/Mage/Customer/Model/Address/Abstract.php"

$_havingOptionalZip = Mage::helper('directory')->getCountriesWithOptionalZip();
    if (!in_array($this->getCountryId(), $_havingOptionalZip)
        && !Zend_Validate::is($this->getPostcode(), 'NotEmpty')
    ) {
        $this->addError(Mage::helper('customer')->__('Please enter the zip/postal code.'));
    }

But it did not completely changed that field to not required. Because when i place order, it shows a message

  "Zip/Postal Code" is a required value.


texts: Injecting Helper causes "Undefined constant" and "'generated' directory permission is read-only"

texts:
When I inject the helper class it gives me the below errors.
If I remove the reference to the Helper class in the constructor then everything works perfectly.

controller file: /var/www/html/app/code/[Company]/[Module]/Controller/login/Index.php
<?php
namespace [Company]\[Module]\Controller\login;

class Index extends \Magento\Framework\App\Action\Action
{
  protected $_pageFactory;

  public function __construct(
    \Magento\Framework\App\Action\Context $context,
    ...,
    //removing the below line removes the error
    \[Company]\[Module]\Helper\[Module] $helper
  )
  {
    ...
    //removing the below line removes the error
    $this->_helper = $helper;
    return parent::__construct($context);
  }

helper file: /var/www/html/app/code/[Company]/[Module]/Helper/[Module].php
<?php
namespace \[Company]\[Module]\Helper;

use \Magento\Framework\App\Helper\AbstractHelper;

class [Module] extends AbstractHelper
{
}

PHP Fatal error:  Uncaught Error: Undefined constant '[Company]\[Module]\Helper' in /var/www/html/app/code/[Company]/[Module]/Helper/[Module].php:2
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(444): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/v...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('[Company]\\[Module]...')
#3 [internal function]: spl_autoload_call('[Company]\\[Module]...')
#4 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(125): class_exists('\\[Company]\\[Modu...')

...

main.CRITICAL: Class [Company]\[Module]\Helper\[Module] does not exist
Class [Company]\[Module]\Controller\login\Index\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. [] []
main.ERROR: Class [Company]\[Module]\Helper\[Module] does not exist
Class [Company]\[Module]\Controller\login\Index\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. [] []
$ ls -ld /var/www/html/generated/code/[Company]/[Module]/Controller/login/Index/
drwxrwsr-x 2 apache apache 6 Nov  4 16:08 /var/www/html/generated/code/[Company]/[Module]/Controller/login/Index/


texts:
Site is built on version "2.2.2" and strangely page shows blank at random period untill we cleared the cache. Anyone has faced similar issue?

Already checked https://github.com/magento/magento2/issues/9050 but not sure what's the solution they have added.


texts: Unread jQuery script in custom phtml file included with ajax in Magento 2

texts:
I have included in the product page a custom external phtml file from a module which is called with ajax on click.
The html and php code is read correctly, only the jQuery code is not read and is not loaded on the page.
How come this problem?
This is the xml file of my custom phtml file:
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<container name="root" label="Root">
    <update handle="catalog_product_opengraph" />
    <update handle="catalog_product_view" />
    <update handle="page_calendar"/>
    <block class="Magento\Framework\View\Element\Js\Components" name="checkout_page_head_components" template="Magento_Catalog::js/components.phtml"/>
    <block class="Magento\Framework\View\Element\Template" name="test" template="Catalog_Product::test.phtml"/>
</container>

This instead is the jQuery script contained in the calcolatore.phtml file that is not loaded:
<script>
require([
'jquery'
], function($){
$("#qty1").hide();
});
</script>

Thanks for any help!


texts: Magento 2 How to send file to another server on predefined location?

texts:
I am trying to upload a custom exported CSV to another server FTP on particular location.

  Step 1: Added FTP Class in constructor

protected $ftp;
public function __construct(
  \Magento\Framework\Filesystem\Io\Ftp $ftp
){
    $this->ftp = $ftp;
}

  Step 2: Build the FTP Connect

$open = $this->ftp->open(
    array(
        'host' => 'myhostname',
        'user' => 'username',
        'password' => 'password',
        'ssl' => true,
        'passive' => true
    )
);

  Step 3: Use the written function to upload a file to the server

if ($open) {
    $fileName = 'myfile.csv';
    $content = file_get_contents(DirectoryList::VAR_DIR . '/pub/media/report' . $fileName);
    $this->ftp->write(self::FILE_NAME_ON_FTP, $content);
    $this->ftp->close();
}

The above code is working but I wanted to send file to particular location.

Issue:  I want to send file from my server path pub/media/reports to another server path var/www/html/myfoldername/pub/media/reports

Please help me!!


texts: Magento 2 - Add customer e-mail to packingslip

texts:
Is there a way to add the e-mail address of the customer to the packingslip in Magento 2?

Adding the following to the Address template doesn't work:

{{depend email}}E-mail: {{var email}}{{/depend}}|


texts:
I want all 'Tax' changed with 'VAT' in the product and categorie page? but I can't find the file(s) to change it in.
Does anyone know witch css file the translation is and in witch file the are called?

Solved :  without languagepack for en_GB the overwrite voor en_GB isn't working. After installing languagepack the overwrite's works.


texts:
I have set up a German view in addition to the current default view and the css is messed up when I change the language. It looks like it goes into mobile mode. The website is http://m.theseolounge.co.uk/
Do I need to change the Base Skin URL and Base Media URL? At present I am using the store default. Any pointer is much appreciated.


texts:
I am using magento 2.3.5 version. Can anyone please confirm if is there any way to disable MSI features on catalog/filter and search pages.
If the stock of the product is 1 and salable qty is 0 then also the product is visible on the frontend. Because of this I want to hide the products with salable qty 0 on frontend.


texts:
I used magestore store manager to consolidate several magento installations into a unified multi store

when i did the product exports and imports toconsolidate it all i now hiow a cpl issues

products with custom options cannot be added to the cart unless i edit and save the product, dont need to add the custom options they are already there just need to open and save it again ....?? any fast way to do this got 2k products

2nd issue maybe i can soplve this with a sql query via phpmyadmin not sure not a sql expert however after import I got this for example it has this extra character  Â

this has been spewed into most product descriptions by the store manager process any one got a awesome sql query i can run to remove these offending characters?

Watts:Â 375

Amp Draw:Â 27.17

LED's:Â 100

Raw Lumens:Â 364,000

Continous Arc Intensity:Â 325,000

Continous Arc Width:Â 44.3

Continous Arc Distance:Â 1,206.6


texts: Magento 2 - translating problem with JS strings

texts:
I'm trying to translate my website content. Everything worked fine
expect the validation messages which come from mage/validation.js, and the minicart content translation is not showing on the frontend too.


texts: Remove block not working in custom xml layout?

texts:
I've created a custom layout xml for a page template and I am trying to remove some blocks that are being added to the page.

I've got template path hints on and have search through the site to find the reference to the .phtml file to find the name of the block and am then trying to remove the block using the below code however the blocks are still appearing on the page?

<referenceBlock name="skip_to_content.target" remove="true"/>
<referenceBlock name="page.main.title" remove="true"/>
<referenceBlock name="messages" remove="true"/>
<referenceBlock name="store_switcher" remove="true"/>

Can anyone please advise how I can remove blocks from the page?

Update:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container" before="main.content"/>
        <container name="page.content" as="page_content" label="Page Content" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container"/>
    </referenceContainer>
    <!-- Remove Default -->
    <referenceBlock name="skip_to_content.target" remove="true"/>
    <referenceBlock name="page.main.title" remove="true"/>

    <referenceBlock name="store_switcher" remove="true"/>
    <referenceBlock name="store_switcher" remove="true"/>
    <!-- Shop Home -->
    <referenceContainer name="page.content">
        <block class="Magento\Framework\View\Element\Template" name="hero" template="Magento_Theme::html/hero.phtml"></block>
        <block class="Magento\Framework\View\Element\Template" name="shop-home-breadcrumbs" template="Magento_Theme::html/shop-home-breadcrumbs.phtml"></block>
        <block class="Magento\Framework\View\Element\Template" name="shop-home-categories" template="Magento_Theme::html/shop-home-categories.phtml"></block>
    </referenceContainer>
</layout>


texts: Magento2 getting following error at time of deployment

texts:
Magento2.3.3 I am getting following error at the time of deployment

  The contents from the
  "/mnt/data/home/hostes68/public_html/pub/static/frontend/hosemart/fittings/en_US/css/email.css"
  file can't be read.
  Warning!file_get_contents(/mnt/data/home/hostes68/public_html/pub/static/frontend/hosemart/fittings/en_US/css/email.css):
  failed to open      stream: No such file or directory

I have included email.less & email-inline.less in my custom theme.


texts: Visitors have to fill in their contact information twice when buying a product

texts:
Currently I get complaints about a Magento Webshop that has Multisafepay as payment provider. Client tell me they have to fill in all their information (like address etc.) twice when they buy a product. This while all this information is also in their account on the website.

I've read on the internet that more people have the same problem. Did anyone solve this? Or can anyone tell me how to solve it?


texts: use helper function to set the  of magento admin menu item

texts:
I'm using magento 1.9.1.
I want to add dynamic value beside admin menu items to represent the state. for example: under catalog, I want to add number representing the unapproved products beside manage products.
so my question is: can I use a function defined in the helper of my module in the adminhtml.xml file within the  node


texts:
I want to link some legal documents (in PDF format) in the terms and conditions page, and I can't find an option to upload them there.
Is it possible to upload them inside magento or should I look elsewhere?


texts:
I created a event based trigger for customer registration .

 <customer_register_success>
     <observers>
         <Magestore_Sociallogin_observer>
             <type>singleton</type>
             <class>sociallogin/observer</class>
             <method>customerRegisterSuccess</method>
         </Magestore_Sociallogin_observer>
     </observers>
 </customer_register_success>

In Observer.php

public function customerRegisterSuccess($observer)
{
    $email = $observer->getEvent()->getCustomer()->getEmail();
    echo "Its working fine";

}

Background customer registration process is done successfully but on fronted no message shown .

If i remove echo it works fine.

How to echo these values just to check weather i am getting or not in my function.

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

            $email = $observer->getEvent()->getCustomer()->getEmail();
            $contact = $customer->getAddressesCollection()->getFirstitem()->getTelephone();

Update

Extension stop working if there is any error in Observer.php , but my concern at this point is how to know where I am wrong, as it doesn't throw any error. Just hangs the functionality.


texts: How to override "gift card added to cart"

texts:
I need to override the action fired when a customer sets a gift card in his cart.  I need to apply a custom check against an external web service about the validity of the gift card applied.

Which is the file that I need to override?

Seems that I need to override this file:

vendor/magento/module-gift-card-account/Model/Service/GiftCardAccountManagement.php

Where I need to write my override inside my app folder?


texts:
I am looking to upgrade from 1.9.2.4 to 1.9.3 and from what I read I can see everyone suggests you basically start a new fresh project with 1.9.3 and then copy in the extensions. However the bit that I can't see how to do how to copy all the catalog and other data such as customers

Is the correct way of going about it or is there a better way? EG perhaps just using /downloader and upgrading all modules to 1.9.3?


texts: Credit memo vs Refund Which one is true? Magento 1.9

texts:
Im very confused about the difference between credit memo and refund. Magento documentation states the following :

  A credit memo is a document that lists the amount that is owed to the customer. The amount can be applied toward a purchase, or refunded to the customer. You can print a credit memo for a single order, or for multiple orders as a batch, or group. Before a credit memo can be printed, it must first be generated for the order.

But when we try the feature, on a paid order, all we can do is a refund offline. There is no option whatsoever to credit customer account for a futur purchase. Its like if this following statement is false :

  The amount can be applied toward a purchase

We couldnt find any reference on the Internet explaining how to apply the credit memo toward a purchase or attach it to the customer account.

Does this feature just not exists ?


texts: Dataflow advanced export filter by category

texts:
I want to filter the exported products by category, but what I have isn't working:

<action type="catalog/convert_adapter_product" method="load">
    <var name="store"><![CDATA[0]]></var>
    <var name="filter/type"><![CDATA[simple]]></var>
    <var name="filter/category"><![CDATA[my-category]]></var>
</action>

<action type="catalog/convert_parser_product" method="unparse">
    <var name="store"><![CDATA[0]]></var>
    <var name="url_field"><![CDATA[0]]></var>
</action>

<action type="dataflow/convert_mapper_column" method="map">
    <var name="map">
        <map name="sku"><![CDATA[MPN/UPC]]></map>
        <map name="brand"><![CDATA[Manufacturer]]></map>
        <map name="name"><![CDATA[Product Name]]></map>
        <map name="product_link"><![CDATA[product_link]]></map>
        <map name="condition"><![CDATA[Product Condition]]></map>
        <map name="price"><![CDATA[Selling Price]]></map>
        <map name="shipping_costs"><![CDATA[Shipping costs]]></map>
        <map name="weight_box1"><![CDATA[Weight]]></map>
    </var>
    <var name="_only_specified">true</var>
</action>

<action type="dataflow/convert_parser_csv" method="unparse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
</action>

<action type="dataflow/convert_adapter_io" method="save">
    <var name="type">file</var>
    <var name="path">var/export</var>
    <var name="filename"><![CDATA[catonly.csv]]></var>
</action>

Looks like <var name="filter/category"><![CDATA[my-category]]></var> doesn't work.


texts:
We are attempting to set up Rule Based Relations, a feature of Magento Enterprise.
Specific Magento version is EE 1.13.1.0

So basically you set which products are the related products, and which products to attach/relate those too.

We set up the rules, and the products did not display any related products at all.

Attach one product manually as a related, and it does the 1 manual, and the other 3 rule-based.

Then I set the relation types to "rule based only" and then it was 4 rule-based related products.

Then I removed the single manual product, and then no related products show up. Even though the rule is still in place, and it is set to use rules only.

Is there a bug with this feature, or some way to fix it?

I have been reindexing and clearing cache at each step/phase of this process.


texts: Getting this error while sending order emails.Compilation from source: LESS file is empty: order email sent without css and an warning


texts: do we can import sample data of magento in sql server?

texts: I want to know whether we can import the magento sample data in our SQL Server 2014 and pass the string and db info at the time of installation of magento ?


texts: Override template for module: /vendor/magento/offline-payments/

texts:
I want to override a template located here:

(magento_dir)/vendor/magento/module-offline-payments/view/frontend/web/template/payment/purchaseorder-form.html

I have done the override path liks this, but it is not working:

(magento_dir)/app/design/frontend/(VendorName)/(ThemeName)/Magento_Offline-Payments/view/frontend/web/template/payment/purchaseorder-form.html

I have already done this with Magento checkout module and it worked like the below:

Source path:
(magento_dir)/vendor/magento/module-checkout/...

My override path:
(magento_dir)/app/design/frontend/(VendorName)/(ThemeName)/Magento_Checkout/...

My current issue now is how I can translate "module-offline-payments" to something that works for the override path.

Can someone help?


texts: Dropdown 'selected' not working in config

texts:
I created dropdown in a table similar to Store > Config > Catalog > Invenotry, everything is working perfectly except selected is not working in my dropdown, however values are stored in a database.

I search in core files and follows:

  Magento\CatalogInventory\Block\Adminhtml\Form\Field\Minsaleqty

Here is my code:

File: system.xml

<field id="template" translate="label" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
       <label>Select Template</label>
       <frontend_model>Vendor\Module\Block\Adminhtml\Form\Field\Template</frontend_model>
       <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
</field>

File: Template.php

protected function _prepareToRender()
{
 $this->addColumn(
     'dayoption',
     [
         'label' => __('Delivery Days'),
         'readonly'=>'readonly',
         'renderer' => $this->_getRenderer()
     ]
 );
 $this->_addAfter = false;
 $this->_addButtonLabel = __('Add More');
}

protected function _getRenderer()
{
 $this->_itemRenderer = $this->getLayout()->createBlock(
     \Vendor\Module\Block\Adminhtml\Form\Field\Options::class, '',
     ['data' => ['is_render_to_js_template' => true]]
 );
 $this->_itemRenderer->setClass('option_group_select');
 return $this->_itemRenderer;
}

 /**
  * Prepare existing row data object
  *
  * @param \Magento\Framework\DataObject $row
  * @return void
  */
 protected function _prepareArrayRow(\Magento\Framework\DataObject $row)
 {
     $optionExtraAttr = [];
     $optionExtraAttr['option_' . $this->_getRenderer()->calcOptionHash($row->getData('dayoption'))] =
         'selected="selected"';
     $row->setData(
         'option_extra_attrs',
         $optionExtraAttr
     );
 }

File: Option.php

use Magento\Framework\View\Element\Html\Select;

class Options extends Select
{
/**
 * @var \Magento\Eav\Model\Config
 */
protected $_eavConfig;
/**
 *
 * @var array
 */
private $_attributeGroups;

public function __construct(Context $context,
                            \Magento\Eav\Model\Config $eavConfig,
                            array $data = [])
{
    parent::__construct($context, $data);
    $this->_eavConfig = $eavConfig;
}

public function setInputName($value)
{
    return $this->setName($value);
}

public function _attributeOptions(){
    if ($this->_attributeGroups === null) {
        $this->_attributeGroups = [];

        $attributeCode = "delivery_days";
        $attribute = $this->_eavConfig->getAttribute('catalog_product', $attributeCode);
        $options = $attribute->getSource()->getAllOptions();
        $attrValues = [];
        foreach ($options as $option) {
            if ($option['value'] > 0) {
                $this->_attributeGroups[$option['label']] = $option['label'];
            }
        }
    }
    return $this->_attributeGroups;
}

/**
 * Render block HTML
 *
 * @return string
 */
  public function _toHtml()
  {
    if (!$this->getOptions()) {
        foreach ($this->_attributeOptions() as $item) {
            $this->addOption($item, addslashes($item));
        }
    }
    return parent::_toHtml();
  }
}

_prepareArrayRow is reason for selected in value in a dropdown, I print value of optionExtraAttr which is

  array (  'option_614544684' => 'selected="selected"',)

currently after loading the page its shows first value of dropdown, not which is store in core_config_data.

Thanks


texts:
I have a third party extension that is using an update handle on a few key pages that i'd like to remove:

<cms_page>
    <update handle="handle_name1" />
    <update handle="handle_name2" />
    <update handle="handle_name3" />
</cms_page>

Is there a way to remove these layout updates using local.xml? I am trying to avoid doing the "copy the layout file to my theme" bit.


texts: Is there any solution to install magento é with an older version of MySQL (5.5) and avoid the well know error:


texts: How to change product name after add to cart magento 2

texts:
How to change the name of the product, when adding a product to the cart using observer in Magento 2
I use the following code:

$item->setCustomPrice($specialPrice);
$item->setOriginalCustomPrice($specialPrice);
$item->setName('helllloo');
$item->getProduct()->setIsSuperMode(true);

The price is well updated but not the name.
Also, how can i change the text of the success message?


texts: Show product discount percent in Magento

texts:
I would like to show discount percentage on image as badge (refer image 2). I followed the instructions from http://www.customy.com/blog/show-product-discount-percent-in-magento/ and managed to show discount percentage on product page (refer image 1).

I tried:
app/design/frontend/yourpackage/yourtheme/template/catalog/product/price.phtml

<?php // Discount percents output start ?>
<?php if($_finalPrice < $_price): ?>
<?php $_savePercent = 100 - round(($_finalPrice / $_price)*100); ?>

        <?php echo $this->__('You Save:') ?>

            <?php echo $_savePercent; ?>%

<?php endif; ?>

Now I got result as:
1.

Now I need to show discount percentage on product image too like
2.

What should I do to show discount badge on product image?
I'm using magento 1.9.0.1 RWD theme


texts: How to create Barcode to invoice ID and separate the product image Magento 2.1.5?

texts:
I am facing a problem to separate the products images in pdf invoice in Magento 2.x. How can I fix the image size to separate the multiple order item's images?

Also, I want to make the invoice id to Barcode. Please check my attached images.

1. ivoice.png where you can the issues for products images which I want to separate it according to 2nd image.

2. invoice 2.png which pdf invoice I want to make. Invoice 2.png this invoice design I want to get.

Please help me to solve this issue.

Thanks


texts: Order time stamp off by 6 hours in the order Confirmation Email. It is CORRECT on the order itself in the Admin panel

texts:
The orders have correct date/time stamps in the Admin Panel (Sales - Orders - click an order open - under Order Date --) Apr 9, 2016 3:07:57 AM) but the time is off by exactly 6 hours in the Customer Confirmation Email --)

  Your order #100006833 Placed on April 9, 2016 9:07:57 AM MDT

We are in Colorado (MST) and I have the following setup in Admin Panel => System => Configuration => General => Locale Options => Timezone => Mountain Standard Time (America/Denver)

When I asked the hosting company what the server time was - they said Central Time Zone (the server is in Chicago).

We use a third party to send out the Confirmation Emails if that makes a difference? SendGrid setup in the Admin panel via a ASCHRODER EXTENSION.


texts: set acl permission for tabs in Catalog Product Information

texts:
I need to remove all tabs except CATEGORIES and WEBSITES under Product Information.

How can I do that?

For  sales order view it was easy beacuse it was necessary only to override method canShowTab() but for catalog is not possible beacuse this methods does not exist. Any ideas?:-)


texts: Magento 2.2 Add Unit Price in Order Email Template

texts:
Add Unit Price (Base Price) in Order email Confirmation in magento 2.2.3
https://prnt.sc/u0po5q
We have Porto theme
app/design/frontend/Smartwave/porto/Magento_Sales/templates/email >>
  items/>>
     oreder/default.phtml
     price/row.phtml
items.phtml


texts:
I have magento store with 5000 products.

my product url is domain-name.com/xxxxxx.html

where x is a number,
how to set the URL to be the same as the product title instead of the number?


texts: i want to get the selected rows in magento table

texts:
i want to get the Customer and Orders rows in magento table the list is given below.

Customer:
Email , Customer Group,Newsletter.Billing Address(First Name,Last
Name,Company, Address 1 , Address 2 ,Country , State , City , Zip Code
, Telephone).Shipping Address ( First Name , Last Name , Company ,
Address 1 , Address 2 ,Country , State , City , Zip Code , Telephone
).
ORDERS:
ID , Order Date , Order Status , Order Products ( Name , SKU ) ,
Product Price , Quantity , SubTotal Price , Discount Price ,
Tax Price , Shipping Price , Total Price , Order Comments.Customer
Name , Billing Address ( First Name , Last Name , Address 1 , Address
2 , Country , State , City , Zip Code , Telephone ) .Shipping Address
( First Name , Last Name , Company , Address 1 , Address 2 ,  Country
, State , City , Zip Code , Telephone )

Any one help me.


texts: Grunt css changes not showing in browser

texts:
New to Magento so please be patient with me. I've created a custom theme using Magento/blank as its parent. Grunt is detecting changes im making to the css files but the changes are not showing on the web page. If i clear the static files and javascipt/css cache from the back-end the changes do show up. This is my settings in the themes.js file. Do i need to specify the directory for each less file in my child theme?
TMV: {
area: 'frontend',
name: 'TheMusicVault/TMV',
locale: 'en_US',
files: [
'css/styles-m',
'css/styles-l',
'css/email',
'css/email-inline'
],
dsl: 'less'
},


texts: How do I add the newsletter checkbox to the registration page?

texts: The newsletter checkbox does not appear on the registration page. How can I make it display when a new customer registers?


texts: How to Enable Maintenance mode for specific store in Multi Website Magento 2

texts:
I have multi websites, I set website or store code in server conf that's is $_SERVER

Now I have to enable maintenance flag or page only for specific store  rest other store should

So how to do it ? any suggestion ?


texts: How can I pass a URL parameter to admin grid data provider?

texts:
I have a custom admin grid, which lists only the orders that contain the product given as a URL parameter.

My URL is of form https://www.example.com/admin/mymodule/orders/index/product_id/123/

I have defined a custom data provider for the grid in view/adminhtml/ui_components/myvendor_mymodule_order_listing.xml

The admin page itself works fine, and I get the correct orders when I use a hard-coded product id inside the data provider.

I'm however not able to figure out how to pass the product id into the data provider from the URL.

The actual data for the grid is fetched using AJAX, so perhaps the parameter should somehow be included into that request? Or are there some other ways to achieve it?


texts: Manage checkout form validation (required fields) with ajax

texts: How can I manage checkout page required fields programmatically. I want to Add or remove required fields with ajax based on customer selected parameter (country, shipping method...)? I have read the Magento 2 official doc-s but have not found anything useful in them.


texts: Enable modules inside vendor directory magento2

texts:
I upgraded the magento2 site manually and now modules that were installed via composer are disabled. How to enable those modules?

Updates: Installed modules again via composer.


texts: Magento 2 remove breadcrumb empty title category view

texts:
I am developing a custom theme which never displays the breadcrumb, so I removed it in the default.xml:

<referenceBlock name="breadcrumbs" remove="true" />

This caused that the category view page to have empty meta title.
Is there a way to programmatically set the meta title for this type of page?


texts: I have crated 2 store views one for each languages, in first sight all looks ok when you change language it works but when you leave that page or click detail view of product it shows the default language. Any solution ?


texts:
I have a magento store, in which a customer tried to make an order.
He has chosen debit card payment. Once he had paid he has closed the window or it may have been a network connectivity issue. However I received the payment. So our warehouse manager shipped the product. But we are unable to make the order as complete. So stock item has also not been updated. Is there anyway to change the order status as completemanually


texts: Magento 2 : One Step Checkout Update tax amount based on change country/state/zip

texts:
Currently, the Tax amount update when we user selects a shipping method I want to update the tax amount on the checkout page when the user selects or changes country/state/zip code.
Does anyone have an idea how it can be possible in Magento 2?


texts: How to call new order email template for one Product only rest should default

texts: How do you call a new order email template for one Product only rest of the Product should trigger default order email template?


texts: In "Default Config" store view, it still shows option of 'Use system Value'

texts:
I have installed magento 2 in my local machine. I think there is any problem in my installation because when I tap to Settings -> System -> Configuration and selected my store view as "Default Config". It shows as below image:

Please tell me is it correct or I have made any mistake while installation?
Also let me know the solution if I am wrong.


texts: Magento2: how installation Magento 2 with Nginx on MAMP

texts:
How can I install a Magento2 in Nginx on MAMP?

What settings should be made to install Magento2 in Nginx in MAMP?

What settings should be made to run Magento2 in Nginx in MAMP?

My problem is: in Nginx returns me 404 Not found and in Apache is works.

I have installed the mcrypt.


texts: How to stop sending Invoice email to Customer in Magento 1.9.2?

texts:
I am using magento 1.9.2 version.

The customer place an order (Choose Payment Method - Cash On Delivery).

And when I Generate Invoice, the customer is notified by invoice email.

I do not want to send invoice email to customer before deliver his order.

I want to send his invoice after successful order delivery.

How can I stop sending invoice email to customer?


texts: Magento 2 1.0.0-beta creating a new vendor/theme from Magento/luma breaks FE

texts:
I created a new Vendor/theme where, in the theme.xml, i referenced the Magento/luma theme. As i understand it right, the fallback should now grap styles from the luma theme and my new theme should fully look like luma.

What actually happens is CSS compilation from source variable @font-family-name__base is undefined in file in pub static styles-l.css and styles-m.css after reload FE or even after php bin/magento setup:static-content:deploy.
So it seems that the compilation is trying to use the right files but cannot process variables.

Is that a behavior which is already spottet somehow, did i something wrong?


texts: Is the EAVCleaner Extension safe to Use on my Magento installation?

texts:
Project GitHub Repository: https://github.com/magento-hackathon/EAVCleaner

Has anyone used these cleaners before? I think this application is excactly what we need, but I am unsure how to know for certain that it is safe to run against my system's database. Has anyone had experience with this with a lot of data? 250k SKU with 5+ stores?


texts: Magento 2.2.5 Product URL key not redirecting to html

texts:
We had done a Magento Upgrade from 1 to 2.2.5.
Magento 1 had URL key set, so you could get the product by visiting eg. website.com/chair.html
In Magento 2 also, there are some products which you can visit via website.com/chair.html
but for some products, website.com/chair2.html does not work. I need to do website.com/catalog/product/view/id/6317/s/sancal-tonella-pouf/
URL Keys are set as:

The configurations are set as:

Please let me know how I can make it so that for all products, if there is product URL key set(url_key), it can be visited via www.website.com/url_key.html.
Thank you!!


texts:
I turned on the linear translator in magento 2.

While he tries to translate the buttons "Log in" and "Register" via translate magento I can translate only "Log in" - is not possible translate "Register" button because these buttons have the same link.

In what other way can I translate the button in files "Register"?

Does anyone know how to solve this?


texts: What is the best way to show/hide special_price on frontend using custom attribute?

texts:
I am trying to figure out the best way implement a checkbox in Magento admin that will allow for users to select whether to display a special price on the frontend or not.

I understand that this can be set via product attributes but I would like to be able to select which products will have the special price shown or not by ticking a checkbox to "Show special price on frontend"...

So far I have created the attribute show_special_price I now need to add this to an IF condition within the template.

$_specialPriceStoreLabel = Mage::getModel('catalog/product')->loadByAttribute('show_special_price', '1');

but I can't figure out which line since there are many IF conditions in there.


texts: What is causing a price and stock reindex?

texts:
Every 5 minutes the price and stock is getting reindexed. The unix cron is running every 5 minutes but I have disabled that to test and it still happens.

Does anyone have any ideas on how to find out what is causing the reindex?


texts: Unable to change "Shop" category name in menu?

texts: this should be an easy one -- my changes to the default "Shop" category name aren't reflected on the nav on the frontend despite lots of cache-clearing, etc. Anything should try / look into?


texts: How to search orders using a purchase order number

texts: I need to be able to filter orders by searching the purchase order number from the order. Is this possible?


texts: How to get current payment detail on order review page in Magento 1.9.2?

texts:
I want to print complete payment details on order review page in onepage checkout which are saved while payment. I have used following code:-

<?php echo$payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle(); ?>

But This code is getting only Payment title but I want to print following details:-

Card holder name:-
Expire date:-
Card No:-
Card Type:-


texts: Put background color css for particular cms page

texts: I want to add background color for this cms page


texts: We keep receiving this log and stack trace from JQMigrate, but it seems to just be a warning. Is there a way to just straight up disable logging in production?


texts: Magento on localhost forwarding to live site

texts:
I have installed Magento using MAMP for access on a localhost (as to not touch the live site).

I have then imported the database to duplicate the live site and have changed the username/password etc in local.xml.

The problem I have is that every time I try and visit my local site it redirects me to the live site.

I have gone into my /private/etc/hosts through Terminal and have added the line: 127.0.0.1 http://localhost/magento but I still can't get it to work.

Every time I visit http://localhost:8888/magento/index.php it forwards to the live site.

Does anyone have any ideas??


texts: Magento 2, get order id in order view page in admin panel, if possible through session

texts:
I need to retrieve my custom column information from "sales_order_item" table. I'm having challenge to get the order id. How to get order id in order view page in admin panel?

I need $orderId in below code?

public function getOrderItemAgreementDeccription()

        {
           $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
           $_order = $objectManager->get('Magento\Sales\Model\Order\Item')->load($orderId);
           $getAgreementDeccription =  $_order->getAgreementDeccription();

        }


texts: Magento v1.3.2.4 - 2 domains using one database

texts:
It's been a rough day.  I am the IT generalist for my employer.  Employer has 2 domains, each have Magento maintaining their product catalog, but both in the same Magento admin area (shared database?).  Last night, the server admin upgraded PHP to 5.3 for the server.  When I came in, the product catalog was erroring out with:
Fatal Error: Method Varien Object: __toString() cannot take arguments.  I googled and found a mean to find/replace the 'toString' references and change them to 'invoke'.  Now the primary domain is working well, with no errors when attempting to view the products catalog.

The second domain is not working in that same way.  It appears it is pointing to an empty directory in /products/report.  The problem only is affecting the products tab.  The other tabs are maintained by 'Expression Engine'.

So the main domain works perfectly now.  But I can't figure out how to make whatever is drawing the nav bar, aim for the proper menu.

Any advice?  I could really use some right about now.


texts:
I've been trying to set the meta title of a product listing page when an action is executed. I found this post on Magento2 StackExchange and tried to replicate in my Controller:

<?php
    namespace TreyBake\Garage\Controller\Index;

    use Magento\Framework\App\Action\Context;

    class Search extends \Magento\Framework\App\Action\Action
    {
        protected $resultPageFactory;
        protected $_pageConfig;

        public function __construct(
            Context $context,
            \Magento\Framework\View\Result\PageFactory $resultPageFactory,
            \Magento\Framework\View\Page\Config $pageConfig
        )
        {
            $this->resultPageFactory = $resultPageFactory;
            $this->_pageConfig = $pageConfig;

            parent::__construct($context);
        }

        protected function _prepareLayout()
        {
            $this->_pageConfig->getTitle()->set('foo');
            $pmt = $this->getLayout()->getBlock('page.main.title');
            $pmt->setPageTitle('bar');

            return parent::_prepareLayout();
        }

        public function execute()
        {
            # my controller exec code

            $rpf = $this->resultPageFactory->create();
            $pmt = $rpf->getLayout()->getBlock('page.main.title');
            $pmt->setPageTitle('foobar');

            # etc.
        }
    }

Disabling one at a time makes no change, and both uncommented has no affect. What am I doing wrong and how can I override the meta title (<title>) for product listing pages using $_GET params (though, really, if I know how to set the meta title correctly, I can fill in the blanks with $_GET)?

Update:

I think I know why this is so troublesome, the last line in the execute() method is this:

$this->getResponse()->setRedirect($backUrl);

doing a log of this shows the $backUrl to equate to:

  http://site.development/wheel-tyres/tyres.html?find=aprilia-af-1-futura-1990-4730&sid=cbFktM0OTy

So I don't think I can return $resultPageFactory as, it's redirected before it's returned.

My Edited Question: How do I set the meta title with redirect?

Another Update

I tried using getResponse() to set the data, as I did some logging and it doesn't seem I can use it:

$writer = new \Zend\Log\Writer\Stream(BP. '/var/log/dev.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info(
    print_r(
        get_class_methods($this->getResponse),
        true
    )
);

This led me to three functions of interest:

getHeaders()
getMetaData()
setMetaData()

I then logged the get* functions and getMetaData() was empty, getHeaders had data, but I overlooked what it might mean, headers are the HTTP headers (duh).

I then used setMetaData('title', 'foo') and logged getMetaData after that and huzzah, my data is there - however, the title for the page remains the same.. again, I'm guessing because of the redirect.


texts: Product price not update in cart Magento2

texts:
In my custom module, products are going to add directly to cart as below :

    foreach($productArray as $key => $id )
    {

    $p["qty"] = $qtyArray[$key];
    try {
                    $params = array(
                        'product' => $id,
                        'qty' => $p
                    );
                    $_product = $this->_productRepository->getById($id);
                    $this->cart->addProduct($_product,$params);
                    $this->cart->save();

        } catch(\Exception $e) {
           $responseData['action']="errmessage";
            $responseData['msg'] = __("Something went wrong. please correct the sku(s)");
            $error = true;
        }
    }

A single product is added in the cart without issue but when we try to add multiple products together into the cart then the price of the first product is updated and subtotal is also updated but prices for 2nd individual products is showing 0
Any help will be appreciated!
Thanks


texts: Magento 2 : TypeError: data.some is not a function

texts:
In Magento 2 admin menu 'Add new' page open but showing just loader image. Getting below error in console log.
Anyone have any idea please share.

TypeError: data.some is not a function
winTop = win.scrollTop();

in Below file

adminhtml/Magento/backend/en_US/mage/requirejs/static.js


texts: Magento : How to Customize Product Custom Options

texts:
I need to display my product's custom options in front end, in specific way. For example, I would like tabulate in two columns, drop down fields of my custom options and add some header text on another columns for front end.
I considered combination with static block might work but so far.
I couldn't find any related information.

Are there any ideas on how I can do this?


texts: Magento Observer to block spam orders not working

texts:
I'm facing some issues with orders placed by bots.

I noticed that all orders are made by a specific phone number and also by a specific street. So I looked for a way to block orders that are made with that phone number or this street.

I found the following link https://www.ashsmith.io/2012/12/making-use-of-observers-in-magento/.I followed the steps to create an observer with the event sales_order_place_before, to compare the parameters sent in the order to the parameters that I want to block.

I created the file Blockbots_Observer.xml on /html/app/etc/modules;
I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;
Finally, I created the file Observer.php on /html/app/code/local/Blockbots/Observer/Model;

After all these steps, the implementation did not work (I am still receiving orders from bots).

Here is the code on files:

Blockbots_observer.xml:

Config.xml:

Observer.php:

What could be wrong with implementation? Any idea how I can fix it?


texts: Skip List view when search returns 1 result - Third Party

texts:
My question is actually based on the excellent post response by Marius♦: Catalog Search: If only one result, show product view page insted of list view 1

The question is - would this affect any search method, even if it is a third party module?

Is there a way of placing the redirect within the code for said module's search function?


texts:
Steps to reproduce:

Click Edit on first order, i.e 000000001
Click Edit on second order, i.e 000000002
Click Add Products on first order edit screen
Select any product and click Add Selected Product(s) to Order

You'll now see that the contents of 000000001 are all of the product(s) from 000000002 - as well as the product you selected.

I've also noticed some strange behavior when it comes to placing the orders after editing them whereby for instance the editing of 000000002 will result in it's new increment id being 000000001-1.

I think this bug may stem from the adminhtml/session_quote object (app/code/core/Mage/Adminhtml/Model/Session/Quote.php). Does this mean that Magento can only handle the editing of a single order per session? Surely it would differentiate between the session objects using the parent entity id or something along those lines?

Edit: The same behavior is experienced when placing two orders simultaneously, which leads me to believe it's definitely related to the inability to split the adminhtml/session_quote objects on a per parent order entity id basis.


texts: Trying to find the Theme for this Magento site

texts:
A client has said they like the look of this website, which is built with Magento. I am wondering  if anyone recognises the theme that is being used?
https://www.ripcurl.com/us/
Any help locating this is very much appreciated.
Many thanks


texts: Implementing payment method per currency

texts:
Is it possible to implement a payment method per currency level? The site in question needs to accept both USD and Indian Rupee. When a client pays with USD, it needs to be connected to a US bank/payment method, when paying with Indian Rupee, it needs to be connected to an Indian bank/payment method.

The site scope will be: one domain; one language; two currencies.

Is the above model feasible or it's better to stick to a multi-store or better alternative? e.g.

site.com/en
site.com/in


texts:
I'm using Magento 1.8.1 with PayPal Advanced. Orders taken when the user chooses their Paypal account are processed correctly. When a customer chooses to enter credit card information, a request is made and is approved by PayPal. I have verified this in my logs. PayPal states that a second request is made that is voiding the transaction, but I don't see a request in logs to actually void the transaction.

Any help is greatly appreciated. I'm stuck!

I have checked my PayPal settings and they haven't changed.
AVS: No
CSC: No
Enable Secure Token: Yes.

I am registering an exception in the exception logs... But I don't know how to debug it.

  2015-04-21T17:44:47+00:00 ERR (3):  exception 'Mage_Core_Exception'
  with message 'Invalid block type: ' in
  /home/mystore/public_html/app/Mage.php:595 Stack trace:
  0 /home/mystore/public_html/app/code/core/Mage/Core/Model/Layout.php(495):
  Mage::throwException('Invalid block t...')
  1 /home/mystore/public_html/app/code/core/Mage/Core/Model/Layout.php(437):
  Mage_Core_Model_Layout->_getBlockInstance('', Array)
  2 /home/mystore/public_html/app/code/core/Mage/Core/Model/Layout.php(472):
  Mage_Core_Model_Layout->createBlock('', 'checkout.cart')
  3 /home/mystore/public_html/app/code/core/Mage/Core/Model/Layout.php(239):
  Mage_Core_Model_Layout->addBlock('', 'checkout.cart')
  4 /home/mystore/public_html/app/code/core/Mage/Core/Model/Layout.php(205):
  Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element),
  Object(Mage_Core_Model_Layout_Element))
  5 /home/mystore/public_html/app/code/core/Mage/Core/Model/Layout.php(210):
  Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
  6 /home/mystore/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344):
  Mage_Core_Model_Layout->generateBlocks()
  7 /home/mystore/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269):
  Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
  8 /home/mystore/public_html/app/code/core/Mage/Checkout/controllers/CartController.php(160): Mage_Core_Controller_Varien_Action->loadLayout()
  9 /home/mystore/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418):
  Mage_Checkout_CartController->indexAction()
  10 /home/mystore/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250):
  Mage_Core_Controller_Varien_Action->dispatch('index')
  11 /home/mystore/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  12 /home/mystore/public_html/app/code/core/Mage/Core/Model/App.php(354):
  Mage_Core_Controller_Varien_Front->dispatch()
  13 /home/mystore/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
  14 /home/mystore/public_html/index.php(87): Mage::run('', 'store')
  15 {main}


texts: Get order-id on Firegento PDF protected function _insertFooter(&$page)

texts:
I need to disable some footer information (bank account information) in Firegento pdf invoice depending on payment method. in the file FireGento/Pdf/Model/Engine/Abstract.php on line 891 ff there is the code I want do disable.

So I tried $order->getPayment()->getMethodInstance()->getCode() but of course there is no order-id or order information given to protected function _insertFooter(&$page).

So, how can I get $order in the protected function _insertFooter(&$page)?


texts: Different layout and phtml for types of simple product

texts:
It is possible to define a different template in my layout xml for simple products that are a child of a grouped product compared to a stand-alone simple product?

In my current store the "child" products pull information from the parent which obviously cannot be the case for stand-alone products.  The only other alternative I can see is to put a whole load of IFs all over the place based on whether the product has a parent  using  getParentIdsByChild($product->getId())


texts:
How to  show an image as "Option Label" in admin  form multi-select field in Magento 2

Multi-Select Field
$fieldset->addField(
            'flag',
            'multiselect',
            [
                'name'        => 'flag',
                'label'    => __('Name'),
                'required'     => true,
                'values'   =>  $this->appliedFlags->toOptionArray(),
                'note'     => 'Set flags to column'
            ]
        );

options
<?php

namespace Vendor\Module\Ui\Component\Listing\Column;

class Flagoptions implements \Magento\Framework\Option\ArrayInterface
{
    const IMAGE_HEIGHT = '25';
    const IMAGE_STYLE = 'display: block;';

    public function __construct(

         \Magento\Store\Model\StoreManagerInterface $storeManager
    ) {

        $this->_storeManager = $storeManager;
    }

    public function toOptionArray()
    {
        $height =  self::IMAGE_HEIGHT;
        $style =  self::IMAGE_STYLE;
        $options =array();
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $collection = $objectManager->create('Vendor\Module\Model\ResourceModel\Orderflag\Collection')
            ->addFieldToSelect(array('flag_id','name', 'image_icon'));
        $options[] = array( 'label' => 'NONE', 'value' => '-1'  );
        if( $collection->getSize() ){
             foreach ( $collection  as $flag) {
                 $srcImage = $this->_storeManager->getStore()
                        ->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) .$flag->getData('image_icon');
                 $ext = pathinfo($srcImage, PATHINFO_EXTENSION);
                 if($ext != '')
                 {
                    $image ="<img src='" . $srcImage . "' height='" . $height . "'/>";
                    $name = $flag->getData('name');

                    $label = $image.ucfirst($name);

                }
                 $options[] = array(
                 'label' => $label,
                 'value' => $flag->getData('flag_id')
                );
             }
         }

        return $options;
    }
}


texts: How to send transactional mail with csv/excel attachment in magento 2

texts:
How can i send transactional mail with csv/excel attachment in magento 2? below is my code:

use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\Mail\Template\FactoryInterface;
use Magento\Framework\Mail\Template\SenderResolverInterface;
use Magento\Framework\Mail\Template\TransportBuilder;
class UploadTransportBuilder extends TransportBuilder {
    public function __construct(FactoryInterface $templateFactory,
        MessageInterface $message,
        SenderResolverInterface $senderResolver,
        ObjectManagerInterface $objectManager,
        TransportInterfaceFactory $mailTransportFactory) {
        parent::__construct($templateFactory,
            $message,
            $senderResolver,
            $objectManager,
            $mailTransportFactory);    }
    public function attachFile($file, $name) {
        if (!empty($file) && file_exists($file)) {
            $this->message
            ->createAttachment(
                file_get_contents($file),
                \Zend_Mime::TYPE_OCTETSTREAM,
                \Zend_Mime::DISPOSITION_ATTACHMENT,
                \Zend_Mime::ENCODING_BASE64,
                basename($name));
            return true;  }
 return false;
    }
}

and i send mail with attachment

$transportBuilder = $this->_objectManager->create('\Magento\Framework\Mail\Template\UploadTransportBuilder');
        $path='D:\asd.csv';
        //end here
        $templateId=1;
        $storeId=1;
        $templateParams['test']='test test';
        $transport =$transportBuilder->setTemplateIdentifier($templateId)
            ->setTemplateOptions(['area' => 'frontend', 'store' => $storeId])
            ->setTemplateVars($templateParams)
            ->setFrom(array('email'=>'anand@gmail.com', 'name'=>'anand'))
            ->addTo('anand.ontigeri@alshaya.com','anand.ontigeri')
            ->getTransport();
        $transport->attachFile($path,'asd');
        $transport->sendMessage();

Fatal error: Call to undefined method Magento\Framework\Mail\Transport\Interceptor::attachFile() in /var/www/magento2/html/magento2ee/script/Email.php on line 34


texts: How to deactivate the user automatically after 90 days if he had no purchase with in 90 days

texts:
How to deactivate or inactive the user automatically after 90 days if he had no purchase with in 90 days.
in our website


texts: Cleaning up Magento installation: Which files & folders can be deleted?

texts:
I want to make some space on disk and clean

What file & folders are safe to delete?

I found /media/import/ files are safe to delete

Deleting files and folder effect performance too?

Is it okay to delete '/www/media/catalog/product/cache'?


texts: Product images are not correct in Magento 2.3.2

texts:
I have installed Magento 2.3.2 and migrated all custom module, database, media folder from 2.2.7.
But now the product images on frontend are not correct.
I have set image size 165 * 165.
And when I try to resize via php bin/magento catalog:image:resize, I meet this error.

Area code is already set

How to fix this?


texts: Having issue during installation of Magento 2.4.1

texts:
There is no link to start installation after setup of Magento 2.4.1
There is the only text as the image given below. how can I install and resolve this issue of Magento 2.4.1


texts: Transactional email not translated for programmatically created invoice, shipping

texts:
Order emails are correct, but my invoice and shipping emails are not fully translated.

Some fields are correct:

billing/shipping address titles
payment method title

But some get not translated:

table headers for ordered items
grand total / sub total
payment info text ("Kontodaten" vs "Account info")
a block from "MageSetup" extension

Differences

order email uses {{layout handle="sales_email_order_items" order=$order}}
invoice uses {{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

I've already checked related files, but couldn't find the reason for missing translations. If I use sales_email_order_items for both it works, but seems not to be correct.

Order

Invoice (for the same order)

Edit:

Missing translation only appears for programmatically created invoices/shipments.

The code I use is this ...

$invoice->getOrder()->setIsInProcess(true);
$transactionSave = Mage::getModel('core/resource_transaction')
    ->addObject($invoice)
    ->addObject($order)
    ->save();

$emailSentStatus = $invoice->getData('email_sent');
if (!$emailSentStatus) {
    $invoice->sendEmail(true, $customerEmailComments);
    $invoice->setEmailSent(true);
}

But still no idea what wrong here. If I create invoice/shipments from backend translation is OK.


texts: How can I alter a string passed by an event?

texts:
In my observer function, I get a variable passed by the event like that:

public function observerFunc(Varien_Event_Observer $observer)
{
    $sth = $observer->getEvent()->getSth();
}

If sth is an object, I can alter it by calling methods on it. But how can I alter sth if it is a simple string? I tried the following without success:

public function observerFunc(Varien_Event_Observer $observer)
{
    $sth = $observer->getEvent()->getSth();
    $observer->getEvent()->setSth('test');
    $observer->setSth('test');
}

I just learned that some events also pass a transport object in which the string can be altered (thanks Alex), but the event page_block_html_topmenu_gethtml_after does not. So what can I do?

The event in question gets dispatched like this and I want to alter $html:

$html = $this->_getHtml($this->_menu, $childrenWrapClass);
Mage::dispatchEvent('page_block_html_topmenu_gethtml_after', array(
    'menu' => $this->_menu,
    'html' => $html
));


texts: Magento 2 checkout can not load always spinning

texts: Magento 2 local development installation is working fine, when place a order and  resulting in an endless spinning wheel load screen in checkout page.


texts: Magento1.9.6 migrate Magneto2.3.3 after data migration getting issue

texts: I have done success fully data migration M1.9.6 to M2.3.3 after in admin side product inside category not assign default cateogry so any idea how to assign it automatically because our product data large and not manually selected.