texts: New products on home page has blurry images after upgrading to Magento ver. 1.9.2.0

texts:
I upload my pictures at 864px by 864px. They look great on the product page (I also like that they no longer open a new window when clicked).

However, the first thing my customers see are the blurry new products images on the home page.

Using Chrome Inspect Element on the image, it appears to be resizing the image to 135, because I see these attributes: width="135" height="135"

However, chrome shows the image itself is 275x275 (actually, it says it is 274.844x275). So it seems the image is being resized to 135x135, then scaled up to 275x275 when displayed, thus making the image unnecessarily pixelated (blurry).

I've looked for the resize command that may be causing this, and found a potential culprit around line 50 in: app/design/frontend/default/my_theme/template/catalog/product/list.phtml

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

However, changing the width and height attributes to 275 and changing the resize(135) to resize(275) has no visible effect on the image.

Does anybody here know how to fix this problem?


texts: How can I know if reward points are used in quote

texts: How can I know if reward points are used in current cart and also how can I remove them?


texts: How to call a js method in my template with RequireJS in Magento2?

texts:
In vendor/magento/module-catalog/view/base/web/js/price-options.js there is a method _onOptionChanged: function onOptionChanged(event).

I would like to call this method in my template when page load.

app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/options/wrapper.phtml

How can i achieve this? is it possible to call this method in my template file ? if possible please help me and suggest me how can do it?


texts: Deleted Magento 1,9 database - now get error There has been an error processing your request

texts:
I am messing with a fresh magento 1.9 install. I made a backup of my database and had to replace it with the backup.  I used phpMyAdmin and deleted all tables and installed them fresh from my backup. I got this error

  There has been an error processing your request
  Exception printing is disabled by default for security reasons.
  Error log record number:

So I decided to delete all the tables and install it fresh, i thought Magento 1.9 would see it had no tables and run install script again, i get this error

  There has been an error processing your request
  Exception printing is disabled by default for security reasons.
  Error log record number: 1192419681644

What physical files do I need to edit to

Allow me to install my backup SQL
Allow me to freshly install 1.9
Anything else I may be missing to make this work


texts: Right now i put in checkout page both (shipping and paying), on sidebar, firstly cart items after totals of the cart after shipping address and after shipping method(last two only on paying page). Now i want to insert on both pages pages coupon field between totals field and shipping address field. I override from magento checkout layout checkout_index_index.xml and i put the next thing in the referenceContainer <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon" as="coupon" template="Magento_Checkout::cart/coupon.phtml"/>. It appear on those pages, but is on the bottom of the page. With other words is the DIV with id "checkout" and after that is the coupon DIV with id "block-discount" is any chance to put the coupon div inside the other one and after to rearrange to be in that place? I am on Magento 2.3


texts: magento2 adding products via ProductRepositoryInterface

texts:
I am working on a module where I can add products by import.

This is my code: http://pastebin.com/DVkHVg0t

In my foreach I am creating a new object like this, because if I work with
$this->product (ProductInterface) the data from the previous object is saved with my new product.

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

Is there any better way for doing this ?


texts: Warning: include(File.php) failed in Autoload.php on line 93

texts:
I have followed several articles on this, but none solve my problem. Every request on site writes the following entry to the system log.

var/log/system.log:

2013-10-09T12:53:50+00:00 ERR (3): Warning: include(File.php): failed to open stream: No such file or directory  in /var/public_html/domain.com/live/lib/Varien/Autoload.php on line 93
2013-10-09T12:53:50+00:00 ERR (3): Warning: include(): Failed opening 'File.php' for inclusion (include_path='/var/public_html/domain.com/live/app/code/local:/var/public_html/domain.com/live/app/code/community:/var/public_html/domain.com/live/app/code/core:/var/public_html/domain.com/live/lib:.:/usr/share/pear:/usr/share/php')  in /var/public_html/domain.com/live/lib/Varien/Autoload.php on line 93

I have seen and followed articles that indicate this is related to the compiler.

What I've Done So Far

I have commented the two lines out in includes/config.php.

Cleared the profiler from terminal following Mr Storm's article: Magento Compiler.

Ensured that the caches are emptied and indexing has been run several times.

Compared a vanilla copy of 1.7.0.2 CE and looked for any files that my own codebase might be missing (using WinMerge).

Disabled symlinks in admin.

Changed file permissions to several various recommendations and back again.

I've also noticed that the profiler page in admin located at Admin > System > Tools > Compilation is completely blank, apart from the nav and footer.

Any help on where to now would be very appreciated. Please ask if anything is unclear. Thanks!


texts: Magento 2: remove all default JS for custom theme

texts:
We are creating multiple websites in one magento 2 instance with a custom theme. Those websites are not supposed to be shops. They all are serving one simple page without any of magento's functionality. They are simple one-pagers that exist for SEO purposes.

But unfortunately when I enable the require-js functionality magento keeps loading all the default JS files that hardly anybody needs or knows about.

Is there a way to clear all those files before starting from scratch? All I really need is jquery and maybe a couple more libraries but not all the shop overhead (100+ unused JS files).

Thank you.


texts: Started with "Not secure" warning, then when logging into admin stuck on "my account" page to reset password, can't make any further actions

texts: My magento page which was recently secure, has given me a warning through chrome that it is not secure. In an attempt to check on the status of my account info to see if there was anything I could do in the back end, I got stuck on the "It's time to change your password" page in my account settings; I tried to change it, but nothing happens, and then clicking elsewhere just brings me back to the "change your password" screen. Is there a simple solution for this?


texts:
I am getting error on Category Page Magento 2.2.6 ( Element 'block',
  attribute 'remove': The attribute 'remove' is not allowed)

  1 exception(s): Exception #0
  (Magento\Framework\Config\Dom\ValidationException): Element 'block',
  attribute 'remove': The attribute 'remove' is not allowed. Line: 1018

After removing one theme then I am getting this error.
Please help me


texts:
remove this menu from my top navbar. but i couldn't find where from its working.

check attached image

when i check category there this nav menu not showing there

is it locate from different source ?? where from i edit the menu link


texts: How can you redirect to custom page after subscribe to NEWS LETTER

texts: I want to redirect to new page after clicking to subscribe button. Can anyone help me over here.


texts: Retreive ALL Product details in Search REST API

texts:
Dears, I am using this API in search:

GET http://domain.com/index.php/rest/V1/search

Parameters:

searchCriteria[requestName]= quick_search_container
searchCriteria[filterGroups][0][filters][0][field] = search_term
searchCriteria[filterGroups][0][filters][0][value] = life

But I always retrieve products results without image as:

  {"items":[{"id":211,"custom_attributes":[{"attribute_code":"score","value":"91.9732208251953100"}]},{"id":483,"custom_attributes":[{"attribute_code":"score","value":"91.9732208251953100"}]},{"id":46,"custom_attributes":[{"attribute_code":"score","value":"91.9732208251953100"}]},{"id":50,"custom_attributes":[{"attribute_code":"score","value":"91.9732208251953100"}]},{"id":40,"custom_attributes":[{"attribute_code":"score","value":"5.7483263015747070"}]},{"id":41,"custom_attributes":[{"attribute_code":"score","value":"5.7483263015747070"}]},{"id":45,"custom_attributes":[{"attribute_code":"score","value":"5.7483263015747070"}]}],"aggregations":{"buckets":[{"name":"category_bucket","values":[{"value":"3","metrics":["3","2"]},{"value":"6","metrics":["6","2"]},{"value":"7","metrics":["7","1"]},{"value":"8","metrics":["8","1"]},{"value":"9","metrics":["9","3"]},{"value":"10","metrics":["10","3"]},{"value":"12","metrics":["12","2"]},{"value":"15","metrics":["15","1"]},{"value":"16","metrics":["16","1"]}]}],"bucket_names":["category_bucket"]},"search_criteria":{"request_name":"quick_search_container","filter_groups":[{"filters":[{"field":"search_term","value":"life","condition_type":"eq"}]}]},"total_count":7}

How can I retrieve product details included images ?


texts: Need help with a button that is not working. Can anyone help?

texts:
So the pin button on our page stopped all of a sudden. Can anyone help? Below is the code with the issue.
if (in_array('pinterest',$recipe_sharing_networks)):
        echo '

';
    endif;


texts: Warning "Something went wrong" appears every time I try to enable a theme

texts:
Preconditions

Magento 2.1.0, php 5.6, MariaDB 10

Steps to reproduce

When I press on Content > Design > Configuration I get the error

Expected result: list of themes to enable one of them

Actual result: A pop up displays the warning:

  Attention. Something went wrong

and when I tracked the error, I found this:

  Warning: strtoupper() expects parameter 1 to be string, array given in
  /home/nibrasac/public_html/magento2.1/vendor/magento/module-ui/Component/Listing/Columns/Column.php
  on line 136


texts: Magento 2 Image Cache Files are not Updating in Product Catalog

texts:
I'm currently experiencing an intermittent issue with my product images in my installation of Magento 2.3.2.

Essentially I upload a new image to replace an existing image, the image updates in the actual product page but the catalog image is still using the original cache file. I have set the new image as "main", "small" and "thumbnail".

I've used the developer tools and while the  tag in the product page looks like this:

The image in the catalog remains as follows:

I have tried flushing the caches and re-indexing but the cached catalog image has not updated.

Can anyone suggest a solution to this problem?


texts: Magento 2 Use Default Value for Category Image is not working for a specific storeview

texts:
My Magento website is running in different store views. I have experienced a weired issue, that for just one store view, I can't select Use Default Value for the Category Image.

What is the problem?


texts: Get UnProccessed Email Default Email Template In Magento1

texts:
I am trying to fetch the email template html with processing the variable. I want forgot_password default template without processing the default variable.

Is it possible to that template without processed variable and with all header footer and css ?


texts: When is the quote object is generated in Magento?

texts: I believe it should be made when we add an item in cart, but I need to find code in Magento core where quote ID is generated and an object is made and similarly in the DB.


texts: Magento 2 Data Migration "Integrity constraint violation: 1062 Duplicate entry ### for key 'SALES_CREDITMEMO_INCREMENT_ID_STORE_ID

texts:
I've been having issues while using the data migration tool to migrate data from Magento 1.9.3 to Magento 2.3:
I already setup the config.xml to migrate only Customers and Sales. I then run the following commands:
php bin/magento migrate:settings --reset vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.8/config.xml
php bin/magento migrate:data --auto vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.8/config.xml
and then get the following error:
In Mysql.php line 182:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100000003-1' for key 'SALES_CREDITMEMO_INCREMENT_ID_STORE_ID'
The Magento 2 database sales_creditmemo_* tables are all empty, so I'm clueless.
Any help is greatly appreciated.


texts: Magento backend create order missing "add product" button

texts:
I am using magento 2.4.2.
If i want to create a new order(sales -> orders -> create new order) than i am missing the "add product" button.
Like this.
https://support.magento.com/hc/en-us/articles/360047481431-Magento-2-4-0-known-issue-Create-New-Order-buttons-missing
We already tried the workaround. Only it didn't work.
There aren't any console.log error's


texts: Undefined index: hits ... Dymamic.php on line 63

texts:
An exception is thrown on my search results page, but only for certain search text.  If I search for "stov" (without the quotes), the results appear.  If I search for "stove", an exception is thrown.  There are several other search terms which work and don't work.
The instsance is Magento 2.4 using Elastic v7.  Magento was recently upgraded from 2.3.5.  I'm using a Porto theme and Wyomind extension for Autocomplete.
On the Elastic server, I put trace on inbound requests.  When Magento produces this error, a search query does not reach the Catalog product index, in Elastic.
I rebuilt the index (indexer:reindex), and flush/clean the cache.

main.CRITICAL: Notice: Undefined index: hits in /chroot/home/.../vendor/magento/module-elasticsearch/SearchAdapter/Aggregation/Builder/Dynamic.php on line 63

Update 1:  Could this be a memory issue, in Magento?  I have a large catalog >500k items, running in a minimal environment, 2G.  If it were a memory issue, would that show up in a log?  I only see the error (above) in the system.log and exception.log.
Update 2:  I've received the following error while trying to indexer:reindex  catalogsearch_fulltext.  I seem to be stuck on this point, unable to rebuild the index.

Catalog Search index process unknown error:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [position_category_1270] of different type, current_type [text], merged_type [integer]"}],"type":"illegal_argument_exception","reason":"mapper [position_category_1270] of different type, current_type [text], merged_type [integer]"},"status":400}


texts:
I need to register the customer into group B2B (id group 2)

Now... in register.phtml file I insert

<input type="hidden" name="group_id" id="group_id" value="2" />

but it does not work.

In the backend the customer does not have a group

why?


texts: how to configure cron job for magento 1.9.2.3

texts:
I try to set the right cron for version 1.9.2.3
.
I've already put in Cpanel */5 * * * * website/cron.php but I don't receive the order emails.

Can someone tell me, which lines to be modified in cron.php file?

Where to place the "crontab -e" or other additional codes ?

How can I verify which are the correct settings of cron according with my hosting server?

I have a shared SSH hosting, on Linux.


texts: M2.3 - How to add responsive for Panel Header in custom theme?

texts:
I have created custom theme which is inherit form Magento Blank theme, just alignment the header panel using,
app\design\frontend\MyTheme\theme\Magento_Theme\layout\default.xml
Update and align the logo:
<referenceBlock name="logo">
    <arguments>
        <argument name="logo_file" xsi:type="string">images/logo.png</argument>
        <argument name="logo_width" xsi:type="number">257</argument>
        <argument name="logo_height" xsi:type="number">24</argument>
        <argument name="logo_top" xsi:type="number">43</argument>
        <argument name="logo_left" xsi:type="number">140</argument>
        <argument name="logo_alt" xsi:type="string">Logo name</argument>
    </arguments>
</referenceBlock>

Remove Blocks :
<referenceBlock name="report.bugs" remove="true" />
<referenceBlock name="register-link" remove="true" />
<referenceBlock name="header" remove="true" />
<referenceBlock name="advanced-search-link" remove="true" />
<referenceBlock name="authorization-link-login" remove="true" />

Move Default element:
<move element="minicart" destination="header.panel" before="-"/>
<move element="top.search" destination="header.panel" before="top-links"/>
<move element="logo" destination="header.panel"/>
<move element="custom-link" destination="header.panel" after="logo" />

For height and width alignment using _header.less under app\design\frontend\MyTheme\theme\web\css_header.less then import _header.less into the _extend.less under app\design\frontend\MyTheme\theme\web\css\source_extend.less.
In which part will add responsive for my header? Any best practice for design the header welcome.


texts:
I am currently administering a Magento 1.9 website which hasn't been used in a long time. The site owner recently started to use the site again, and we noticed that the header section of the site is now gone. When I first set the site up, the site logo, language selector etc would show on the site header, but now that header is entirely gone ...

Initially I thought this was an issue with the language selector, so I went into the admin panel and re-configured the languages, but no dice. I've looked under all the options in the configuration section as well, but for the life of me cannot figure out why the header of the site has suddenly disappeared.

If anyone could point me to the right area in the Magento admin to take a look at this, or even how to debug etc, it would be much appreciated. The rest of the site works just fine - it is just the header (with the site logo, language switcher, login links etc) that is not showing up.

The login links are still there at the BOTTOM of the homepage - and seem to work, so I'm not sure why the header itself is not showing.

Here is what I see in terms of "inspecting the homepage" - -

(index):1 [DOM] Found 2 elements with non-unique id #youama-email: (More info:) <input type="text" placeholder="E-mail address" id="youama-email" name="youama-email" value> <input type="text" placeholder="E-mail address" id="youama-email" name="youama-email" value>
(index):1 [DOM] Found 2 elements with non-unique id #youama-password: (More info) <input type="password" placeholder="Password" id="youama-password" name="youama-password" value> <input type="password" placeholder="Password" id="youama-password" name="youama-password" value>
2gdata.youtube.com/feeds/api/videos/0TSSoT4c2BI?v=2&alt=jsonc:1 Failed to load resource: the server responded with a status of 404 ()
(index):1 Access to XMLHttpRequest at 'https://gdata.youtube.com/feeds/api/videos/0TSSoT4c2BI?v=2&alt=jsonc' from origin 'http://blantotrading.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
2www-widgetapi.js:100 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://blantotrading.com').

What is more vexing is that the code seems to be all there when I look at the source code ...

Thanks!


texts: display custom attributes outside the product page (view.phtml)

texts:
I'm having this problem where i want to display a custom attribute outside the product page in magento. (view.phtml).

For example. I would like to display custom attribute (its value) to specific place in list.phtml (not navigation layout) and in home page. I tried so many solution, but nothing worked.

Any guidance or assistance would be very appreciated.


texts: Restrict admin user permissions per field in Magento

texts: Is it possible to restrict an admin user on a field basis? For example I would like some users to edit stock of a product and the short description however I don't want them to be able to change fields like the product name and sku


texts: Magento 2: Low Stock Notification Email to Admin

texts:
We have below settings

Admin -> Stores -> Configuration -> Catalog -> Inventory -> Product Stock Options

Notify for Quantity Below -> 1

Admin is not getting email fo Low Stock Products.

Notify for Quantity Below in Magento 2

I want to send email if quantity is below X or how can we send Low Stock Report via Email Daily (CronJob)


texts: Hide store prices if not logged in - Magento 2.3.1

texts: I have 3 stores on the same website, and I would like for one of the stores, the prices do not show if the customer has not logged in. Any idea how to do it?


texts: Adding product programatically in a new module

texts:
Here is my requirement.
1. I have a new module page that has "Add to Cart" button. This module calculates the price for the product. Once the user clicks on Add to Cart button (new button that I have added on this page), I want to add this product to my cart with custom price.
2. I had a working code (Magento 2.0); now that I am on 2.1; my code no longer work.
3. I browsed thorugh google and people said I should use CartRepositoryInterface instead of ObjectManager but I don't know how. Whenever I try to add this class in __construct, my code gives error saying it does not expect these classes.

Here is my code that I have written to add product to cart:

<?php
namespace Silver\Customize\Controller\addProduct;
use \Magento\Framework\View\Result\PageFactory;
use \Magento\Framework\App\Action\Context;
use \Magento\Framework\Registry;

class addProduct extends \Magento\Framework\App\Action\Action
{
    protected $pageFactory;
    protected $registry;
    public function __construct(Context $context, PageFactory $pageFactory, \Magento\Framework\Registry $registry)
    {
        $this->pageFactory = $pageFactory;
        $this->registry = $registry;
        return parent::__construct($context);
    }

    public function execute()
    {
        $this->registry->register('var_sku', $this->getRequest()->getParam('arg_sku'));
        $this->registry->register('var_new_price', $this->getRequest()->getParam('new_price'));

        $page_object = $this->pageFactory->create();
        $this->addProductToCart();
        $this->_redirect('checkout/cart');

    }

    public function addProductToCart()
    {

        $om         =   \Magento\Framework\App\ObjectManager::getInstance();
        $product =   $om->create('Magento\Catalog\Model\Product');
        $product->load($product->getIdBySku($this->registry->registry('var_sku')));
        $price = $this->getRequest()->getParam('new_price'); // Replace price with your price
        $cart = $om->get('Magento\Checkout\Model\Cart');

        $qty=1;
        $quote = $cart->getQuote();
        $quoteItem = $quote->addProduct($product, $qty);
        $quoteItem->setCustomPrice(5000);
        $quote->save();
        $cart->setQuote($quote);
        $cart->save(); -- FAILS HERE
        $message = __('You added customized %1 to your shopping cart.', $product->getName());

        $this->messageManager->addSuccessMessage($message);
    }

}

When I run this code, I get an error as "Cart 82 does not contain item 157". Can anyone help me please?


texts: How to get product quantity by using REST API product filter

texts:
I am stuck here, i want to get product's quantity by using API filter like this

https://talonton.test/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=2047&searchCriteria[filter_groups][0][filters][0][condition_type]=gt

is there any way to return the quantity of each product filtered?

  {
      "items": [
          {
              "id": 2048,
              "sku": "lj",
              "name": "Long Jean",
              "attribute_set_id": 4,
              "price": 65,
              "status": 1,
              "visibility": 4,
              "type_id": "simple",
              "created_at": "2018-05-10 09:06:33",
              "updated_at": "2018-05-11 02:30:28",
              "product_links": [],
              "tier_prices": [],
              "custom_attributes": [
                  {
                      "attribute_code": "meta_title",
                      "value": "Long Jean"
                  },
                  {
                      "attribute_code": "meta_keyword",
                      "value": "Long Jean"
                  },
                  {
                      "attribute_code": "meta_description",
                      "value": "Long Jean "
                  },
                  {
                      "attribute_code": "image",
                      "value": "/m/p/mp11-brown_main_1.jpg"
                  },
                  {
                      "attribute_code": "small_image",
                      "value": "/m/p/mp11-brown_main_1.jpg"
                  },
                  {
                      "attribute_code": "thumbnail",
                      "value": "/m/p/mp11-brown_main_1.jpg"
                  },
                  {
                      "attribute_code": "category_ids",
                      "value": [
                          "11",
                          "13",
                          "18"
                      ]
                  },
                  {
                      "attribute_code": "options_container",
                      "value": "container2"
                  },
                  {
                      "attribute_code": "required_options",
                      "value": "0"
                  },
                  {
                      "attribute_code": "has_options",
                      "value": "0"
                  },
                  {
                      "attribute_code": "msrp_display_actual_price_type",
                      "value": "0"
                  },
                  {
                      "attribute_code": "url_key",
                      "value": "long-jean"
                  },
                  {
                      "attribute_code": "tax_class_id",
                      "value": "2"
                  },
                  {
                      "attribute_code": "gift_message_available",
                      "value": "2"
                  },
                  {
                      "attribute_code": "swatch_image",
                      "value": "/m/p/mp11-brown_main_1.jpg"
                  },
                  {
                      "attribute_code": "promotion_start_date",
                      "value": "2018-05-09 00:00:00"
                  },
                  {
                      "attribute_code": "promotion_end_date",
                      "value": "2018-05-25 00:00:00"
                  },
                  {
                      "attribute_code": "whole_price",
                      "value": "60.0000"
                  },
                  {
                      "attribute_code": "whole_supplier_price",
                      "value": "55.0000"
                  }
              ]
          }
      ] }

Thank in advanced.


texts: Magento 2. - Configurable Product Duplicate Visability

texts:
I'd like to know if it is possible to have 1x Configurable product that is visible in the same category more than once.

I don't want duplicate configurables because this means that they are separate products.


texts: Change Magento Header Logo to link to an external site in a multiple store account

texts:
I have multiple magento stores set up. I need to change only one of the stores' header logo to link to an external website. How do I do that?

I know where the header is:

app/design/frontend/default/[YOUR TEMPLATE]/template/page/html/header.phtml

and I know link is in this strip:

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

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

        <?php else:?>

If I change it here, it will change all of the logos on the other stores as well. I only want to change the logo link of one store specifically.


texts: How we can use magento 1.9.3 saved cc method

texts:
How we can use magento default "SAVED CC" payment method,
it is not saving credit card information on my site,


texts: Change 'add to cart' button to 'view more' on category page

texts:
I have looked at some other posts but need specific help with replacing the 'Add to cart' buttons on the category pages to 'view more' (linked to the product).

Here is the Grid view code from list.phtml

                 <?php if($_product->isSaleable()): ?>

                   <button type="button" onclick="setLocation('<?php echo $_product->getProductUrl() ?>')"><?php echo $this->__('View Details')?></button>

                    <?php if ( !($_product->getTypeInstance(true)->hasRequiredOptions($_product) || $_product->isGrouped()) ) { ?>
                    <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocationAjax('<?php echo $this->getAddToCartUrl($_product) ?>','<?php echo $_product->getId()?>')"><?php echo $this->__('Add to Cart') ?></button>
                    <span class="cat_loader" id='ajax_loader<?php echo $_product->getId()?>' style='display:none'>

                    <img alt="" src='<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif')?>'/>

                    <?php } else { ?>

                        <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="showOptions('<?php echo $_product->getId()?>')"><?php echo $this->__('Add to Cart') ?></button>

                    <?php }  ?>
                <?php else: ?>

<?php echo $this->__('Out of stock') ?>

                <?php endif; ?>

I have tried replacing the add-to-cart code with the following:

<button type="button" onclick="setLocation('<?php echo $_product->getProductUrl() ?>')"><?php echo $this->__('View Details')?></button>

Although, the Add to Cart button stays in place and I get an additional (badly formatted) one for the 'view details'.

Any suggestions to where I am going wrong please?


texts: MariaDB or MySQL Magento 2.4 "magento community edition open source"

texts:
We are in the process of planning for an eCommerce project with Magento 2.4 "magento community edition open source" for building up the e-commerce project.
But we are really confused with which SQL Server to proceed MariaDB or MySQL?


texts: Magento 2 Web API pre/post dispatch events (REST/SOAP)

texts: Is there any pre/post dispatch events for the Magento 2 web API (REST/SOAP) ?


texts: Magento 2 how to remove special price if special price date has expired

texts:
I am facing issue in Magento 2.1.7

If  special price date has expired for any products , i want to remove  special price and special price to date and special price from date
form products, by using crons.

i have tried everything but couldn't find a way to resolve it. Any suggestion appreciated.

Thanks in advance.


texts:
I'm using Magento 2.3.1 and I've installed the Dutch language pack. But the date stays in English like: 08 May 2019 instead of 8 Mei 2019. How can this be changed?

The code:

<?php echo date('d M Y', strtotime($post->getCreatedAt())) ?>


texts:
I want to edit the validation message on some input fields. I see that input fields are defined in the xml file (checkout_index_index.xml). Is there a way to override validation message in this xml?

<item name="company" xsi:type="array">
  <item name="validation" xsi:type="array">
    <item name="min_text_length" xsi:type="number">0</item>
  </item>
</item>


texts: How to call custom jquery function in phtml in magento 2.1

texts:
I have some custom jquery functions and I want to create a common js files for all custom functions. But I am unable to find a way to achieve this.

I have created requirejs-config.js file at theme root(app/desgin/frontend/Vendor/Theme/). Content of requirejs-config.js file is:

var config = {
map: {
   '*': {
       'customfunctions' : 'js/customfunctions',
   }
},
paths: {
},};

Then I have created a customfunctions.js file which has custom functions. Path of file  is app/desgin/frontend/Vendor/Theme/web/js. Content of customfunctions.js  file is:

define(['jquery'],
   function($) {
      function showDivtest() {
         alert("I am here");
      }
   };

Now, how I can call showDivtest() function in phtml file? Please suggest.


texts: Magento 2 : Display Regular Price and percent on cart page

texts: I am new in Magneto 2, in this I want to add the regular price and percent of discount on each product in cart page.


texts: Prevent Magento from overwriting URL key

texts:
I have the following problem with my products in Magento.
Once I upload products and save them initially the URL key field stays empty and the product just gets a URL like

www.mysite.com/SKU

However once I change something in the product and save it again it changes the URL to

www.mysite.com/Product-title

And it also writes the product name in the URL key.
Is there a way I can prevent this from happening?

It seems weird that this happens all the time.


texts:
Is FedEx extension in build in Magento configurable for shipping within India.
I have tried configuring the same with all the required details from FedEx developer section but it fails to calculate the shipping cost and returns that shipping is not configured.


texts: Unable to save configurable product programmatically in magento2

texts:
I am try to save configurable product programmatically, But when i just hit save button in admin panel after the configurable product save the simple product only.

<?php

                $productId = 612; // Configurable Product Ids
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $product = $objectManager->create('Magento\Catalog\Model\Product')->load($productId); // Load Configurable Product
                $product->setName('90i111');
               // $product->save();
                $attributeModel = $objectManager->create('Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute');
                $position = 0;
                $attributes = array(90); // Super Attribute Ids Used To Create Configurable Product
                $associatedProductIds = array($simple_productid); //Product Ids Of Associated Products

                foreach ($attributes as $attributeId) {
                    $data = array('attribute_id' => $attributeId, 'product_id' => $productId, 'position' => $position);
                    $position++;
                    $attributeModel->setData($data)->save();
                }
                $product->setTypeId("configurable"); // Setting Product Type As Configurable
                $product->setAffectConfigurableProductAttributes(4);
                $objectManager->create('Magento\ConfigurableProduct\Model\Product\Type\Configurable')->setUsedProductAttributeIds($attributes, $product);
                $product->setNewVariationsAttributeSetId(4); // Setting Attribute Set Id
                $product->setAssociatedProductIds($associatedProductIds);// Setting Associated Products
                $product->setCanSaveConfigurableAttributes(true);
                $product->save();

Can anyone help me to solve this.

Thanks in advance.


texts: Is it good practice to process a form submitted by a block inside the corresponding block class?

texts:
I have a block which outputs a form. The form action is generated dinamically using Mage::getUrl. The form is always posted to exactly the same url, from where it was rendered. I process the form's data inside the block's corresponding class file.

Problem: code review guys tells me, that the processing of the form should be inside the controller whose action ultimately displays the block, and that my solution is bad practice. I understand his argument, but on the other and, I think that a block class file is a perfect place to accomplish this, so that I don't have flood the controller of my page with logic, that is specific to the block. In fact, I feel that having the page know how to process a contained block is bad practice, since blocks are meant to be reusable withouth so much of a hassle?

So... can some senior magento people help me put things into order? Which one is good practice and why? Or is there a third solution that would be preferable?


texts: Magento 2 add query string to url when redirect to 404 page

texts:
Magento 2 custom module i am trying to add query param
https://test.com/index?id=L_FRR3039-ODKLWG-GP4QPY

if i  give above format getting 404 page not found

https://test.com/index?id=L_FRR3039

it working fine
even
https://test.com/index?id=L_FRR3039-ODKLWG_GP4QPY  this is also working

it is not taking

  -

multiple hyphens remaining all special characters taking
can anyone help me in this


texts: Can anyone explain me the code and what is been returned in $discountData : Magento 2

texts:
$rulePercent = min(100, $rule->getDiscountAmount());
    $discountData = $this->discountFactory->create();

    $itemPrice = $this->validator->getItemPrice($item);
    $baseItemPrice = $this->validator->getItemBasePrice($item);
    $itemOriginalPrice = $this->validator->getItemOriginalPrice($item);
    $baseItemOriginalPrice = $this->validator->getItemBaseOriginalPrice($item);

    $_rulePct = $rulePercent / 100;

    $taxAmount = $itemPrice - ($itemPrice / ((100 + $item->getTaxPercent())/100));
    $perItemTaxAmount = $taxAmount;
    $itemPriceBeforeTax = $itemPrice - $perItemTaxAmount;
    $discountData->setAmount(($qty * $itemPriceBeforeTax - $item->getDiscountAmount()) * $_rulePct);
    $discountData->setBaseAmount(($qty * ($baseItemPrice - $perItemTaxAmount) - $item->getBaseDiscountAmount()) * $_rulePct);
    $discountData->setOriginalAmount(($qty * ($itemOriginalPrice - $perItemTaxAmount) - $item->getDiscountAmount()) * $_rulePct);
    $discountData->setBaseOriginalAmount(
        ($qty * $baseItemOriginalPrice - $item->getBaseDiscountAmount()) * $_rulePct
    );

    if (!$rule->getDiscountQty() || $rule->getDiscountQty() > $qty) {
        $discountPercent = min(100, $item->getDiscountPercent() + $rulePercent);
        $item->setDiscountPercent($discountPercent);
    }

    return $discountData;


texts: Magento mobile Theme "add to cart" issue

texts:
I am using a Magento version 1.9.0.1. I have installed a mobile theme, which is working fine except "add to cart" function. Nothing happens when I press it, I have tried it on my Samsung Galaxy S3.

I tried also the solution here but it does not work

http://www.magentocommerce.com/boards/m/viewthread/290453/#t474173


texts:
I can't figure out the code to identify the login page to implement an If Else statement.

If the current page = customer/account/login {Hide the footer div and the main navigation div}

Else {Show the footer div and the main navigation div}

Cheers in advance

M


texts: Magento 2 Get Product ViewCount Value By Factory

texts:
Trying to get most viewed product view count value, I need to use it in another method calculations. E.g.(if most viewed product view count value is 100 then I need this value to be returned) What am I missing?

/**
 * @var \Magento\Reports\Model\ResourceModel\Product\CollectionFactory
 */
protected $_productCollectionFactory;

public function __construct(
    \Magento\Framework\Model\ResourceModel\Db\Context $context,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Reports\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
    $connectionName = null
)
{
    $this->_storeManager = $storeManager;
    $this->_productCollectionFactory = $productCollectionFactory;
    parent::__construct($context, $connectionName);
}

/**
 * Viewed Product Data
 * @param null|string|bool|int|Store $storeId
 */
public function getRecentViewedCollection($storeId){
    /*@var $store Store*/
    $store = $this->_storeManager->getStore($storeId);
    if(!$store){
        return false;
    }

    $collection = $this->_productCollectionFactory->create()
        ->addAttributeToSelect('views')
        ->addViewsCount($storeId)
        ->setStoreId($storeId)
        ->setOrder('views ' . self::SORT_ORDER_DESC)
        ->setPageSize(1);

    foreach ($collection as $product){
         $product;
    }

    return $this;
}

Now _data on Xdebug return this:

views = "3"
entity_id = "163"
attribute_set_id = "9"
etc..

Tried these in foreach:

$product->getViews();
$product->getValue('views');
$product->getData('views');

Didn't worked

What is the final step to get views value in return?


texts: Magento2 How to solve 505 internal error while saving migrated customer from admin

texts:
I migrated my magento 1 store to magento2 and all customer and other data are migrated successfully.
but when i try to save customer from admin , the page is redirect to 505 internal error.
if i create new customer and save it than that works ok.
so can anyone suggest me how i can solve this issue


texts: How to remove section from system.xml file?

texts:
System.xml file consist of different sections. Now I want to remove particular section from it

I tried by creating module in etc folder and system file in local folder but in vain.

For e.g I want to remove "gift options" from Sales configuration page in admin panel. how to remove it..?

I dont want to do from core folder

Is there any other way of doing this?


texts:
Import shows error message "Column names have duplicates" but I don't have any duplicates.

Who can I fix this?

"_type","sku","has_options","name","image","small_image","thumbnail","url_key","url_path","price","manufacturer","status","tax_class_id","visibility","description","short_description","gift_message_available","qty","min_qty","is_qty_decimal","backorders","min_sale_qty","max_sale_qty","is_in_stock","notify_stock_qty","manage_stock","qty_increments","enable_qty_increments"
"simple","1174407","0","BCI-15BK Tintenpatrone schwarz","","","","","","22.000","Canon","Enabled","none","Catalogue,Search","BCI-15BK Tintenpatrone schwarz, 2er-Pack, für I70                    NSTintenpatronenOriginalML","BCI-15BK Tintenpatrone schwarz, 2er-Pack, für I70                    NSTintenpatronenOriginalML","","0","","","0","1","","","","","","0"

Download file

I made sure all of my fields also exist in exported csv. Am I missing some required rows? I tried to check but this wiki page from 2012 requires columens that are not even in the exported file. So I am not sure what are the required columens.

PHP Version is 5.2.17


texts: How to Display Accordion in Product View Page

texts: Is there a way to show accordion instead of tabbed view for product description for desktop view like its in mobile version of the rwd theme


texts: Magento 1.4 installer script is not firing

texts:
my config.xml is :

<?xml version="1.0"?>
<config>
    <modules>
        <Premium_PlatinumBlock>
            <version>1.0.0</version>
        </Premium_PlatinumBlock>
    </modules>
    <global>
        <helpers>
            <premium_platinumblock>
                <class>Premium_PlatinumBlock_Helper</class>
            </premium_platinumblock>
        </helpers>
        <resources>
            <premium_platinumblock_setup>
                <setup>
                    <module>Premium_PlatinumBlock</module>
                </setup>
            </premium_platinumblock_setup>
        </resources>
    </global>
</config>

my installer script -

Premium/PlatinumBlock/sql/premium_platinumblock_setup/mysql4-install-1.0.0.php
$installer = $this;
$installer->startSetup();
$storeId    = 2;
$type       = 'block';
$title      = 'Block123';
$identifier = 'my_block';
$content = <<<'EOD here'
EOD;

Mage::getModel('cms/'.$type)
        ->setStoreId($storeId)
        ->load($identifier)
        ->setTitle($title)
        ->setIdentifier($identifier)
        ->setStores(array($storeId))
        ->setIsActive(true)
        ->setContent($content)
        ->save();
$installer->endSetup();


texts: How can i apply custom condition on one-page checkout before grand Total?

texts:
Below is my code for getting checkout cart grand total weight,

<?php echo $this->__('Cart Weight:') ?>
<?php
    echo Mage::getSingleton('checkout/session')
        ->getQuote()
        ->getShippingAddress()
        ->getWeight();
?>

-> Output is grand total weight of checkout cart. Here i need to apply my below condition,

eg: If my checkout cart total weight is 5.000 means my packing charges will be apply.

like,
      (Consider my Cart Weight: 5.000)

Subtotal    68.80
Shipping & Handling (Flat Rate - Fixed) 15.00
Packing Charge : 75 (My required custom condition)
Grand Total 158.8

Note: I did grand total weight of checkout cart, how can i merge custom condition and packing charge.

I just leaner of PHP, lead me with your help.

Starting(KG)    End(KG) Packing Charges

0               5.000   75
5.001          10.000   120
10.001         15.000   170
15.001         20.000   220
20.001         25.000   270
25.001         30.000   320
30.001         35.000   370
35.001         40.000   420
40.001         45.000   470
45.001         50.000   520
50.001         55.000   570
55.001         60.000   620
60.001         65.000   670
65.001         70.000   720
70.001         75.000   770
75.001         80.000   820
80.001         85.000   870
85.001         90.000   920
90.001         95.000   970
95.001         100.000  1000

How can i do it by Shopping cart pricing rule, if any other options exits, welcome.


texts: Getting parameters in sales_order_place_before event's observer

texts: I am using $request = $observer->getRequest();in my observer method but it is not returning anything. i am using sales_order_place_beforeevent.


texts: Magento include error (how to find empty file? )

texts:
Dears, please help me to fix this problem. I have error code in system.log in /magento/var/log/ -folder.  And I can't figure out which template is null.  It seems that $fileName is null. Please help me s there any way to find link to empty file. Thanks in advance.

  2016-10-18T09:42:56+00:00 ERR (3): Warning: include(): Failed opening '/var/www/html/magento/app/design/frontend/blacknwhite/default/template' for inclusion (include_path='/var/www/html/magento/app/code/local:/var/www/html/magento/app/code/community:/var/www/html/magento/app/code/core:/var/www/html/magento/lib:.:/usr/share/pear:/usr/share/php')  in /var/www/html/magento/app/code/core/Mage/Core/Block/Template.php on line 242


texts: Magento programmatically set the position of a watermark?

texts:
Sometimes the pre-defined watermark positions are not enough and we may need custom positions, such as 25% below the middle center, etc.

I found this method but it seems protected.

Is there any way to programmatically set the position of a watermark? Such as by position of pixels from the top left of the image? For now I can set size and opacity of the watermark programmatically:

$this->helper('catalog/image')->init($_product, 'image')
    ->constrainOnly(TRUE)
    ->keepAspectRatio(TRUE)
    ->keepFrame(FALSE)
    ->setWatermarkImageOpacity(6)
    ->setWatermarkSize(
        iGetWatermarkSize(600)
    )
    ->resize(600, null)

Wherein iGetWatermarkSize() is my in-house function that returns the size string for the watermark according to the width of the subject image.

I think it's sensible to have a method to set the position of a watermark in Magento but found nothing relevant in Google in this regard. Is there such a method or way for me to do this?


texts: Magento 2: How to Insert Multiple Records to custom table?

texts:
I have created a new table in Magento2: my_custom_table with 4 fields:

id: primary key,
product_id: int(11),
customer_id: int(11)
status:int(11)

I  want to save multiple records at a time. Here is my code.

namespace Company\Module\Controller\Adminhtml\Index;

class Save extends \Company\Module\Controller\Adminhtml\Index
    {

        protected $_filterProvider;
        protected $productModel;

        public function __construct(
            \Magento\Backend\App\Action\Context $context,
            \Magento\Framework\Registry $registry,
            \Magento\Cms\Model\Template\FilterProvider $filterProvider,
            \Company\Module\Model\Product  $productModel

        ) {
            $this->_filterProvider = $filterProvider;
            $this->productModel = $productModel;

            parent::__construct($context,$registry);
        }

        public function execute()
        {
            $resultRedirect = $this->resultRedirectFactory->create();
            $data = $this->getRequest()->getPostValue();
            if ($data) {
                $products = array(12,13,14,14);
                $customerId = 1;
                foreach($products as $pdt){
                    $productModel = $this->productModel;
                    $productModel->setData('product_id',$pdt);
                    $productModel->setData('customer_id',$customerId);
                    $productModel->setData('product_status',1);
                    $productModel->save();
                }
            }
            return $resultRedirect->setPath('*/*/new');
        }

    }

Please help me


texts: How to get the previous url & redirect from controller

texts: How can I detect the URL and store it then use it on the Controller for Redirect. Can anyone help me with this?


texts: How to remove hacker message from magento website and how to create a good security for magento website. my website is borsavela.com. how to fix it.


texts: How can I stop other attributes changing my swatch image?

texts:
Most of my products have two attributes, Product Colour and Size.
When the Product colour is selected it changes the swatch, as expected.

However, if the customer then selects the size. It reverts it back to the base image. (It also puts only the base image in the cart, but this is not my main concern.)

I want it so that it only reloads when the customer is selecting Product Colour.

This has lost me sales and caused confusion for the customer.
The link below is an example of the problem I face.

OLD LINK

My simple products do not have individual images. One product could have over 400 variations so it will take far too long to do it that way.


texts: Demo content not displaying on the website

texts:
I use free template > http://www.templatemonster.com/magento-themes/57559.html#gref

The problem is, I installed after a long trouble and now I see only skeleton structure of the website(theme) and no images or nothing. Please take a look at  http://edatic.in/sergio

Please let me know what & how should I move further to display demo content.

Raj.


texts:
I used memcached for sessions, but when I click on the website, got error for session_start

error is :

PHP Fatal error:  session_start(): Failed to initialize storage module: memcache (path: /var/lib/php/session) in /var/www/html/mydomain.com/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 125

This is my local.xml

<session_save><![CDATA[memcache]]></session_save>
<session_save_path><![CDATA[tcp://localhost:11211?persistent=1&weight=2&timeout=10&retry_interval=10]]></session_save_path>

also this is my memcache result

[root@www ~]# ps ax | grep memcache
19842 ?        Ssl    0:00 memcached -d -p 11211 -u memcached -m 64 -c 5024 -P /var/run/memcached/memcached.pid -l 127.0.0.1
20734 pts/0    S+     0:00 grep memcache

and ports

[root@www ~]# netstat -tulpn | grep :11211
tcp        0      0 127.0.0.1:11211             0.0.0.0:*                   LISTEN      19842/memcached
udp        0      0 127.0.0.1:11211             0.0.0.0:*                               19842/memcached

what is wrong here for memcache config ?


texts: Display Product Sku in Child Products - Magento 2.2.3

texts:
On our Magento site, we have it so it displays the SKU under the main product title, but if there are child listings, possibly for different configurations of the product' the sku isn't appearing.
I cant seem to find any layout file associated with that child list, can anyone point me in the right direction to add the SKU to this Child Product List,
An example of what I mean can be found here: https://i.imgur.com/uo11tYi.png


texts: How to show the registration and login form in a popup in Magento 1.9

texts:
Hello I am trying to place the registration and login in different popup, but I don't know why when the registry modal opens it does not bring all the information that corresponds to the phtml register, i use boostrap for the modal.

As shown in the image, blue is what I lack in the modal
I am bringing the information through this line of code :
<?php  echo $this->getLayout()->createBlock('cms/block')->setBlockId('persistent/customer/form/login.phtml')->toHtml(); ?>
this line is the one that is not shown in the modal :
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
                            <?php if ($_taxvat->isEnabled()) : ?>

                                            <?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?>

Por favor, introduce tu rut correcto

                            <?php endif ?>

I also did the test outside the modal but it does not bring me all the information I need from the register.
please help


texts: Issue when programmatically creating custom product options

texts:
I'm working on a product upload custom module. For that I want to create custom options programatically. I put following code in model. But it always add the custom option to the last product only. I want to add this custom option to all the products which are passing to this function.

(NOTE: The below function will invoke inside the csv file reading loop.)

public function saveSimpleProduct($sProduct) {

// Set product custom options.
                $customOptions = array(
                        'title' => 'Mixed Pack',
                        'type' => Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD,
                        'is_require' => 0,
                        'sort_order' => 0
                );
       //       Mage::getSingleton('catalog/product_option')->unsetOptions();
                $sProduct->setProductOptions($customOptions)->setCanSaveCustomOptions(true)->save();
}

Any suggestions will be appreciated.
Thanks in advance.


texts: Magento 1.9.4.0 PHP 7.2 Cron job problems

texts:
My settings:
Server OS Debian 9.6
Plesk 17.8.11
Magento 1.9.4.0
PHP 7.2

When I run schedule task cron.sh I get this:

  Task "/httpdocs/cron.sh" successfully completed in 0 seconds, output:
  /httpdocs/cron.sh: 1: /httpdocs/cron.sh: which: not found
  /httpdocs/cron.sh: 1: /httpdocs/cron.sh: sed: not found
  /httpdocs/cron.sh: 1: /httpdocs/cron.sh: expr: not found
  /httpdocs/cron.sh: 50: /httpdocs/cron.sh: ps: not found
  /httpdocs/cron.sh: 51: /httpdocs/cron.sh: cron.php: not found

Cron doesn't work. Where is the problem? Could you help, please

I think that the problem is with Plesk...

I setup crontab using SSH

crontab -e
*/5 * * * * sh /path/to/y


texts: Magento price rule on product base price without option?

texts:
I saw a lot of questions about price rules, catalog price rules...etc but I can't find an answer to my question.

My product (imagine that it's a t-shirt) can have options (logo for example) so it looks like: t-shirt 10€, logo +5€ = 15€.

Now I want that my t-shirt becomes FREE (with a coupon code) but not the logo, so the total is 5€.

I know that with catalog price rule it's possible but i can't create a coupon code if I do so

How can I do this price rule? and have a coupon code to apply it?


texts: how to add custom block at shipping methods below in onepage checkout?

texts:
I want to add custom block below shipping methods and this custom block should be inside of shipping method form.
I think following line of code is helpful for adding this.but no idea how to proceed.

<div id="onepage-checkout-shipping-method-additional-load">
                    <!-- ko foreach: getRegion('shippingAdditional') -->
                    <!-- ko template: getTemplate() --><!-- /ko -->
                    <!-- /ko -->
                </div>


texts: How to create a custom table in Magento 2.3 using XML (Declarative Schema) and integrate in custom admin grid?

texts:
I need to create an admin grid and for that i need to create a custom table using Declarative Schema in Magento 2.3. How to create a custom table using declarative schema and integrate the table with my custom admin grid in Magento 2.3?

Any help would be appreciated. Thanks in advance..!


texts: Magento2: How to unlock folder to folder or root directory and how to solve this?

texts: floder to folder lock how to slove all folder is lock in magento 2 how to unlock all floder


texts: Filtering joined table column in Magento 2

texts:
I am creating a grid UI component and its collection and I need to join another table like:

$tableMKproduct = $this->_resource->getTableName('multivendor_product');
        $collection = $this->collection
                                ->addAttributeToSelect('*')
                                ->addFieldToFilter('entity_id',['in' => $productIds])
                                ->addOrder('created_at', 'desc');
        $collection->getSelect()->joinLeft(array('mk_product'=>$tableMKproduct),'e.entity_id = mk_product.product_id',array('mkproductstatus'=>"mk_product.status"));

However, I cannot filter or sort the joined table field.


texts:
We are running a promo for a specific brand where if you buy 3 of a specific style chair you get 1 free. This is what I have set up: https://i.stack.imgur.com/NkqrU.png

There are lots of colour variations of the chair so I have input all the skus, as it didn't work when I used the SKU of the default product that they are all associated with. I also changed the 'x' to 3 as I wasn't sure if it meant 3 or 4, but that doesn't work either. Any ideas?


texts: Magento2.2.3 - Admin store configuration is save but not display in admin panel

texts:
I want to change store configuration in Magento2.2.3.

But when I try to save the configuration from admin it saved in the database (core_config_data table).

But not getting changed in admin store configuration, still shows old values not updated.

Does have any idea about this?


texts: Magento Currency Drop Down and Currency Symbols

texts:
I am new to magento..as per my design I need to change the currency drop down to a Euro and Dollar Symbols or Images which I had created. So I would like to know how I could go for this? I managed to change the language to Country flags but stuck with this currency issue. Please share a light on this.

I also wanted to know how to replace "Add to wishlist" and "Add to Compare" and replace it with the images or icons created by me. Please guide me in this regard and also how to bring "email a friend" as an image or icon in the row of "Add to wishlist" ?

Thanks

Kris


texts: Column Message_Parameters in Table Core_Email_Queue

texts:
May I know what is the data format in that column? It doesn't look like JSON.

For example:

a:7:{s:7:"subject";s:34:"Online Shop: New Order # 100000018";s:17:"return_path_email";N;s:8:"is_plain";b:0;s:10:"from_email";s:22:"foobar@example.com";s:9:"from_name";s:5:"Sales";s:8:"reply_to";N;s:9:"return_to";N;}


texts: Magento 2.2.4 No 'Subproducts Discount' dropdown on catalog price rule

texts:
I created a new catalog price rule for bundle products. I selected bundle product sku in the Conditions tab.

I am trying to add discount to the products assigned to bundle products. For that i want to change Subproducts Discount to Yes, but that drop-down is not there.

Is there any setting in admin to enable that box on rule page?


texts: No items in shopping cart, but actually there is

texts:
After I added an item in the shopping cart, and I logged-out.

When I log-in again, there's no item in the shopping cart.

However, once I add another item in the cart, the previous one is shown again.(Finally there will be 2 items in the cart)

Expected behavior should be showing 1 item in the cart after re-login.


texts:
I have a contact form.
The smtp module is installed on the project.
For smtp service we use smtp.gmail.com.

smtp module will collect all sendings and redirect them to the mail service, but my task is to add it to STORES> Configuration> GENERAL> Contacts> Email Options
second mail. But there was validation

If you remove the validation and paste the mail as on the screen

then when submitting the form there will be such an error 5.1.2 The recipient address <support@mage.com info@mage.com 5.1.2> is not a valid RFC-5321 address. m21sm455969lfh. 39 - gsmtp


texts: Magento 2 How to get selected Shipping address Pincode in onepage.phtml

texts:
Here am trying to get the selected shipping address's pincode. But by object manager am getting first shipping addess but not the selected one.

this is my phtml file
/var/www/html/app/design/frontend/MyVendor/theme-web/Magento_Checkout/templates/onepage.phtml
<?php
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PRAVone.log');
$logger = new \Zend\Log\Logger(); $logger->addWriter($writer);
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$cart = $objectManager->get('\Magento\Checkout\Model\Cart');
$shi=$cart->getQuote()->getShippingAddress()->getPostcode();;
$logger->info($shi);
?>

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


texts: Magento2 : How to add city field to dropdown on checkout page?

texts:
I want add city drop-down in checkout page without any extension. I have tried some reference link for adding city dropdown but it is adding ony on cart page on estimate section.
I want to add in checkout page. kindly help me if anyone have an idea for that.


texts: Saving page in backend results in 404 on frontend

texts:
I'm working on a Magento 1.9.x project initially build by another developer. Now, when I save a customer group in the backend, I get redirected to the frontend resulting in a 404 page. It happens with some other forms in the backend.

At this point I don't have the time nor a clue how to fix this :/

Anyone an idea how this might be caused?


texts:
Need some help figuring out a major shipping problem. We have a site running on Magento 1.9x and we sell automotive parts. Due to the nature of the business we need some major functionality in order to be competitive and cannot figure out how to make the required shipping feature work. One required feature for us was dimensional shipping since some parts can be quite big but light weight (body plastic trim parts, spoilers etc) and we need a solution that would have accurate live rate shipping and found a good solution using AuctionInc shipping module. Our next biggest issue is free shipping: We basically break down the products into 2-3 categories: parts that can be shipped from our vendors warehouse for free in the US (lower 48) if the total cart is at least $150 and max weight is 15lb. Then there are parts that always ship from our warehouse so customers should only see live rate for those. Then there are specific products such as hazardous material (liquids, oils, chemicals) that can only be shipped in the US via Ground, no International shipping allowed.
We thought we could achieve this with shopping cart rules but found out it is not possible. For example I created a rule that if cart total is min $150 and products are from "vendor1" shipping would be free in the lower 48 states. After testing I saw that if I put a product from this vendor1 in the cart sure thing free shipping shows up, as well as additional shipping options (FedEx or faster shipping methods) which is great. But as soon as I add another product not from vendor1 which requires customers to pay for shipping, it does not work. The cart just keep showing free shipping for everything. I have looked at every possible modules and extensions on the market for Magento but cannot find a solution on how to solve these issues. Is there any way to make this work with Magento or are we pretty much dead in the water? We're desperate at this point to find a solution, any help would be appreciated.

Thanks in advance.


texts: Magento 2: Make changes to default.xml programmatically

texts:
I was wondering if it's possible to make changes to default.xml programmatically?

Use case is as follows:

I want a different theme being loaded when a certain mode is activated for example by clicking on a checkbox.
Or should I use a different approach?


texts: How we get product rating via product id in magento2?

texts:
I am tired to get rating by product id in magento2 ?
here is my code for get reviews rating .

 protected $reviewModel;
public function __construct(

\Magento\Review\Model\Review $reviewModel,

    array $data = []
)
{

    $this->reviewModel = $reviewModel;

}

  public function getCategoryProducts($categoryId)
{
    $products = $this->getCategory($categoryId)->getProductCollection();
        $products->setVisibility($this->_productVisibility->getVisibleInSiteIds());
    $this->reviewModel->appendSummary($products);
    $products->addAttributeToSelect('*');
    return $products;
}


texts: Adding 'Declared Value' for UPS Shipping… possible? [Magento CE 1.8.1.0]

texts:
I am tasked with the needing to be able to add a declared value for certain products on my magento store for UPS shipping. Doing some research, it doesn't appear they have it set up for the grab that magento executes to get their shipping estimates from UPS.com because I just can't find where the linking could be. Looking into FedEx's files, they DO have a process that gets ran;

$declaredValue = $xml->addChild('DeclaredValue');
$declaredValue->addChild('Value', $r->getValue());
$declaredValue->addChild('CurrencyCode', $this->getCurrencyCode());

I absolutely don't think just plug and play would work here, whereas UPS may not even recognize that search for the declared value. So I suppose my question would be, has anyone ever dealt with this kind of issue, and if it is possible to add such a grab to the UPS search, what would the created attribute on the product inside magento be found at? Simply 'DeclaredValue'?


texts:
I am trying to get product list using category ID but it's not working,

My Request:

http://mysite/m2/rest/default/V1/products?searchCriteria[filterGroups][][filters][][field]=category_id&searchCriteria[filterGroups][][filters][][value]=3&searchCriteria[filterGroups][][filters][][conditionType]=eq&searchCriteria[sortOrders][][field]=created_at&searchCriteria[sortOrders][][direction]=DESC&searchCriteria[pageSize]=10&searchCriteria[currentPage]=1

My Reponse:

{
  "message": "Invalid attribute name: %1",
  "parameters": [
    null
  ]
}

Please tell me what's wrong with the parameters, I tried this too but no luck, Magento 2 Rest API: getting error "Invalid attribute name: %1"


texts: Get Product price by customer Group magento 2

texts:
I am trying to get Product price by customer group. Used below code.

$sku = 123;
$customerGroup = $this->getCustomerGroupId();
$currentProduct = $this->loadProduct($sku);
$productPrice = $currentProduct->getPrice();

 public function loadProduct($sku)
 {
    return $this->productRepository->get($sku);
 }

public function getCustomerGroupId(){
    if ($this->customerSession->isLoggedIn()) {
        $customerGroup = $this->customerSession->getCustomer()->getGroupId();
        return $customerGroup;
    }
    return;
}

Above code returning the product final price.

Can we get product price by customer Group code?

 $customerGroup

is returing the current customer group that is id = 5 in my case. How to get the product price from customer group?

Can anyone look into this and update me your ideas. Thanks


texts: Magento2: Get product date in Knockout Js

texts:
How to get special delivery end date in ko js

I have implemented KO templated with Js How can I get Value of Product Special delivery date in JS for countdown

<referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Template" name="new.ko.component" template="SilkSoftware_ProductCountdown::newko-component.phtml" before="product.info.details" />
    </referenceContainer>

newko-component.phtml

js

define(['jquery', 'uiComponent', 'ko'], function ($, Component, ko) {
    'use strict';

    var self;
    return Component.extend({
        myTimer: ko.observable(0),
        initialize: function () {
            self = this;
            this._super();
            //call the incrementTime function to run on intialize
            this.incrementTime();
        },
        //increment myTimer every second
        incrementTime: function() {

             var futureDate = new Date("11/23/2018").getTime();

             self.myTimer(Date.parse(new Date());
                  }     }); });

and .html


texts: Magento-2:Class Magento\Framework\App\Http\Interceptor does not exist

texts:
Exception.log file Error:

  {"exception":"[object] (ReflectionException(code: -1): Class
  Magento\Framework\App\Http\Interceptor does not exist


texts: I can't find the option to give X% off shipping costs in Magento 2

texts: any way to  give x% off shipping costs in Magento 2. its work fine in magento , but i cant find way to set this type of promo rule in Magento 2.


texts:
I am working on a client project and set up a development copy of the live site, front is working fine but admin is broken because of the fishpig wordpress integration actually i dont to set wordpress so didnt copy the db for this and want to disable the extension i disable the
by setting false in module config file under /app/etc/modules file and refresh the cache but the admin is not working log folder has wordpress.log file which is saying

2013-05-01T19:14:40+00:00 DEBUG (7): SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

also the cache is enabled looking for disable it from mysql and compilation is enabled too and admin is not opening :'(

Any body having any idea.


texts: Magento 2.2: Unable to unserialize value?

texts:
Running into issues on a site running Magento 2.2.0-rc3.0/PHP 7.0.23

The following issue occurs with all 3rd party extensions either enabled or disabled.

When adding an item to comparison from category or product page or submitting a review from product page we get the following error in the browser:

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to unserialize value.

Exception #0 (InvalidArgumentException): Unable to unserialize value.
#0 /home/___/public_html/app/code/Magento/Theme/Controller/Result/MessagePlugin.php(157): Magento\Framework\Serialize\Serializer\Json->unserialize('[{\\"type\\":\\"su...')
#1 /home/___/public_html/app/code/Magento/Theme/Controller/Result/MessagePlugin.php(135): Magento\Theme\Controller\Result\MessagePlugin->getCookiesMessages()
#2 /home/___/public_html/app/code/Magento/Theme/Controller/Result/MessagePlugin.php(84): Magento\Theme\Controller\Result\MessagePlugin->getMessages()
#3 /home/___/public_html/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\Theme\Controller\Result\MessagePlugin->afterRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\App\Response\Http\Interceptor))
#4 /home/___/public_html/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#5 /home/___/public_html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(26): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#6 /home/___/public_html/lib/internal/Magento/Framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#7 /home/___/public_html/lib/internal/Magento/Framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#8 /home/___/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#9 {main}

The error does not go away unless you clear cookies, in particular, the mage-messages cookie.

Any assistance in troubleshooting these errors is appreciated.


texts: Magento2 - using getFinalPrice() or getData('final_price')

texts:
I want to know which one is the best way to do? since the $product->getFinalPrice() return the same result as the $product->getData('final_price')

Thank you


texts: Identify default variables from less files

texts: I have a custom template with some variables set on _theme.less, it´s working fine. I need to remove "margin-bottom" from class named "sections nav-sections" but I cannot find this variable on ../lib/variables/*.less files. Tested a lot of variables with "margin" on their names without luck so far. I´m flushing the cache before testing. Any idea on how to identify the correct variable?


texts: How to open up Magento 2 mobile menu from top

texts: How to make it Magento 2 mobile menu to open up from the top to bottom instead of opening it up from left to right. ( just like how WordPress mobile version does )


texts: Magento2 Get Customer Group ID in topmenu.phtml

texts:
I am needing to show a totally different navigation bar links if a customer is logged in as a wholesaler customer group.
I am using Magento2.3 and a child theme of Luma. What I did was edit the topmenu.phtml as seen below to get the customer group id and then if the customer group id is a specific # to show a static block My issue is no matter what I clear cache etc it still just shows the customer id as 0 regardless if I am logged in or not. Yet the same code works in the footer.phtml and other files just not in the topmenu.phtml file?
<?php
   $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
   $customerSession = $objectManager->create('Magento\Customer\Model\Session');

   if ($customerSession->isLoggedIn())
   {
       $customerGroupId = $customerSession->getCustomer()->getGroupId();
   }
   else
   {
        $customerGroupId = 0;
   }

   $columnsLimit = $block->getColumnsLimit() ?: 0;
   $_menuHtml = $block->getHtml('level-top', 'submenu', $columnsLimit)

?>

 <nav class="navigation" data-action="navigation">
     <?php
        //if user is a wholesaler
        if($customerGroupId == 2)
        {

          echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('wholesale-top-nav-bar')->toHtml();

        }
        else
        {
      ?>
        <ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
          <?= /* @noEscape */ $_menuHtml?>
          <?= $block->getChildHtml() ?>
        </ul>
    <?php
         }
    ?>
</nav>


texts:
I needed to get the cart total in my observer.

Here is the code I have:

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

use Psr\Log\LoggerInterface;

class DisablePayment implements ObserverInterface
{
  protected $_logger;

  public function __construct(
    \Magento\Customer\Model\Session $customerSession,
    LoggerInterface $logger
  ) {
    $this->_customerSession = $customerSession;
    $this->_logger = $logger;
  }

  /**
   * @param Observer $observer
   *
   * @return void
   */

   public function getCustomAttribute(){
      if($this->_customerSession->isLoggedIn()):
        return $customerAtt = $this->_customerSession->getCustomer()->getData('credit');
      endif;
   }

  public function execute( Observer $observer )
  {
    $result = $observer->getEvent()->getResult();
    $method_instance = $observer->getEvent()->getMethodInstance()->getCode();
    $quote = $observer->getEvent()->getQuote();

    if($method_instance == 'payroll')
    {
      $customerAttribute = 300;
      $total = 400;

      if($customerAttribute < $total)
      {
        $result->setData('is_available', false);
      }
    }
  }

How can I do that?

Thanks!


texts: How to write grapgQl mutation to create and integrate the contact us page functionality in magento 2.3.2?

texts:
As same as the question, i want to create the mutation for contact us page and send the email via magento default contact us module without writing the custom email function in my resolver.

How can i write this?


texts: Is there any way for you to conditionally display a static block?  For example, I want a block on the homepage that will only display if there is content in the block.  If it is empty, the block should not render.


texts: How to add CSS file to all pages - magento 2

texts:
Currently, I am using a custom theme and my parent theme is LUMA.

I need to add custom.css file which should be available in all pages.

How can I do it?


texts:
System: Magento 2.1.4 on 1and1 Cloud, CentOS

Searching throughout the web, I haven't found any specific help with this

I am wanting to change URLs in Magento2. There are URLs are like this:
( https://domain/page.html?background_color_name=510 ). I'd like it to read ( https://domain/page/pink-purple/ ). Selecting this URL displays products with this attribute.

What is the best practice of implementing this in Magento 2.1.4? If there is more than one way, GREAT!

Any assistance is appreciated.

FYI:
There are over 10,000 products


texts:
I'm trying to install magento 2 from tar archive (without using cli).
Can’t install on new ubuntu 16.04 server.
it shows these errors

The magento check configurations file shows that everything is Ok


texts: Magento 2 - Sales Order Shipment Event/Observer

texts:
I search on the Internet for sales order shipment event. In many Stack Exchange question I found this event sales_order_shipment_save_after.

In most of Question they are saying it is not working and didn't even mark correct answer of that particular question.

When I search for the Magento 2 event list. I am unable to find sales_order_shipment_save_after this event.So I need to know all Sales Order Shipment related events badly.

Reference: https://www.simicart.com/blog/magento-2-events-list/


texts: If $resultPage->addHandle() is used in a controller for a vendor module, can't get my module to modify that layout xml

texts:
I need to modify the layout xml for another module from my Magento 2 module. In this module they use in the controller execute() method a way to add their layout xml:
$resultPage->addHandle('custom_module_layout');

I need to use the custom_module_layout.xml in my module to modify a template and block class, but it seems Magento 2 doesn't look in my module for this layout file even when I have it in the proper location and my module.xml file has  set to load their module first.
Is this a Magento 2 bug or just way it does things? So I would have to add a plugin to execute() to add my own layout xml file, or is there a better way?


texts: How to change a custom customer attribute in code?

texts: I have a customer attribute account_manager_email that I need to change for several customers. How do I go about changing that in PHP code?


texts: Magento 2 pages and blocks not loading in backend

texts:
After restoring a backup of Magento 2, the pages and blocks won't load in the backend. It keeps loading and loading without not showing any pages or blocks. I reindex, compile, clear cache... But nothing changed. Any help would be much appreciated. Screenshot here http://prntscr.com/cavr3k

Thank you!


texts: Magento2.3 : Email template address variable not displays the value

texts:
The email template doesn't get a shipping method variable.

As you can see $billing.getName not works.
Shipping and Billing information is empty.
Maybe something wrong with forms or submitting process?


texts:
Dear Magento 2 developers,

I am currently new in the Magento 2 development, now I struggle about how to make custom Product filter on the sidebar, like the picture below.

My new brand column in Product:

Anyone know how to make custom filter on Magento sidebare?


texts: I need to add menus like here http://www.pickormiss.com as given here like Vegetables, Meatshops, Restaurant, Gift shops etc.  How can I add such pages so, that it can be customized from the dashboard?


texts: Add customer IP address to PayFlow Pro API request

texts:
We're trying to add the IPAddressVelocity filter to our PayFlow Pro account, for fraud detection. In order for this filter to work we need to add CUSTIP to our payment API requests. CUSTIP is to pass along the user's IP address.

We can retrieve the customer's IP, no problem, but how can I add CUSTIP, as a part of my request object?

My suspicion is that this will require overloading Mage core files, but I want to be sure that I'm not missing something. And if that overloading is required, how should I add the new value to the request object?


texts: Is possible create reorder after created invoice of the order

texts:
How can I edit my order after the invoice is created? The product price needs to change after the invoice is created. Is it possible?

How can I reorder after the invoice is created?


texts: Magento 2 : How to display product attributes value to custom field at Sales Rule?

texts:
I am trying to display Product Custom Attribute values to Sales Rule.

I've created multiselect field using ui_component.

  vendor/module/view/adminhtml/sales_rule_form.xml

<field name="brand_ids" formElement="multiselect">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">sales_rule</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="validate-brands" xsi:type="boolean">true</rule>
            </validation>
            <dataType>number</dataType>
            <label translate="true">Brand List</label>
            <dataScope>brand_ids</dataScope>
        </settings>
    </field>

Field is displayed same as i need.

But now My question is i would like to display values of product attribute named brand

Brand is with Dropdown type product attribute and it contains values like Nike, Puma etc etc.

How can i achieve that ??

Any suggestions Please welcome.

Thanks in advance.


texts: Debug in Remote Server Configuration with PHP Storm unsuccessful on Breakpoints

texts:
Scenario: We have code on our local machine and are remotely handling the code and database on a Remote Server (Virtual Machine).

Now we want to Debug our Code.

This is how we have configured Remote Debugging:

php.ini Code

[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=192.168.0.185 //My Local IP
#export PHP_IDE_CONFIG="192.168.0.120" // Remote IP
xdebug.remote_port=9000
xdebug.remote_log="/tmp/xdebug.log"
xdebug.remote_cookie_expire_time=10000
xdebug.remote_timeout=5000
xdebug.profiler_enable = 1
xdebug.remote_enable=on
xdebug.idekey=phpstorm-xdebug
#xdebug.remote_connect_back =On

Most of these settings are working properly until the end of the process. We have created the configuration based on this Link

Main Question is when we are debugging my instance, it is not properly working and not stopping on Breakpoints.


texts:
I'm using BlogMate extension for my magento site.

This is my blog url http://mypage.com/blog

But if I click on a post, it will access to http://mypage.com/post_slug

Is there anyway to change the post url from http://mypage.com/post_slug to http://mypage.com/blog/post_slug

http://mypage.com/blog/post_slug is a 404 page currently.

Thank for your help.


texts: Error 404 on new module installation in magento 1.9 and fixing it by logout

texts:
I am working in magento 1.9 . I developed new module , when i install it in new instance , it gave Error 404 .

If i Logout, it fix the issue but i want to fix the issue via code . So i try to write a logout code in setup script , but no luck with it . My code looks like

 public function expireAdminSession() {
    // loguot code
     $adminSession = Mage::getSingleton('admin/session');
     $adminSession->unsetAll();
     $adminSession->getCookie()->delete($adminSession->getSessionName());
}

I have called that function in construct. .

Any body please help or tell me any other solution to logout via code .
Thank you in advance .


texts: Magento 2.2.2 Unable to clear session lock record in /var/www/magento/vendor/magento/framework/Session/SaveHandler/Native.php on line 22

texts:
Environment:

Magento 2.2.2
Memcached:1.4.35

Overnight I find myself unable to access the admin area of my Magento installation. No changes were made to the environment. No changes to env.php.

Output when accessing admin area:

Exception #0 (Exception): Warning: SessionHandler::read():
Unable to clear session lock record in
      /var/www/magento/vendor/magento/framework/Session/SaveHandler/Native.php on line 22

Nothing in logs (nginx or magento)


texts: Terms and Conditions for Register Customers

texts:
I noticed that Magento 2 does not display Terms&Conditions checkbox in the checkout for a registered user that has already placed an order.

Is this behavior correct?

Can I change this by config?


texts:
I am looking at creating a shopping cart rule so that if an item is added to the basket, free shipping is applied. I have tried a few options but it does not seem to work. I have managed to get the code to work and it applies the free shipping and its displayed on the checkout.

However when I remove my coupon code the shipping amount changes. I have checked the shipping matrix, but it does not seem to be this that is causing the issue. Any rough ideas, of what could be causing it?


texts: Moving search to navigation section Magento 2

texts:
Currently, I have this code in my default.xml

<referenceContainer name="page.top">
    <block class="Magento\Framework\View\Element\Template" name="top.search" as="topSearch" template="Magento_Search::form.mini.phtml"/>
</referenceContainer>

I'd like to move the search bar within the <nav> inside topmenu.html but I'm unsure of how to do that.

I tried <?php echo $this->getChildHtml('topSearch') ?> but that doesn't work.

Please help.


texts: Where does magento get the value of the "updated" column to display in adminhtml->system->index mgm?

texts: The dates shown on the index management adminhtml page are not the same as what can be found in the table: indexer_state.updated.  I cannot seem to track down the dates this grid is pulling.  I am specifically looking for the cataloginventory_stock updated value.


texts: How to Change Sort by option in Filter Magento 2

texts:
I want to custom sort by option in category Filter. Currently Magento 2 provide Position , Product Name , Price And Sorting option to low to high. But i need to change all sorting option Like Price High to Low , Price Low to High & New Arrivals.

Please suggest me how to change sorting option in my site.


texts: Execute code after order has been confirmed in Magento 2

texts:
Hi fellow programmers,

I would like to know how I can hook in to execute code after a certain action in Magento 2 has been done. As we're running a custom warehouse system, I'd like to reserve a customer's products after an order has been confirmed, but I have no clue as to how to do that.

I've looked in to overriding certain functions using plugins, but that seems a bit redundant as I don't want to copy the entire function body just to execute my own code afterwards.

I've read something about the special "after", "before" plugin functions you can specify, but I don't know how to implement those.

Is there another way or can I use the "before" and "after" plugin functions? If so, can someone point me towards a good resource that explains just that?

Thanks in advance!


texts: I am running Magento 2.2.0 and this error has started showing up for different products.  It doesn't stop the user from checking out, it just shows this message.  I found another post for Magento 1.9 that it is caused by a general exception (how to remove error "* Item qty declaration error.") but I cannot find any information on how to fix it.  Any ideas?


texts: Magento2: Get Response in UI File Uploader Component

texts:
I am uploading the Image from frontend using the below code:

<div class="upload-wrapper" data-bind="scope: 'uploader'">
<!-- ko template: getTemplate() --><!-- /ko -->
</div>

<script type="text/x-magento-init">
{
".upload-wrapper": {
   "Magento_Ui/js/core/app": {
       "components": {
           "uploader": {
               "component": "Magento_Ui/js/form/element/file-uploader",
               "template": "ui/form/element/uploader/uploader",
               "allowedExtensions": ["png", "jpg", "jpeg", "gif"],
               "uploaderConfig": {
                    "url": "<?php echo $block->getUrl('customer/account/family'); ?>"
               }
            }
        }
   }
 }
}
</script>

Image uploading is working from controller. From Controller I am passign the new uploaded image full path so that I can show the image on particular location.

My question is: how can I access the response from server side ?

I have also checked the file-uploader.js, there we have the event done: this.onFileUploaded.bind(this), But not sure how to call this here:

done: function (e, data) {
    alert('uploaded');
}

Please help.


texts:
I am very new to Magento, so please bear with me if I'm not doing this correctly.

What I need to do is display a filter for sizing on a category page on the mobile versions of my company's application. I am able to display this on the desktop site by doing two things:

Catalog > properties > Use in layered navi > filterable (with
results)
Catalog > manage categories > display settings > is anchor > yes

I'm not sure if by enabling these two settings in the admin panel would automatically display a filter on the mobile version as well because I joined this company well after a ton of customization had been done.

I have inspected the page to make sure that no "filter"(s) of any sort were commented out and found nothing.

Any help is appreciated. Thank you.


texts: Caching problem for html and js file in Magento 2

texts:
I am working on Magento 2 knockout js. But when I am changing HTML or js file it's not effecting on frontend I run all this command

setup:upgrade, static:content:deploy, di:compile, cace:flush

But sometimes these files changed and sometimes not changed.

Anyone guide me how can we resolve this type of issue in Magento 2?


texts:
How do I make it so that the configurable product displays all sizes available with a quantity box next to them, so that the customer can order multiple sizes at once. Some products may even have different prices.

Similar to how this website does it: http://www.discountfootballkits.com/nike-park-vi-short-sleeve-football-shirt-black-white


texts: One theme for all multiple store of one website and no subdomain

texts:
I am developing store having different multiple stores , i'm not using any subdomain for multiple website.

I have created main website and linked three stores , i want to use same theme but after switching to another store or language theme layout changed.


texts: Error when i display a manufacture image with condition if

texts:
I am in this file : \app\design\frontend\default\default\template\catalog\product\list.html
I try to display a manufacture image before image product according an manufacture attribute text.
For example if the attribute is empty that must display me this image empty.png added in images in my template.
i add this code before :

      <?php
      if (strcmp($_product->getAttributeText('manufacture'),""))==0){?>

<img class="pr-img" src="<?php echo $this->getSkinUrl('images/arrow-about.png');?>" width="75" height="75"/>

      <?php ;} ?>

without the condition if it works very well but now i have this error :

Parse error: syntax error, unexpected '==' (T_IS_EQUAL)
I have this error


texts: Core Resource Checking Permission make Server/Site Down afterwards

texts:
I am running website on Magento 1.9.2.4 When I access my site and check query in mysql SHOW PROCESSLIST I get state of "core_resource" table like Checking Permission. Also it shows State like Opening Tables

Notice, after this whole site get slow and within few minutes server goes down.

I tried every time and it happens all time.

I made some R&D about it but did not get any suitable solution.

Is this a default message for Magento Platform websites?
Why server/site is getting down after this log?
Why Core resource table is all time showing state as opening table and checking permission?

My Server configuration: 64GB RAM/1.44 TB Hard Disk with Cent OS 6.8 OS

Any suggestion is appreciated.


texts: I have added an extra step in the checkout. How can I display products on there?

texts:
Magento 1.9.1
Porto theme

I have added an extra step in the check-out by installing this:

https://github.com/tmhub/suggestpage

This page comes up after the product details page.

I have spent many (many) hours in an effort to display products on there. The idea is to offer up-sell products there (I'm using the word "up-sell" as business jargon here rather than Magento terminology).

Here are my previous posts regarding this very issue. None of the solutions suggested in them worked:

How to modify an existing custom page with product-specific cross-sell products so that it shows generic cross-sell products instead?

How to add a custom page with cross-sell products

It is so hard for me to believe that it is so very difficult to make products appear on a page within Magento....All I need to do is display a group of products on the extra step of the check-out - I don't really care if these be products from a category, products that have the Featured attribute selected or any other way that will accomplish this.

Here is my IndexController.php file (which dictates what shows up on the extra check-out step page):

class TM_SuggestPage_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()

{

 $this->loadLayout()
    ->_initLayoutMessages('checkout/session')
    ->_initLayoutMessages('catalog/session');

$block2 = $this->getLayout()->createBlock('checkout/cart_coupon')->setTemplate('checkout/cart/coupon.phtml');
$this->getLayout()->getBlock('content')->append($block2);

$_product = Mage::getModel('catalog/product')->load(100);
$block = $this->getLayout()->createBlock('checkout/cart_crosssell')->setProduct($_product)->setTemplate('checkout/cart/crosssell.phtml'); $this->getLayout()->getBlock('content')->append($block);

$this->renderLayout();
    }
}


texts: Add CSS class to body if the customer is logged in magento 2

texts:
i want to add css in top menu if the customer is logged in. I tried this code in requirejs-config.js :

var htmlBody = $("body[data-container='body']");
if ($(".customer-welcome").length) {
    htmlBody.addClass("customer-logged-in");
} else {
    htmlBody.addClass("customer-logged-out");
};

But no result so please can you help me to find a better solution and thanks in advance.


texts: Magento 2 - Get configuratble product using API

texts:
I can get product detail with this API endpoint:

  https://example.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=entity_id&searchCriteria[filterGroups][0][filters][0][condition_type]=eq&searchCriteria[filterGroups][0][filters][0][value]=16901

But when I am getting configurable product using this API then I am getting product details without configurations/variations

Is there another way to get configurable product with it's variations?


texts: Admin changes not reflecting after migrating magento 1.9 to magento 2.2

texts:
I have migrated my magento 1 site to magento 2.2.X by using  the
migration tool

after done product and configuration all are migrated but when i change anything in admin like product qty or system configuration any thing change not reflecting but success message is showing any idea how to resolve pls help me

I have done cache clear ,indexing, di, and content deploy


texts: Stock status is not changing on backend/frontend after I change it directly in the database

texts:
I made a script that updates the stock status in database. I change them in the table named "cataloginventory_stock_status", but the changes doesn't appear on backend when I search for products by id. So I thought that it needs reindex. So I did that, but the problem is that after reindex the value of stock_status is changed back to what it was before.

I saw that is another table called "cataloginventory_stock_status_idx" so I tried to change the stock_staus here too (it seems like this tables are the same). But with no luck, the changes doesn't apply to the product on backend/frontend and after reindex my values put in the database are updated with the old ones.

I had to to this also for a custom attribute in the "catalog_product_flat_1" table. Same problem here.

Can you please help me with this? Do I have to change the stock_status of a product in another table, do I look at the wrong tables?


texts: Magento 2 - How to create custom EAV entity with backend crud operations

texts:
I want to create custom EAV entity module with back-end crud operations like in Magento default Product Attributes functionalities.

So i can create new attribute multiselect, dropdown, text and etc..
in my custom module also assign attribute set.

If you know any solution please let me know.


texts:
For patching 2.3.6 via composer the docs state

If a patch affects multiple modules, you must create multiple patch
files targeting multiple modules.

Therefore is there a correct set of patch files for MC-38033?
The reason is MC-38033 span across multiple modules


texts: How can load Model function in block when overide or extend a core magento block

texts: Please Explain me in Magento 2.0 (Only Override Case)


texts: Show message on products (view.phtml) within specified category only

texts:
I have a message "Call for Best Price" on my Magento store if a product has the attribute priceless set to yes.

Currently this is applied to all products as yes. I'd like for it to show only on products in a specified category (e.g. Shoes [ID:10]).

My current code in catalog/product/view.phtml is as follows

<?php if($_product->getAttributeText('priceless') == $this->__('Yes')): ?>

Please call for best price

<?php endif; // PriceLess Product ?>

Can anyone suggest an edit to get this working for only the specified category (ID: 10)?