texts: Change search query to lower case in catalog search results URL

texts:
I'd like to change the case of my query String so that the results page contains the lower case version thereof, for example:

For a search Delicious Pie, instead of the results page being:

catalogsearch/result/q=Delicious+Pie

I'd like it to read:

catalogsearch/result/?q=delicious+pie

As described in this question (Case Sensitive URL Rewrites), it's not possible to set up multiple instances of different case sensitive URL rewrites.

Thus, instead of taking the proposed solution and still being required to do manual rewrites for a variety of different possible cases of search, I'd like to bypass it using a single URL rewrite (all lower case).

Modifying Mage_CatalogSearch_Helper_Data::setQueryText()'s this->_queryText to lower case seems to work, but the result URL still contains the original (non-manipulated) case.


texts: How to change the design of getPriceHtml function in Magento 1.x

texts:
I have got an issue with design of price in grid.

When I get in to the design page to redesign the price showing format, it calls following function to call the design.

<?php echo $this->getPriceHtml($_product, true) ?>

But I am not able to see where the function is defined.

Thanks in advance!


texts: Magento 2 server in production become slow and not responding

texts:
The server become slow when  approximate 1000 users access the site at the same time, and later the server not responding at all (blank page).

I did the following tasks:

Production mode enable
Full cache enable
Compile the code (setup:di:compile)
Deploy static content (setup:static-content:deploy)
Merge JavaScript Files
Minify JavaScript Files
Merge CSS Files
Minify CSS Files
Apache GZIP compression
Enable use flat catalog category

Server

32 RAM
8 cores

I want to know what another thing can I do to improve the server performance and avoid the server crash?

Thank you very much.


texts: Remove top link by title not by url in xml

texts:
I've got 2 top links with the same url. I need to remove one of them on a specific handle.

Removing by url will exclude both of them.

Is there a xml solution to this? Like removing by title.

Thanks!

Example of a link:

<action method="addLink" translate="label title">
    <label>Account</label>
    <url helper="customer/getAccountUrl"/>
    <title>Account</title>
    <prepare/>
    <urlParams/>
    <position>1</position>
</action>


texts: Magento catalogProductAttributeOptionManagementV1 AddOption SOAP

texts:
I am sending a soap request to Magento and getting an error per below.

<?xml version="1.0" encoding="UTF-8"?>
-<soap:Envelope xmlns:def="XXX/soap/all?
services=catalogProductAttributeOptionManagementV1"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  -<soap:Body>
  -<def:catalogProductAttributeOptionManagementV1AddRequest>
    <attributeCode>edition</attributeCode>
    -<option>
      <sort_order>0</sort_order>
      <is_default>false</is_default>
      <label>Test10</label>
      <value/>
    </option>
  </def:catalogProductAttributeOptionManagementV1AddRequest>
  </soap:Body>
</soap:Envelope>

Response is as per below:

<?xml version="1.0" encoding="UTF-8"?>
-<env:Envelope xmlns:m="XXX%2Fsoap%2Fall%3Fservices%3DcatalogProductAttributeOptionManagementV1%26wsdl%3D1" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  -<env:Body>
  -<env:Fault>
  -<env:Code>
    <env:Value>env:Sender</env:Value>
  </env:Code>
  -<env:Reason>
    <env:Text xml:lang="en">Attribute %1 doesn't work with options</env:Text>
    </env:Reason>
  -<env:Detail>
-<m:GenericFault>
-<m:Parameters>
-<m:GenericFaultParameter>
  <m:key>1</m:key>
  <m:value>edition</m:value>
</m:GenericFaultParameter>
</m:Parameters>
</m:GenericFault>
</env:Detail>
</env:Fault>
</env:Body>
</env:Envelope>

I have tried using catalogProductAttributeAddOption method, catalogProductAttributeOptionManagementV1AddPostBody method, catalogProductAttributeOptionManagementV1Add method. Please assist if a tag is missing or if I am using the wrong method?

T.I.A


texts: currency symbol disable in home or internal page of product

texts:
I have this online store based on magento,
now, either in home page or product page, you could note that there is no any symbole of currency beside the price, just price without its currency symbol.
what should I do to show the symbol of currency beside every price in all my online store pages ?


texts: Magento 2 migration Order created at date error

texts: I have migrated my magento 1 website to magento 2.3. I have multiple stores in my magento1 with diffrent timezone. After migration when i checked orders in magento 2. There is order creation date changes and this change is specific to stores(Some store have 5.30 hours difference and some have 6.30) plus and minus both. Can anybody suggest me to solve this issue that migrated order created at date should be same like magento1.


texts: Cardcom payment method for magento 2.1 loads complete success page within iframe after page redirect

texts:
I am creating a cardcom payment method for magento 2.1. Everything is working fine but when i try to do payment in iframe mode , then the checkout/onepage/success page gets loaded within the iframe.
what i have done in iframe is :-

$formHTML .='<iframe name="my_iframe" target="_parent" id="my_iframe" src="'.$this->getCardcomUrl()."&lowprofilecode=".$fields["profile"].'" scrolling="no" width="100%" height="1124px" style="border:0px"></iframe>';

Thus it looks something like shown in image below.
Any help will be appreciated.
Thanks in advance.


texts: Authorize.net ignores default New Order Status

texts:
I have a custom default processing status called Payment Authorized. In addition to setting it to the default order status I also made it the Authorize.net default status. In Direct Post method it works as expected. I do not want to use direct post though and the other Authorize.net method keeps defaulting the order status to Proessing.

Is this the culprit?

class Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info
{
  ...
  protected function _authorize($isOnline, $amount)
   {
    // check for authorization amount to be equal to grand total
    $this->setShouldCloseParentTransaction(false);
    $isSameCurrency = $this->_isSameCurrency();
    if (!$isSameCurrency || !$this->_isCaptureFinal($amount)) {
        $this->setIsFraudDetected(true);
    }

    // update totals
    $amount = $this->_formatAmount($amount, true);
    $this->setBaseAmountAuthorized($amount);

    // do authorization
    $order  = $this->getOrder();
    $state  = Mage_Sales_Model_Order::STATE_PROCESSING;
    $status = true;
    if ($isOnline) {
        // invoke authorization on gateway
        $this->getMethodInstance()->setStore($order->getStoreId())->authorize($this, $amount);
    }

tl:dr

My default processing status in Magento is Payment Authorized. My default New Order Status for payment method Authorize.net is the same. When a new order is placed the order instead defaults to Processing


texts: How to prevent directory traversals attacks when uploading a file?

texts: I think it is the same as a normal php page, but, exists a specific way in Magento2 to prevent directory traversals attacks when uploading a file?


texts:
I need a custom field in cart in with I can display uploaded file link. I am uploading file at product view page and handling this in observer. although I have change product custom price and quantity in observer and it working fine. Now further I want to show uploaded file link with each item in cart and want this link in order also.

Code which I am using for this is

$item->addOption(array(
                      "product_id" => $item->getProduct()->getId(),
                      "product" => $item->getProduct(),
                      "code" => "FilePath",
                      "value" => $fileSavedPath
                ));
                 $item->save();

I want to keep $fileSavedPath in a FilePath field.
I am a bigginger and not sure about flow that how would I achieve this. Can any one help. Thanks


texts: During importing a previous export of products Configurable products don't have simple products any more

texts: I exported all products and then cleared all products. When I try to import the same products, I can do this, but configurable products don't have th associated simple products any more. What happens here, and what is the proper way to export/import Configurable products?


texts:
I'm new to magento, Can any one told me Where "celebrity" & "base_color" values stored in DB ?

1-

$collection = Mage::getModel('catalog/product')->getCollection()
                        ->addAttributeToSort('created_at', 'DESC')
                        ->addAttributeToSelect('*')
                        ->addAttributeToFilter('visibility', 4)
                        ->addAttributeToFilter('celebrity', array('neq' => 'no_selection'))

2-  URL Parameters  .../?filter=Black&code=base_color

$collection= Mage::getModel('catalog/product')->getCollection()
                           ->addAttributeToSelect('*')
                           ->addFieldToFilter($_GET['code'],array('eq' => Mage::getResourceModel('catalog/product')
                           ->getAttribute($_GET['code'])
                           ->getSource()
                           ->getOptionId($_GET['filter'])));
                        ->load();


texts: Missing shipping address in the rest/V1/orders API

texts: One of our venders is telling us that our rest/V1/orders API return is missing the shipping address fields. We are running Magento 2.3.4.  Is this a Magento bug? What code library should I be looking at to fix this?  We need the shipping address to display on this endpoint.


texts:
I need to How can i bulk export Products like sku, products name, request path and Target path,
is there any way I can bulk download request path and target path url.


texts: Magento 2 : is there any way to change length of order id magento 2?

texts: I just want to change order number's length in magento 2 , i have also tried with increment_pad_length in eav_entity_type table but no luck.


texts:
I'm trying to modify content in Thank you page, and the file I'm modifying is on the path: Theme/Magento_Checkout/web/template/success.phtml.
But it seems I'm missing something, because after many attempts and clearing cache several times, NO change reflects on the front end.

Please help how can I override and change the structure/content for thankyou/success page.

Thanks.


texts: Magento 2 Component less/css editing best practices

texts:
Please help to understand below 2:
1. How to override component css using less files?
2. Is anyone can provide some of examples to write css in _extend.less file.


texts: Magento 2 and ElasticSearch errors. Connection Failed. Test again?

texts:
i need some help with configuring my elastic search on magento 2.2.3 and i'm using ES 2.3.

I login and configure here: Click Stores > Settings > Configuration > Catalog > Catalog > Catalog Search.

It's on a remote aws server and i know it's configured on port 443 so i changed the port to 443 rather than 9200 and i've changed the Elasticsearch Server Hostname to the correct endpoint.

telnet from admin to ES works

as does curl

so not a network / firewall iss
Elasticsearch Index Prefix is correct
cluster name is correct

After that i followed these instructions here: https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg-upload-data.html

I was able to upload a new search document and then I was able to retrieve it as well. So once again the networking between the two is good.

Is there a php dependency that i'm missing or a third party magento plugin that needs to be installed to assist? Please help. Thanks in advance.


texts: Magent2: Magento Cache Storage and Flush Magento Cache - what do they do?

texts:
Magento Cache Storage what cache does it delete? what is his role?

Flush Magento Cache what cache does it delete? what is his role?

https://goo.gl/hUkAbw


texts: Check if page has breadcrumbs from template

texts:
I want to add a CSS class to my body tag depending on whether the current page has a breadcrumb trail. So I would rather not add a new block, since I don't need any HTML output, but just a PHP array or boolean in my PHTML file.

I tried $this->getLayout()->getBlock('breadcrumbs') without success, because the property of Mage_Page_Block_Html_Breadcrumbs which contains the trail (_crumbs) is protected.

What is the best way to achieve my goal?


texts: Extend a default JS component or Use Mixin

texts:
Which is better and recommended to use Extend a default js component  as explained at https://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/custom_js.html#extend_js or to use Mixins as explained at https://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/js_mixins.html

What are the pros and cons of them?

How to decide which one to use?


texts: Magento : Display Configurable Product From Simple Product Url

texts:
I'm trying to load configurable product from my simple product url. I dont want to redirect on configurable product page.

www.example.com/textured-halter-dress-black-l.html is the simple product url
My simple product is not visible individually, thus www.example.com/textured-halter-dress-black-l.html will return 404 error.

www.example.com/textured-halter-dress.html is my configurable product url.

Thank you.


texts: aroundGetFinalPrice() plugin needs additional code for Configurable products?

texts:
I need to set the product's price as it's added to the cart based on a separate table which holds each customer's individual prices. To do this I'm wrapping the Magento\Catalog\Model\Product::getFinalPrice() method, with the following plugin:

public function aroundGetFinalPrice(\Magento\Catalog\Model\Product $subject, \Closure $proceed)
{
    $customerPrice = $this->customerPriceFactory->create();

    $customerPriceColl = $customerPrice->getCollection();
    $customerPriceQuery = $customerPriceColl->addFieldToSelect('price1')
                                            ->addFieldToFilter('product_id',$subject->getId())
                                            ->addFieldToFilter('customer_id',$this->getCustomerId());

    $retPrice = $customerPriceQuery->getFirstItem()->getData()['price1'];

    return $retPrice;

}

This works great for simple products, but when a configurable product is added to the cart $subject only appears to be the parent product, not the actual child product the customer selected? This of course means the price can't be accurately determined, as each child may have different prices/tiers.

I have quickly checked Magento\ConfigurableProduct\Model\Product\Type\Configurable\Price::getFinalPrice() with some debug output but that doesn't seem to be called when a product is added to the cart.


texts: Getting Multiple Ips in Admin order "Placed from IP"

texts:
From few days i am getting multiple IP addresses in Admin Order Page.

It looks like

Placed from IP: xxx.xxx.xxx.xxx(yyy.yyy.yyy.yyy, zzz.zzz.zzz.zzz, xxx.xxx.xxx.xxx)

& Seems IP yyy.yyy.yyy.yyy is correct one.

Anyone please can tell why this started happening.

Got the same question here- https://stackoverflow.com/questions/28033732/multiple-placed-from-ip-addresses-in-magento

But answer is not useful.


texts:
For Magento 1.x

How do I sort product based on a date attribute by a month and year only, rather than on the whole date? The code looks a bit like this:

Mage::getSingleton('...')->getProductCollection()
->addAttributeToSort('published_date', 'DESC') // -> want to sort on Month and Year
->addAttributeToSort('price', 'DESC');

The overall requirement is to sort products based on Year, then Month, then Price... hence this question.

Thanks in advance!


texts:
Due to the security reasons, we want to deploy the changes in code with GitHub. I can see that we can only change the code via GitHub.

  Is it possible to change the admin configuration as well via GitHub?

Or we can only do this via admin panel.

Looking for your help.


texts: problem redirection on product page when using http protocol

texts:
I got a problem in magento 1.6
In production environment, I pass a product url using http, it will be converted to https://domain/catalog/product/view/id/18341/category/451 instead of https://domain/producturlrewrite that ends with .html
I have the same configuration in dev environnement and it works like a charm
thank you in advance


texts: Syntax for overriding config.xml module configuration with config.php in magento2?

texts:
I have a module MyCompany_ExampleModule. Its etc/config.xml file:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <mycompany_em>
            <general>
                <enabled>0</enabled>
                <endpoint><![CDATA[https://myendpoint.example.org/test.json]]></endpoint>
                <limit>5</limit>
            </general>
        </mycompany_em>
    </default>
</config>

I also can see, that my colleagues read the configuration from the xml:

$moduleEnabled = $this->config->getValue(Config::XML_PATH_MYCOMPANY_EM_ENABLED, $store);

Try and error tought me how to modify the value this section in config.php / website scope:

'mycompany_em' => [
    'general' => [
        'enabled' => '1',
    ]
]

Why then is there an additional PATH in the next one?

$accountId = $this->config->getValue(Config::XML_PATH_MYCOMPANY_PX_PATH_ACCOUNT_ID, $store);

I found out that it can be modified with this section in config.php / website scope:

'mycompany_em' => [
    'general' => [
        'enabled' => '1',
        'account_id' => '1234'
    ]
]

But why? Is PATH a keyword? - I had created a similar question before: Translate Magento Admin config settings to config.php settings - but it still confuses me.


texts:
I follow this for add an image uploader in widget https://gist.github.com/cedricblondeau/6174911fb4bba6cb4943
But i get an js error "Uncaught ReferenceError: MediabrowserUtility is not defined"
Any body have experience on this please help me


texts: Magento 2 how to use elasticsearch for custom indexer? Custom sort stops working after enabling elasticsearch

texts:
I am a magento newbie and trying to implementing a custom sort on product listing page with the help of this:
https://magento.stackexchange.com/a/230983/84727

On top of the solution i have built a custom indexer with assumption that elastic search would be keeping track of the index through magento but when selecting the option getting this error on debug log:

{"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [sale_count] in order to sort on","index_uuid":"bWC-SqwXSpijk9cpKLT7PA","index":"magento2_product_1_v4"}],"type":"search_phase_execution_exception","reason":"all shards failed" ,"phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v4","node":"YrKI9XCaSwSEAB5KNGBSvw","reason":{"type":"query_shard_exception","reason":"No mapping found for [sale_count] in order to sort on","index_uuid":"bWC-SqwXSpijk9cpKLT7PA","index":"magento2_product_1_v4"}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\": \"query_shard_exception\",\"reason\":\"No mapping found for [sale_count] in order to sort on\",\"index_uuid\":\"bWC-SqwXSpijk9cpKLT7PA\",\"index\":\"m agento2_product_1_v4\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v4\",\"node\":\"YrKI9XCaSwSEAB5KNGBSvw\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [sale_count] in order to sort on\",\"index_uuid\":\"bWC-SqwXSpijk9cpKLT7PA\",\"index\":\"magento2_product_1_v4\"}}]},\"status\":400} at /var/www/html/mg2/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:636)"}

By this I understand that there is no mapping with the name "sale_count" but struggling to understand how to push it to elasticsearch.

Here is my indexer class function which is running fine and creating the appropriate data in my table.

/**
 * @param array $ids
 */
private function reindex($ids = [])
{
    $this->logger->info('Trying to run indexer');
    $select = $this->connection->select()
        ->from('sales_order_item', [
            'product_id' => 'product_id',
            'sale_count' => 'SUM(qty_ordered)'
        ])
        ->group('product_id');
    $this->connection->query(
        $this->connection->insertFromSelect($select, 'catalog_product_sale_count', [
            'product_id',
            'sale_count'
        ], \Magento\Framework\DB\Adapter\AdapterInterface::REPLACE)
    );
}

And for the sort handler I am using a beforePlugin like this:

class Bestsellers
{
/**
 * Bestsellers sorting attribute
 */
const BESTSELLERS_SORT_BY = 'sale_count';

/**
 * @param Config $subject
 * @param $result
 * @return array
 */
public function afterGetAttributeUsedForSortByArray(Config $subject, $result)
{
    return array_merge($result, [self::BESTSELLERS_SORT_BY => __('Best Sellers')]);
}

/**
 * @param Toolbar $subject
 * @param Collection $collection
 */
public function beforeSetCollection(Toolbar $subject, Collection $collection)
{
    if ($subject->getCurrentOrder() == self::BESTSELLERS_SORT_BY) {
        $collection->getSelect()->joinLeft(
            'catalog_product_sale_count',
            'e.entity_id = catalog_product_sale_count.product_id',
            ['sale_count']
        )
            ->group('e.entity_id')
            ->order('catalog_product_sale_count.sale_count ' . $subject->getCurrentDirection());
    }
}
}

Need help to sort this thing out.

Thanks in advance


texts: How to remove the collateral tab when it is empty?

texts:
I created multi-select attribute to display the accessories in product collateral tab in details page. I added the accessories block like below:

            <block type="catalog/product_view" name="catalog.product.accessories" template="catalog/product/accessories.phtml">
                <action method="addToParentGroup"><group>detailed_info</group></action>
                <action method="setTitle" translate="value"><value>Accessories</value></action>
            </block>

Content in the accessories.phtml file to display the image of the accessories selected is below:

    <?php $_helper = $this->helper('catalog/output'); ?>
<?php $_product = $this->getProduct(); ?>

        <?php
             $Feature = explode(",",$_product->getResource()
             ->getAttribute('standard_accessories')->getFrontend()
             ->getValue($_product));
             foreach($Feature as $key => $value): ?>
             <a href="<?php echo Mage::getBaseUrl().$value ?>" ?>
                <?php echo ""; ?>

        <?php /*echo $value; */?>
          <?php endforeach; ?>

Now when no accessories are selected for particular product the accessories tab should not be displayed.but it is displayed with broken image like below:

Someone kindly help me with this issue like Where and how should the condition be given to hide the tab when it is empty?


texts: RWD Magento 1.9.1 header search form input field border

texts:
I just give up to find where I can change it.

Probably it's ridiculous but i can't find where to remove the light blue border around the search field on the header when it is "on focus".

Does anybody could help me on that?


texts: SITEMAP.XML contains non-canonical links

texts:
XML Sitemap contains a lot of non-canonical URLs in Magento 2.0.2. It's not good practice from SEO perspective and and worth fixing.

Here is my config:

Use Categories Path for Product URLs is set to "No"
Use Canonical Link Meta Tag For Products is set to "Yes"

And few lines from my sitemap:

http://example.com/women/tops-women/tanks-women/erica-evercool-sports-bra.html  (category path, Non-Canonical)
http://example.com/nora-practice-tank.html (Canonical)
...

All sitemap links should be equal to canonical links.

Could someone please have a look at it.
Appreciate any help.


texts: create a pop up to print the product page in magento

texts:
i have a example of what i exactly want, on a magento website
http://www.strollers.ro/
on a product page, we have a link(first print button), which redirect to the same page in a pop up, with a print button.

My question , because i spent a week trying to achieve this.
which file should i edit?

There seems to be some files for PDF or pop up in Magento folders, do I need to create a module?

All I want is a link to a phtml file (print.phtml? is this the file?) that represent the same page without sidebar, footer etc, and with just product description and a print button.

I'm a beginner.


texts: Check out is not working at view cart in Magento - 2.2.4?

texts:
I am working on Magento - 2.2.4 community edition and on porto theme.

Go to checkout is not working.

My Website

Steps to check the issue :

Register account
Add products to cart
Go to check out page
After added products to cart, Directly go to check out page.


texts: Magento2: What is relavence sorting on search result page?

texts: I want to know what is Relevance sorting in magento search result page, how it is working to sort the products


texts:
I have an online e-commerce project which focuses on selling paintings from different artists. These products have been assigned to sub-categories of the artists name.

Category structure:

Root Category
        |-----Gallery
                |-----artist_1
                       |-----painting_001
                       |-----painting_012
                       |-----painting_024
                |-----artist_2
                       |-----painting_003
                       |-----painting_004
                |-----artist_3
                       |-----painting_005
                       |-----painting_007
                ...
                |-----artist_64
                       |-----painting_045

If I were to build a plugin where the client is able to limit the products shown per the artist's name, e.g only show 2 paintings of artist_1 on the 1st products page, only show 1 painting of artist_32, only show 4 paintings of artist_13 etc etc.(no limit to the rest of the pages) Which way would I have to go to be able to accomplish this particular function? I know that you can manually do this by manually entering the position of each product within a category.

Here is a mockup of how the plugin might look like:


texts: Magento 2: Set Template Dynamically Using Ajax Call

texts:
I have button in frontend. I want to change template from controller when button is clicked.

Please help me.


texts: Magento 2 multi store setup and language selection screen

texts:
We have an installation with 4 websites, each is meant for different market / language. We also have 4 landing pages in different domains and from those we need to be able to link customers directly to the correct websites in Magento.

None of the 4 websites in Magento is "main" website. So I was thinking if we could have each presented in subfolder like www.example.com/fr and www.example.com/de
Could there be a language selection page/screen in the main www.example.com url where customer could select the correct website manually by clicking big country flags? How should I set this up? Do I need fifth website set up that only has the home page set up with those flags?

I'm also thinking automatic IP based redirection, but that might be a bit difficult if we want to link directly to the correct website.

Any suggestions?


texts: "Product with SKU '' is not linked to product with SKU... (When Saving Product)

texts:
We receive errors similar to
Product with SKU '' is not linked to product with SKU 'DS10P0242' when we attempt to save certain products.

Our products are all simple products with customizable options for size. I was thinking that this is because of the SKU field being empty for each option, but even when I fill all of these fields with test values I am not able to save the product successfully.

Any ideas?


texts:
I Created Multi-Store option in the localhost, Store has been created. But load from one store to another

  Invalid Form Key. Please refresh the page.

message displayed.


texts: How to create static Image Grid Gallery similar to Category Page's Product Grid gallery on a CMS Page

texts:
Is it possible to create Image Grid gallery that resembles Category page's Product Grid Gallery in appearance & pagination?
I have tried adding Image grid with pagination using OwlCarousel, however it does not resemble the Category Page's Product Grid Gallery appearance.
Pl note, everything is static in the CMS page. (36 images on 3 pagination page)


texts: Change language switcher URLs in Magento 2.3

texts:
I have multiple languages (store views), each in a different domain (.com, .es, .de, .fr, etc...). When I change the language in any page, the url displayed is like bellow (from .es to .de for example):
https://xxxxxx.es/stores/store/redirect/___store/de_DE/___from_store/es/uenc/XXXXXX/
But I want it to be like this: https://xxxxx.de/.......
I think the code to do that is inside vendor/magento/module-store/view/frontend/templates/switch/languages.phtml. In this line:
<a href="<?= $block->escapeUrl($block->getViewModel()->getTargetStoreRedirectUrl($_lang)) ?>">
    <?= $block->escapeHtml($_lang->getName()) ?>
</a>

How to do that?


texts: Classes *Factory from generated/ directory isn't use and look for them in vendor directory. Magento2.3

texts:
I'm using Magento\Catalog\Model\CategoryFactory in my module and in unit tests.
Unit tests doesn't pass because CategoryFactory doesn't exists.
Class CategoryFactory exists in generated directory and doesn't exists in vendor. Magento 2 in first order check generated directory and if there is no searched class, then search inside vendor directory.
Directory generated was deleted many times and now have rights 777. I clean it many times and nothings help. During compile (setup:di:compile), Magento 2 creates needed files but some files doesn't use.
Earlier this code works and nothings change inside code, only programming environment. I'm using vagrant and CentOs on VirtualBox.
The same problem is with other *Factory classes.
Do You have any idea, what is the problem?


texts: Show COD Payment Method as Disable in Checkout if product with Some attribute in the cart

texts:
I have to display COD payment method but as disabled in payment step if a product with Some attribute in the cart.

Please help me.


texts:
In magento 1.9 I created a custom module with EAV models with the help of following tutorial.
How to create an EAV entity?

Is there any equivalent in magento 2.


texts: magento 2 how to show minicart in custom Popup?

texts: magento 2 how to show minicart in custom Popup ?


texts: Magento ajax request what actually contoller will return

texts:
i am learning begging step of creating a ajax request in magento and mostly i found same code logic. But where i am confused in these tutorials are actually what controller will return?

https://www.atwix.com/magento/ajax-requests-in-magento/

in ajax request controller action is returning.

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

which is same as non ajax call. Actually what this code return when call via ajax? complete html, head, body & their inner html tags? what if i want to retun some specification or json data?

i am asking 2 things

what given code controller->action code return when call via ajax?
how to return specific


texts:
When cron on the server kicks off to start the magento cron, an exception is thrown in var/reports with the error:

a:4:{i:0;s:31:"Invalid cron expression: always";i:1;s:1245:"#0 /home/magento/magento/app/code/core/Mage/Cron/Model/Schedule.php(68): Mage::exception('Mage_Cron', 'Invalid cron ex...')
#1 /home/magento/magento/app/code/local/Mage/Cron/Model/Observer.php(214): Mage_Cron_Model_Schedule->setCronExpr('always')
#2 /home/magento/magento/app/code/local/Mage/Cron/Model/Observer.php(168): Mage_Cron_Model_Observer->_generateJobs(Object(Mage_Core_Model_Config_Element), Array)
#3 /home/magento/magento/app/code/local/Mage/Cron/Model/Observer.php(128): Mage_Cron_Model_Observer->generate()
#4 /home/magento/magento/app/code/local/Xtento/OrderExport/Model/Observer/Cron/Config.php(22): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#5 /home/magento/magento/app/code/core/Mage/Core/Model/App.php(1338): Xtento_OrderExport_Model_Observer_Cron_Config->addCronjobsToConfig(Object(Varien_Event_Observer))
#6 /home/magento/magento/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_Model_App->_callObserverMethod(Object(Xtento_OrderExport_Model_Observer_Cron_Config), 'addCronjobsToCo...', Object(Varien_Event_Observer))
#7 /home/magento/magento/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('default', Array)
#8 /home/magento/magento/cron.php(73): Mage::dispatchEvent('default')
#9 {main}";s:11:"script_name";s:31:"/home/magento/magento/index.php";s:4:"skin";s:5:"admin";}


texts: Redirect back to previous page only on successful login

texts:
I am trying to show catalog prices only to logged in users. Following snippet works however it has two issues:

if(!Mage::helper('customer')->isLoggedIn()) {
Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl());

echo 'Please Login to view prices';

}

Issues:

1) If login credentials are incorrect, page redirects to previous page (on catalog page) and shows 'invalid login error'. Ideally, it should stay on the login page and should not redirect unless login is successful.

2) If user login is successful in first attempt, page redirects to catalog page. however, url contains port 8080. domain.com:8080/catalog/

Any fix for above issues?

or

Is it possible to have login on a popup on the catalog page?


texts:
Magento 2 comes with some tools to help developers create quality extensions.
What are the things that one should check before publishing an extension?
I have 3 for now:

running the tests bin/magento dev:tests:run
running php codesniffer with the Ecg2 standard phpcs --standard=EcgM2 path/to/code
make sure compilation works bin/magento setup:di:compile

Anything else i can run to get information about what I did wrong?


texts: How to check for customer group & country

texts:
I'm looking to modify a cool little snippet of PHP that I found to use in my cart to show the customer how much more they have to spend to get free shipping. However, I need to add statements to it doesn't show it to customers in a particular customer group and country.

<?php if ($this->getQuote()->getSubtotal() < 50): ?>
<?php $subtotalamt = $this->getQuote()->getSubtotal(); ?>
<?php $freeshipamt = 50; ?>
<?php $sumtotal = $freeshipamt - $subtotalamt; ?>
<?php Mage::helper('checkout')->formatPrice($sumtotal); ?>

You are just $<?php print ($sumtotal); ?>
away from earning free shipping!

<?php endif ?>

I'm lost as to what I need to add to this to check for the customer group and and country.


texts:
We are using magento for our retail as well as distributor ordering.

There are customer groups made and the free shipping applies after certain amount.

Retail Buyer :
Min order value - Rs. 500 else Rs. 200 is charged extra

Distributor :
Min order value - Rs. 85000 else Rs. 3500 is charged extra

How can this be achieved?

Thanks in advance.

Kartik


texts:
I am quite new to varnish however I have configured varnish in my Dev environment and seems to be going well.

The cache however doesn't seem to flush with Magento. Subsequent requests however remain lightening quick with the old content until refreshing the page on a client PC which them seems to reload the page properly and update the cached page.

I have run the below command to update the cache host:

bin/magento setup:config:set --http-cache-hosts=localhost:80

I was unsure about the port whether 6082 or 80 but checking for purge requests with below command shows results when running a cache refresh:

varnishlog -g request -q 'ReqMethod eq "PURGE"

Result:

*   << Request  >> 98314
-   Begin          req 98313 rxreq
-   Timestamp      Start: 1511438530.550488 0.000000 0.000000
-   Timestamp      Req: 1511438530.550488 0.000000 0.000000
-   ReqStart       ::1 41502
-   ReqMethod      PURGE
-   ReqURL         /
-   ReqProtocol    HTTP/1.1
-   ReqHeader      X-Magento-Tags-Pattern: .*
-   ReqHeader      Host: localhost
-   ReqHeader      X-Forwarded-For: ::1
-   VCL_call       RECV
-   VCL_acl        MATCH purge "localhost"
-   VCL_return     synth
-   VCL_call       HASH
-   VCL_return     lookup
-   Timestamp      Process: 1511438530.550571 0.000083 0.000083
-   RespHeader     Date: Thu, 23 Nov 2017 12:02:10 GMT
-   RespHeader     Server: Varnish
-   RespHeader     X-Varnish: 98314
-   RespProtocol   HTTP/1.1
-   RespStatus     200
-   RespReason     OK
-   RespReason     Purged
-   VCL_call       SYNTH
-   RespHeader     Content-Type: text/html; charset=utf-8
-   RespHeader     Retry-After: 5
-   VCL_return     deliver
-   RespHeader     Content-Length: 226
-   Storage        malloc Transient
-   RespHeader     Accept-Ranges: bytes
-   Debug          "RES_MODE 2"
-   RespHeader     Connection: keep-alive
-   Timestamp      Resp: 1511438530.550634 0.000145 0.000062
-   ReqAcct        65 0 65 218 226 444
-   End

I have tried restarting varnish however the cache remains. This is becoming an issue when testing deploying new static content as some resources become unavailable having old urls stored in the cache.

Doing this:

curl -I -v --location-trusted 'http://dev.magento2.com'

Does return a MISS once cache cleared / flushed in magento. This was run from the web server. Second request will then return HIT as cache has been rebuilt. Just my client PC seems to behave like a hit until i click refresh.

Why do i still need to refresh the page on my client PC in order for the content to update?


texts: Swap Multiple Images with Configurable Swatches

texts:
I've got a question about the new lovely feature Configurable Swatches.

I am setting up a configurable product with Colour and Size options, and I have set it up so that when a Colour is selected in the options, the Base image is changed.

I have added two images to the Configurable product, and two images for every Simple product (for each and every size), hoping that when selecting a Colour option, both images for the Configurable product would change to the two images connected with the specific Colour option.

Unfortunately this does not work, only the first image of the Simple product is displayed, and I can still see the two Configurable images in the thumbnails.

What I would like is that, when selecting a Colour option, all images are replaced by the images I have uploaded for that specific Colour option. Does anyone know if this is possible?

I should add that I am working with the new Magento CE 1.9.1 with the default RWD theme.


texts: How to set a store ID on Mage_Catalog_Model_Resource_Product_Collection?

texts:
The task is trivial. I need to get list of products for particular store view with a flat catalog enabled. The most obvious solution is the following:

$collection = Mage::getResourceModel('catalog/product_collection')
    ->setStore($storeId);

In fact setStore() method is not making any difference here because it is called after the _initSelect() method of Mage_Catalog_Model_Resource_Product_Collection which gets the name of the flat table based on store ID. As the store ID is not yet set it takes the current store ID.

So the obvious workaround would be to set a current store ID before getting a model.

Mage::app()->setCurrentStore($storeId);

$collection = Mage::getResourceModel('catalog/product_collection');

It will work. But only if you need to get a collection once. If you need to get a collection in the loop or you just need two back to back collections you will not be able to set a specific store for them.

The reason is that Mage_Catalog_Model_Resource_Product_Flat class has it's own _storeId property and in the constructor it is set to the current store ID. That's why it will be set first time. Then for some reason (heaven knows I hope there is one) in Mage_Eav_Model_Entity_Collection_Abstract::_init each resource module is fetched as a singleton. So no constructor for 2nd call.

This all looks so wrong that I'm pretty sure I'm wrong and it is not another Magento bug (or two). Hope somebody can shed a light on it.


texts: Get Customer Phone Number in my Observer

texts:
I created a button in order view page of magento 1.9.x with the following guide: https://www.siphor.com/add-custom-buttons-to-order-view-pages-in-magento/. I edited the Observer like my needs:

<?php
class Siphor_Custombuttons_Model_Observer
{
    public function addButtons($observer)
    {

$block = $observer->getBlock();

if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {

            $message = Mage::helper('core')->__('Sei sicuro di voler chiamare?');
            $block->addButton('custom_button', array(
                'label'     => Mage::helper('core')->__('Chiama'),
                'onclick'   => "if(confirm('Sicuro di voler chiamare?'))window.open('https://api.api/?api=$customerphonenumber');",
                'class'     => 'go'
            ));
        }
    }
}

So like you can see i need to start a call to customer on button click but i can't get customer phone number to put it in the variable for the API

P.S. If possible I prefer to send directly a POST request to my API instead of open a new window with a GET request


texts: Cannot checkout as a guest in Magento 2.3.2

texts:
I'm currently getting an error with my Magento 2.3.2 site.

When users check out as guests they are getting the following error.

  No such entity with cartId = gRO8kO0ylqMViKh6sR06ZQJ5aR9RavdJ

I'v checked in the developer console and the following error is given:

VM3294 jquery.js:10254 POST https://www.mywebsite.com/rest/default/V1/guest-carts/gRO8kO0ylqMViKh6sR06ZQJ5aR9RavdJ/payment-information 404 (Not Found)
send    @   VM3294 jquery.js:10254
ajax    @   VM3294 jquery.js:9738
post    @   VM3519 storage.js:41
(anonymous) @   VM6585 place-order.js:21
(anonymous) @   VM6581 place-order.js:35
_super  @   VM3386 wrapper.js:73
(anonymous) @   VM6579 place-order-mixin.js:19
(anonymous) @   VM3386 wrapper.js:78
getPlaceOrderDeferredObject @   VM6575 default.js:165
placeOrder  @   VM6575 default.js:139
(anonymous) @   VM3345 knockout.js:4255
dispatch    @   VM3294 jquery.js:5226
elemData.handle @   VM3294 jquery.js:4878

I've tried updating the Sagepay extension but this does not seem to have done anything.

Does anyone know another reason this could be occurring.


texts:
I have logged into my Magento instllation via ssh/putty, I then ran cd public_html to get to my root folder and am then running the following commands:

php indexer.php --reindex catalog_product_attribute

But nothing happens, I just get an error saying "could not find indexer.php".

I have looked inside the public_html folder in cPanel and there is no file named indexer.php, only index.php and index.php.sample.

Can anyone help?


texts:
I have below code

$updatedAtFrom = date("Y-m-d",strtotime($updatedAt['orig_from']));
$updatedAtTo = date("Y-m-d",strtotime($updatedAt['orig_to']));
$this->getCollection()->addFieldToFilter('DATE(main_table.updated_at)', array('from' => $updatedAtFrom,'to' => $updatedAtTo));

When I run query it displays

(`DATE(main_table`.`updated_at)` >= '2017-04-17' AND `DATE(main_table`.`updated_at)` <= '2017-04-17')

So it gives #1054 - Unknown column 'DATE(main_table.updated_at)' in 'where clause'

When I remove DATE then it works fine. I have that field as type timestamp. But I want to compare only Date.


texts: Check if Magento is running in production mode

texts:
I am creating a custom store implementation and I need to check if the store is in production mode or not via code.
What is the fastest way to achieve this?


texts: Magento 2 custom product attribute not showing images in frontend

texts:
I have the following code fetching custom attribute which is a textarea attribute

$_product->getCustomAttribute('size_guide')->getValue();

However, everything displays perfectly except the media url. It appears to be broken.

<img src="{{media url=" wysiwyg="" hoodies.jpg"}}"="" alt="">


texts: Category View All option only shows 3 products

texts:
Using Magento 1.91

If a user goes to any category page and clicks "All" in the toolbar, they will only see 3 products. This is not the case on the search pages, however, and clicking "All" there will show all products (and there are significantly more products in search than in the categories, so it's not a memory issue)

I've added different limits into the toolbar, 8, 12, 24 and those all work fine. The only issue is on "All"

I also removed the custom theme and I am still seeing the issue.

Any ideas on where to attack this? Thanks!


texts: Magento Collection addFieldToFilter complicated AND/OR query

texts:
We have an events module on a Magento site we are developing which features event records which have start_date and end_date attributes.

On the events listing view you can view events by month. Each month view should show events which 1) start in that month, 2) end in that month or 3) start before AND end after that month (ie. last for the duration of the whole month).

My current Magento filter to get all events for the month is as follows (thanks to this answer https://stackoverflow.com/a/7851884/2071728). The variable $first_dayis the first day of the given month eg. 2014-06-01 and the variable $last_dayis the last day of the given month eg. 2014-06-30 or 2014-07-31.

    $collection = Mage::getModel('mymodule_events/details')->getCollection();
    $collection->addFieldToFilter( 'status', '1' );
    $collection->addFieldToFilter(
        array('start_date', 'end_date'),
        array(
            array('from'=>$first_day,'to'=>$last_day),
            array('from'=>$first_day,'to'=>$last_day)
        )
    );

The query which results is as follows:

SELECT `main_table`.* FROM `mymodule_events_details` AS `main_table`
WHERE (status = '1')
   AND ((start_date >= '2014-06-01' AND start_date <= '2014-06-30')
         OR (end_date >= '2014-06-01' AND end_date <= '2014-06-30'))

Points 1 and 2 above are working fine and most events are being retrieved, but the events which last the whole duration of the month are not being retrieved, except if you are viewing the month where they start or end.

If anyone could help with how I can alter my code to get the following query I would really appreciate it. I believe this is the resulting query I need (note the last OR):

SELECT `main_table`.* FROM `mymodule_events_details` AS `main_table`
WHERE (status = '1')
    AND ((start_date >= '2014-06-01' AND start_date <= '2014-06-30')
          OR (end_date >= '2014-06-01' AND end_date <= '2014-06-30')
          OR (start_date < '2014-06-01' AND end_date > '2014-06-30'))

Thanks in advance! I am using Magento CE 1.8.


texts: Display Customer address in different lines

texts:
we got below test order with below shipping address :

when i download it in pdf from sales order grid, i got as below image:

but i need to display the address in many lines as like 1st image.....

my code :

public function generatePdfAction()
    {
        $orderId = $this->getRequest()->getParam('order_number');
        $order = Mage::getModel('sales/order')->load($orderId);
        $shippingAddress = $order->getShippingAddress();

        $pdf = new Zend_Pdf();
        $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
        $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_TIMES);
        $page->setFont($font, 12);
        $width = $page->getWidth();
        $i=0;

        $page->drawText('Order Id# '.$order->getIncrementId(), 20, $page->getHeight()-20);
        $page->drawText($shippingAddress->getFormated(true), 20, $page->getHeight()-40);
        $pdf->pages[] = $page;

        $this->_prepareDownloadResponse('info'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
                '.pdf', $pdf->render(), 'application/pdf');

        //$this->_redirectReferer();
    }

Also i replaced below code :

$page->drawText('Order Id# '.$order->getIncrementId(), 20, $page->getHeight()-20);
        $page->drawText($shippingAddress->getFormated(true), 20, $page->getHeight()-40);
        $pdf->pages[] = $page;

by this code  :

$page->drawText('Order Id# '.$order->getIncrementId(), 20, $page->getHeight()-20);
        $page->drawText("TO", 20, $page->getHeight()-40);
        $page->drawText($shippingAddress->getStreet(). " ". $shippingAddress->getRegion(), 20, $page->getHeight()-60);
        $page->drawText($shippingAddress->getCountry(), 20, $page->getHeight()-80);
        $page->drawText($shippingAddress->getRegionCode(), 20, $page->getHeight()-100);

Now when i open pdf, its displayed like below image :


texts: change hover color of shop by categories in magento

texts:
if you see at left of the site , there is a "BROWSE BY",  under that list of categories are displayed :

for example "Action & toy figures". if we hover on "Action & toy figures", its color should change to black

how to change hover color of the category.

let me know if you have any clarifications.

thanks in advance.


texts: Magento 2: Cart Subtotal shows Original Price in place of Special Price

texts:
I have an online multistore website.

In this website, we are facing an issue in which subtotal on the cart is not displaying special price for some products. In place, it shows the actual price with tax. Products show the special price incatalogue page andproduct page.

What I found now is, If I try to update the special price by selecting default view. It shows the correct price in cart page too. And when I remove that special price from default store view, after that also it shows correctly.

It works fine for some products but for some products it not. If anyone has faced this issue earlier, please help me with it.

In this issue, further, I found that _initItem() method is called twice in which it sets the price of an item. First time when it is called, the final price of the product is special price and on the second time, it gives the original price.

If anyone can help now, please let me know.


texts:
I'm using the theme, Fabia, from themeforest, and I cannot for the life of me get rid of the "Custom Tab 1" and "Custom Tab 2" tabs by the product description. They default to a description of Lorem Ipsum and I've seen it on other sites. I'm trying to minimize duplicate content and I just want to get rid of them, as I don't need custom tabs, but I can't even find the option anywhere. Is anyone else using this theme that has run into this problem?
Any help would be greatly appreciated. Thanks


texts: I put add to cart button(default code on addtocart.phtml) on madal in product page ,but I have no idea how to make it work, please help


texts:
Trying my instance of Magento on PHP 5.6 because my host is upgrading the server and everything seems to work well besides from this error message.

  Deprecated functionality: preg_replace(): The /e modifier is
  deprecated, use preg_replace_callback instead  in
  /public_html/lib/Zend/Filter/PregReplace.php on line 171

Has anyone successfully patched this file?


texts: How to translate Custom Options (dropdown) on many different products in magento

texts:
I'm having trouble finding a "easier" way how to translate Custom Options at once for many products.

I don't want to go to each product and use the "Choose Store View:" because there are too many products.

Is there a way where I can translate the options of the dropdowns without going thru each one?

[I'm using magento 1.8.1.0, 2 languages, my directory right now have around 7gigs]


texts: Magento 2 create custom swatch attribute programmatically

texts: I would like to create attributes with swatch option programatically in Magento 2.


texts: Preserving Adminhtml Grid Filter Parameters After a Redirect

texts:
As title says, I'd like to keep the filtering parameters for a custom grid I made in the admin.

For example, if I filter the grid, edit a row, and save, I'd like to be redirected to the grid and have the same filters applied. I've tried _redirectReferer() and poked around some admin controllers, but I didn't find anything in particular.

Any ideas?


texts: How to redirect Guest user to create account page in onepagecheckout in magento1.9.1.0

texts:
How to redirect Guest user to create account page in onepage-checkout ?

After creating the account, must redirect to onepage-checkout as logged in user.


texts: Determine if collection has an attribute in the select

texts:
I want to join a custom field to a product collection, and the field I'm using to join it on is a custom attribute.

My observer method is currently doing this:

# Event: global/catalog_product_collection_load_before
public function addColourName(Varien_Event_Observer $observer)
{
    $collection = $observer->getEvent()->getCollection();

    $collection->joinTable(
        'colours/product_colour',              // my custom model
        'colour_code = existing_colour_code',  // my custom attribute on the product
        ['colour_name'],                       // the joined field I want
        null,
        'left'
    );

    return $this;
}

So I want to join my colours/product_colour model on the product's existing attribute existing_colour_code = product_colour.colour_code, so I can retrieve the colour_name from that model.

All works correctly if I do the following:

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

foreach ($products...

However if I haven't added existing_colour_code to the select, then my observer will fail since the attribute doesn't exist to use in the join.

Question: Is there a way I can check to see if existing_colour_code has been added to the select so I can prevent this happening? Obviously I don't want to add it to the select for all product collections, simply ignore the joined field if it isn't required.

I was hoping for something along the lines of getAttributeInSelect($attrName), to match addAttributeToSelect() and removeAttributeToSelect(), but I can't see anything obvious, and the array containing the select attributes is protected so I can't access it from an observer.


texts: Magento 2: Show subtotal without discount in Cart page

texts: In my custom module, I need to Display subtotal without discount(subtotal - discount) how can I achieve my needs? , any help appreciated.   Thank you


texts: PDF Invoice changes working fine on local system but issue with server side

texts:
I have made customization in PDF invoice files.

Case 1)
Copied files from below

app\code\core\Mage\Sales\Model\Order\Pdf

Files Copied: Abstract.php, Invoice.php, Shipment.php, Creditmemo.php

Created Structure like below, pasted here and customize the changes.

app\code\local\Mage\Sales\Model\Order\Pdf

Case 2)
Copied files from below

app\code\core\Mage\Sales\Model\Order\Pdf\Items

Files Copied: Abstract.php

Created Structure like below, pasted here and customize the changes.

app\code\local\Mage\Sales\Model\Order\Pdf\Items

Case 3)
PDF invoice was having issue in printing Rs Symbol. So i have downloaded dejavu-sans and after making changes in above files. its working fine in local system.

But when i uploaded the same changes on server side. Nothing seems to work.
Is there any thing different needs to be done on server side?


texts:
so I'm trying to add the logo to the topmenu.phtml but <?php echo $this->getLogoSrc() ?>, and <?php echo $this->getLogoAlt() ?> don't work (they return null/nothing)

Is there a way to call them from this template rather than the header.phtml?


texts: I used magento 2 and use SM MEGA MENU but their in mobile show the categories nav bar how can i create home category and redirect into home page


texts:
I just install magento. When I try to product add there already have many input field.

I need some multiple extra field that's can be some time one entry some time multiple entry

like

extra option one
extra option tow
extra option three
add more+

It is possible to magento?

UPDATE

Admin when need any product entry then he needs some product feature of specifications add. There have some attribute sets but that's are fixed.
Example: when admin add a new product a android mobile. It's specifications need OS, Battery, Ram, etc. That's I can add attribute sets. But I don't want to add attribute sets I need there are some free text input box(one or two) under specification label and a add more button when i click add more button then add one more text input box under specification label. After product entry from admin product front end show like this

3900 mAH Battery
Android v5.0 (Lollipop) OS
3GB RAM
21 MP Primary Camera
Front & Back Camera

There can be one specification or multiple specification depends on product.


texts: Dirty background on png product images in Magento 2.1

texts:
Original

 Magento

I upgraded to Magento 2.1.0 from Magento 2.07 and now my png-formatted product images looks like above. I tried already disabled cache, changed image color profile and re-uploaded but it didn't help.


texts: How to filter products based on the category selection in the products list page?

texts: I need to display all categories in left side and display all products list in the right side when page is loading. When you select check box for any one category, then refresh it and need to display products based on the selected category. How can I do this?


texts: Redirect issue - Checkout redirect to cart

texts:
I have a problem when updating one of my sites from 1.9.3.0 to 1.9.3.3. All my other sites are working fine.

Once updated (tried via SSH, FTP and Magento Connect Downloader) the onepage checkout just redirects back to the cart page. It does this irrespective of whether Formkey is enabled/disabled.

Ive tried many fixes, including adding formkey code to older extensions. I've even uninstalled all the extensions (via Magento Connect Downloader) without luck.

How do I go about troubleshooting this, and finding the cause of the problem?

The site has been live since 2012, and perhaps there may be some legacy theme/plugin elements causing the issue?

Any help would be highly appreciated!


texts: How to migrate single store from magento 1.9 multi store website to Magento 2.3.4?

texts: I have used Magento 1.9.2.3 multi-store website (3 stores), how to migrate website id 1 to Magento 2.3.4 using data migration tool.


texts:
We have had a few clients have orders marked as suspected fraud. I've read quite a lot of why this happens but what I'm more interested in is how the orders should be handled within Magento if the order isn't actually fraudulent.

It appear that when you update the order to complete via PayPal, it updates the order comments in Magento but then doesn't change the order state from payment review to processing. Is there a way you change the order state when it's in review?

Thanks.


texts: How can add an image for submenu(subcategory) in magento 2?

texts:
I am creating a new module but I want to add images for subcategory in magento2 2.2.

Is there someone to show me how to customize it ? Thanks.


texts: Magento 2: Admin is not receiving order confirmation email

texts:
I have a Magento Version 2.1.1 website but when customer buy some things I can receive email for the order but customer are receiving order purchase email
admin is not receiving customer order email

kindly help me to solve my issue?


texts: How to load my product details page module for specific category in Magento 2

texts:
I have installed a custom module with the code of Finance calculator, going to display in product details/view page. Now, i want to display/load the plug-in in product details page for specific category, for example some of the category products need finance calculator and some category products do not require.

For some performance issues i can not add php if module enable condition in .phtml or template.

Can any one suggest me,

Is their any possibility to add a category specific condition from layout - catalog_product_view.xml.
Is there any other possibility to achieve this ?


texts: Display product video in product description tab

texts: I am using magento 2.0.7 and I want to display the product video/image and product description (in product description tab) in view page.


texts: What is the 'data' folder in magento modules?

texts:
Recently I downloaded some free extensions in magento CE 1.7. One of them had a data folder inside the module folder structure. It contained some data upgrade scripts. At the same time the module had sql folder as well. It also contained one install script and several upgrade scripts. Can anyone clarify why the same module has two folders to keep scripts? What is the difference of data scripts and sql scripts?

Any suggestion would be highly appreciated.


texts: How use the default Magento's 'saveAction'

texts:
I want to change the $product->save(); for the saveAction Magento use's when you push the button in the admin.

I don't know why, but with the first doesn't save it equal.

I need to don't go or be redirect to other site because i want to put it in a cron.

UPDATE

  I'm importing/updating products from a csv. The problem is two of them
  isn't shown in the search (frontend) because one attribute fails (but
  works in the others)

If you go to the admin - enter in the product - push 'save' or 'save & continue', it works as i expected.

My conclusion is $product->save(), and saveAction do different things


texts: Magento 1.9.1 cron_schedule is not picked for ever

texts:
I spent almost 3 days and cant able to understand and make the Magento Cron to process the scheduled tasks.  I am running Magento 1.9.1.0 and recently noticed that order emails are now queued instead of sending instantly.  I understand the necessacity but cant able to make the system to pick the queues.

Here is my seeing for Cronjob.

Here is my cronjob command line.

Here is how the tasks are created in cron_schedule table.

Since the records are created in cron_schedule table i think the Cron is running once in every 5 minutes.  If I manually delete these records via PhpMyAdmin the records are created automatically after some time.

But the status of the tasks remains 'pending' and never complete.  Not sure if something wrong in my configuration or I am missing anything.  Can someone please help me how to make the scheduled task run on time.  Also why multiple records are created for one job code?

Update

I cleared the entire table and the cron created the scheduled jobs.  All the jobs are in pending state and never run even waiting more than 60 minutes.  Something is wrong in Magento 1.9.1

Update 11/02: Today I did some more analysis on the process.

I edited the cron.php as below

echo 'iam before mdefault 1';
shell_exec("/bin/sh $baseDir/cron.sh $fileName -mdefault 1 > /dev/null 2>&1 &");
echo 'iam before malways 1';
shell_exec("/bin/sh $baseDir/cron.sh $fileName -malways 1 > /dev/null 2>&1 &");
echo 'i returned success';

I edited the Mage_Cron_Model_Observer class as below

public function dispatch($observer) {
  echo 'iam inside dispath';

My understanding was when the cron runs the -mdefault it should call the dispatch function and the execute will happen.  But what happened was as below in the cron output.

Content-type: text/html

iam before mdefault 1iam before malways 1i returned success

It means the dispatch doesn't called atall...

One another try

I manually changed the variable $isShellDisabled = true; and I changed the below in cron.php.

if ($isShellDisabled) {
  echo 'before always';
  Mage::dispatchEvent('always');
  echo 'after always';
  Mage::dispatchEvent('default');
  echo 'after default';
} else {
  Mage::dispatchEvent($cronMode);
}

The cron output for the above is as below

Content-type: text/html

before alwaysiam inside dispath alwaysafter always

Now it calls the 'dispatchAlways' but not the 'dispatch'

None of the answers helps me. It never picks the scheduled tasks. I.e when the Cron runs for the first time it successfully created the tasks in the table. But it never executes the task.


texts: Default sorting options Sort by 'rating' not working in Magento 2.4.1 in ElasticSearch 7.x

texts:
I have installed Magento 2.4.1 Open source edition with Elastic Search 7.x version.

Magento admin -> Stores -> Attributes -> Product
Find default 'rating' attribute and set 'Use in filter options' to Yes
Clear cache if needed
Open category/product listing page
Change the sort option to 'Rating'

Result which I'm getting is that product position remains same even if i change direction ASC/DESC
https://www.domainexample.com/category.html?product_list_order=rating&product_list_dir=desc
https://www.domainexample.com/category.html?product_list_order=rating&product_list_dir=asc
I have done re-index multiple times and verified elastic search mapping as well.
Just to note that site does not have any custom/third-party modules.
Tried to add weight as well but that is also not working.
Ref. issues(sort by quantity and sort by quantity) I found

https://github.com/magento/magento2/issues/31775
https://github.com/magento/magento2/issues/28924


texts: Magento 2 : How I can change the default font Icon in menu admin for custom module?

texts:
I need to add font icon in the admin menu.

Like all the core magento 2 menus, by default it shows the hexagonal icon for custom module menu, how can I change it?


texts: problem unsetting quote (cart), data is not saved

texts:
I need to save quoteId and unset quote (cart) data in session clicking a button when I'm is in the cart, then after performing other operations (for example, I buy some items) I would like to click another button and restore previous cart using quoteId.

I've correctly got quoteId from session using Mage::getSingleton('checkout/session')->getQuoteId();

Then I've tried to unset quote using

$quote = Mage::getModel('sales/quote')->load($quoteId);
$quote->setIsActive(false); //tried setIsActive(0) too
$quote->save();
Mage::getSingleton('checkout/session')->setQuoteId(null);

but unfortunately I still have a filled cart, in fact if I change page and then I come back to my cart I can see it (I expect that it will be empty after unset...), and on my database I can see is_active = 1 for this quote.

What I've done wrong? Can you please help me figuring out how to solve this issue?

Then, do you know how to load/restore quote from database and set it in session, so I can see it in frontend cart?


texts: Magento 2.1 - missing array field default value in configuration

texts:
I have a custom extension which adds new inputs to Magento's configuration. Some of the inputs are arrayFields and its defined in system.xml file as:

<field id="custom_ranking_product_attributes" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Ranking</label>
    <frontend_model>My\CustomModule\Model\Source\CustomRankingProduct</frontend_model>
    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
    <comment>
        <![CDATA[ Some comment ]]>
    </comment>
</field>

Class My\CustomModule\Model\Source\CustomRankingProduct is a child of Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray.

In config.xml file I have defined a default value for this input like:

<custom_ranking_product_attributes>a:1:{s:18:"_1427960305274_274";a:2:{s:9:"attribute";s:11:"ordered_qty";s:5:"order";s:4:"desc";}}</custom_ranking_product_attributes>

In Magento 2.0.* I can see the default value filled to the input:

But in Magento 2.1.* it's empty:

However, when I try to get the config value, the correct array is returned in both 2.0.* and 2.1..
Just 2.1. doesn't display the default value so after the initial configuration save it becomes empty.

What can I do to have the default value correctly displayed even in Magento 2.1?


texts: I'm having a magento with thousands of product and attributes. I have to just add the product in new install magento without any configuration changes in new magento. Any option to migrate database to database in magento 2.


texts: magento1.9 : Check if the customer already exist or not?

texts:
How to check whether the customer is already registered user or new user.

If they are a new user the product add to cart logic should be different, If they are a registered user the product add to cart logic should be different.

How to differentiate, and where to edit the login in code?


texts:
I've been tasked with integrating Navision with Magento, I can't decide wether a module would do the job or if it's a better approach to make a web API for this?

I need to achieve several tasks:

Sync products to Magento from Navision
Send orders from Magento to Navision
Fetch product availability from Navision (once a day, and once upon ordering).
Get customer item prices.
Get order delivery charges.
Get the Customer and send the customer to Navision.

And a bunch more.

Now from my understanding I believe I'll need to make a module regardless for certain tasks. But my question is; would the API integration be more ideal? I don't have experience in making an API for Magento before which is why I ask. I know this may be more of a 'whatever suits you' sort of answer, but I'm curious to know how others have gone about this/similar situation.

Thanks.


texts: Make a button in CMS page call a controller

texts:
I want to have a button on the CMS page that calls a controller. The CMS content is:

{{config path="web/secure/base_url"}}cmsmanager/export/params

This line produces the url that , if I copy it and paste into a browser, calls ExportController and the method params as expected so it looks like its configured correctly.

But the next two lines show buttons with the correct label but do not open the link:

<input type="button" onclick="window.open({{config path="web/secure/base_url"}}cmsmanager/export/params);" value="Window Open" />

OR

<input type="button" onclick="setLocation({{config path="web/secure/base_url"}}cmsmanager/export/params);" value="Set Location" />


texts: Choose between 2 designs on product page

texts:
On the shops im admin on, the users want different designs on some products. And the admin before me have made an css for each product so far.

I was wondering is there a way the user can choose what design they want on that product page?

Like in wordpress you choose what template the post/page should use.


texts: Magento 2: Encrypt Order ID in Sales Guest Form

texts:
For the guest users, I'm using https://example.com/sales/guest/form to see the order details.
Now anyone can see other customer's orders by https://example.com/sales/guest/form/order_id/100 without any validation.
if ($request->getParam('order_id')) {
        $orderId = $request->getParam('order_id');
        $order = $this->getOrderRecordById($orderId);
        if ($order) {
            $request->setPostValue('oar_order_id', $order->getIncrementId());
            $request->setPostValue('oar_type', 'email');
            $request->setPostValue('oar_email', $order->getCustomerEmail());
            $request->setPostValue('oar_zip', '');
        }
}

So how can I encrypt that order_id given by the guest and display only valid order?


texts: Magento 2.2.4 place order exception error "Undefined index: product_id Issue"

texts:
I have upgraded Magento with Latest version 2.2.4 and trying to place order.It produce below exception error

  [2018-06-26 12:40:50] main.CRITICAL: Notice: Undefined index: product_id in /var/www/html/magento2/vendor/magento/module-catalog-inventory/Model/StockManagement.php on line 103 {"exception":"[object] (Exception(code: 0): Notice: Undefined index: product_id in /var/www/html/magento2/vendor/magento/module-catalog-inventory/Model/StockManagement.php on line 103 at /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php:61)"} []

I have checked in file and found that  array variable is producing error

$productId = $lockedItemRecord['product_id'];

I have tried and changed this with Hard coded then it is working fine.I am not getting what is the issue in this code.

$productId = "395";

I have already compiled all code and tested in both mode developer and production.

Please support me to resolve this issue.


texts: Magento 2 reload cart page total section

texts:
I am updating cart quantity with ajax and that is working is fine. But I cannot figure out how to reload the cart total section. I added this code but it is updating mini-cart section. Is there any section defined for that too? Need to update cart total section after ajax response.

    var sections = ['cart'];
    customerData.invalidate(sections);
    customerData.reload(sections, true);


texts: Magento grid view show out of stock banner/label

texts:
I looked for this online and nothing worked.

I want a banner/label to show on my category view (in grid mode) that a certain product is out of stuck.

I tried to add:

$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);
$qty = $stock->getQty();
if($qty <= 0)
{
Sold Out
}

after the foreach product in the grid mode but didn't work

EDIT

I also have something like this

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

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

                    <?php elseif($_product->getStockItem() && $_product->getStockItem()->getIsInStock()): ?>

<a title="<?php echo $this->quoteEscape($this->__('View Details')) ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?>

                    <?php else: ?>

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

                    <?php endif; ?>

                        <?php if ($this->helper('wishlist')->isAllow()) : ?>

<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?>

                        <?php endif; ?>
                        <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>

| <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?>

                        <?php endif; ?>


texts:
How can I query the database to get the customer Account Number?

What table will I find the customer account number


texts: I am moving from one server to another server site is broken. Database works fine but issue is css and js not generating. The server is shared hosting. How can I fix the issue??


texts:
I am getting an error when using soap API:

  Couldn't load from
  'https://example.com/index.php/api/v2_soap/index/?wsdl=1' : failed to
  load external entity
  "https://example.com/index.php/api/v2_soap/index/?wsdl=1"

I am using PHP Version 7.0.32

I have checked solutions in which suggested install php_openssl.dll extension on the server. Is it required in PHP 7? openssl extension is enabled.

Please suggest any solution!


texts:
when i create block and insert like this,

$block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'reviewfororderproducts',array('template' => 'clarion/review.phtml '))->setData('data', $data);

it works fine $block->toHtml() returns a string with all html

but when i do like this

 $block = $this->getLayout()->createBlock('Clarion_ReviewReminder_Block_Allproducts', 'reviewfororderproducts',array('template' => 'clarion/review.phtml '))->setData('data', $data);

i can't get the block, $block->toHtml() returns null

my block class is only extends from Mage_Core_Block_Template

class Clarion_ReviewReminder_Block_Allproducts extends Mage_Core_Block_Template
{
    protected function _construct()
    {
        parent::_construct();
    }
}


texts: Magento 2 Entreprise - Cancel Contract before its term

texts:
I would like to know if anyone has experienced the cancelation of Magento (2) entreprise before its term length.
For example we have a contract with a 5 years lenght.
About 6 months later we recognize that Magento 2 enterprise isn't really suitable and valuable for some reasons (add more complexity and more time to develop, page builder is just ... no thanks etc...)
The site isn't even in production.
The purpose of the 5 year length contract was to have a discount compare to 1 year length contract.
Can we cancel the subscription ? If yes at which cost ?
License Term Length (Years) : 5
On expiration of each License Term, this Agreement shall automatically renew for additional period(s) for the same duration as the initial License Term (each a "Renewal License Term"), unless either Party provides the orther Party with notice of non-renewal at least 30 days prior to the expiration of the initial License Term or Renewal License Term, as applicable.
Thank you in advance,
PS : country is FR


texts: Orphan products in catalog_product_entity

texts:
I have three odd products in my catalog_product_entity table.  I can't tell where they are from or why they are there. They do not come up if I put the ID into the magento "manage products".  They have no attributes assigned to them in any of the catalog_product_entity_* tables.

id   - SKU
2554 - - Yellow|product_list::N|product_list_child::|vm_list_header::|v
2604 - - Yellow|product_list::N|product_list_child::|vm_list_header::|v
2605 - - Yellow|product_list::N|product_list_child::|vm_list_header::|v

From the createdat and updatedat dates, they may have been errant imports from when the previous web company made the site.  Just want to make sure before I go and delete them. Is there any other place I should look for a relation to these items?


texts:
Does the sales/quote object work differently than other objects when loading? See the following..

Works:

$quote = Mage::getModel('sales/quote')->getCollection()
    ->addFieldToFilter('entity_id', $quoteId)
    ->getFirstItem();
print_r($quote->getData()); // shows right data

Does not work:

$quote = Mage::getModel('sales/quote')->load($quoteId);
print_r($quote->getData()); // empty

Both $quote are of the correct of class, Mage_Sales_Model_Quote.


texts: Is it mandatory to install rabbit mq to work with Magento 2.3.2

texts: Is it mandatory to install rabbit mq if we are using magneto 2.3.2 or else without rabbit mq also will magento works with all scenarios


texts: I've activated rss after I published all my products. Now rss are empty and I think magento will not update them. So my think is, for social sharing purpose, to dynamically update random the rss feed to make them post products on social update. There's a way to add 3 or 4 products each day to the rss? Random or even with a logic.


texts: Magento 2 - add a new step adding new form in checkout processes

texts:
After following below procedures provided by Magento, both works properly if I implement them separately. However, I would like to combine both two tasks, which are adding a new step having a new input form on a checkout page.

http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_form.html
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_step.html

Could you please give advice how to setup XML layout and modify knockout.js files?


texts: Why is the customer account is not deleted in this code

texts:
I am trying add the Delete My Account functionality for the users in the site.There I used the following code and its execution does not results in any error.

public function deleteAction()
    {
        $id = Mage::getSingleton('customer/session')->getCustomer()->getId();
        $customer = Mage::getModel('customer/customer')->load($id);
        Mage::register('isSecureArea', true);
        $customer->delete();
        $this->_getSession()->logout()
            ->setBeforeAuthUrl(Mage::getUrl());
        $this->_redirect('/');
    }

But it does not delete the customer account.


texts:
Below is description with Example :

I have 2 sites www.severnsaleslabequip.com and www.qualimet.co.uk with same admin (backend ).

Now www.qualimet.co.uk site is no longer to needed so I want to redirect it to www.severnsaleslabequip.com/index.php/metallurgy-and-microscopy/metallurgy.html using index.php or .htaccess.

Right now I am using index.php file to redirect site but it's not working perfect.

I have placed below code to my index.php file to redirect site

if ($_SERVER['HTTP_HOST'] == "qualimet.co.uk") {
header('Location: http://www.severnsaleslabequip.com/index.php/metallurgy-and-microscopy/metallurgy.html');
die;
$mageRunCode = "qualimet";
$mageRunType = "website";
}

So when I enter url www.qualimet.co.uk it should be redirect to www.severnsaleslabequip.com/index.php/metallurgy-and-microscopy/metallurgy.html but not in my case.

And if I want to redirect site using .htaccess how can I do?

So please show me both the way (using index.php and .htaccess) to redirect site.
Thanks.

UPDATE

I have add below code to my .htaccess (**on magento root path) file.

 RewriteEngine on
RewriteCond %{HTTP_HOST} !http://www.qualimet.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.severnsaleslabequip.com/index.php/metallurgy-and-microscopy/metallurgy.html [L,R=301]

But when I enter www.qualimet.co.uk in url it's go into loop like http://www.severnsaleslabequip.com/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html/index.php/metallurgy-and-microscopy/metallurgy.html


texts: Odd text characters appearing next to menus, in links and replaced social media links on Theme256K

texts: We have suddenly found text characters next to the menu items on our site.  Links for catalogue products also have a | symbol which is not normally there, and the small thumbnails for the social media links have been replaced by text. I have scoured the system settings to see why this has happened and can find nothing that gives and clues. The domain is http://www.havdirect.co.uk


texts: Magento 2 - How to show product grid in my custom module?

texts:
I created a custom module,in that module I want to display product
  listing grid based on selection I want to do some different operations
  for selected product in frontend.Can anyone help me how to show
  product listing grid (like product listing showing in admin product
  page).


texts: 403 Forbidden for direct URL access of custom module file

texts:
I am working on a specific PHP file in my custom module and would like to run it in a browser to debug but am getting 403 Forbidden.

Is there a way to directly access http://domain.com/app/code/local/Namespace/ModuleName/Model/Filename.php?

Alternatively, is there a better way to be testing specific module files?


texts: Where does Magento store placeholder images?

texts:
As per the title, I'm trying to establish which directory Magento stores the placeholder images which you set up in:

System → Configuration → Catalogue → Product Image Placeholders

Any ideas?


texts: Magento rewrite 'Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option' not working?

texts:
below is my config.xml files code with path.

  app/code/local/Eventprice/Meta/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Eventprice_Meta>
            <version>0.0.1</version>
        </Eventprice_Meta>
    </modules>
    <global>
        <models>
            <eventprice_meta>
                <class>Eventprice_Meta_Model</class>
            </eventprice_meta>
        </models>
        <resources>
            <eventprice_sql>
                <setup>
                    <module>Eventprice_Meta</module>
                </setup>
            </eventprice_sql>
        </resources>
        <blocks>
            <settings>
                <class>Eventprice_Meta_Block</class>
            </settings>
            <adminhtml>
                <rewrite>
                     <catalog_product_edit_tab_options_option>
                        Eventprice_Meta_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option
                    </catalog_product_edit_tab_options_option>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>
</config>

Below is my Option.php file code with path.

  code/local/Eventprice/Meta/Block/Adminhtml/Catalog/Product/Edit/Tab/Options/Option.php

<?php
class Eventprice_Meta_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option
extends
Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option
{
    public function __construct()
    {
        parent::__construct();
        $this->setTemplate('sphere/catalog/product/edit/options/option.phtml');
        $this->setCanReadPrice(true);
        $this->setCanEditPrice(true);
    }

}

and below is the path of my template file.

  /app/design/adminhtml/default/default/template/sphere/catalog/product/edit/options/option.phtml

i didn't change anything in code.

but the rewrite is not working my template file is not called. please correct me where i create a mistake. Thanks


texts:
What is the maximum session life time for the frontend customers in magento2?

Also, Is the session lifetime depends on session.gc_maxlifetime php variable?

Any help please?


texts: Pass data to getChildHtml() in foreach loop - Magento 2

texts:
I'm trying to pass data to a block within a foreach loop.

I've created a new block search.phtml and added it to my layout.xml as follows:

       <block class="Magento\CatalogSearch\Block\Advanced\Form" name="catalogsearch_advanced_form" template="Amrita_CatalogSearch::advanced/form.phtml">
                    <block class="Magento\CatalogSearch\Block\Advanced\Form" name="catalogsearch_advanced_search" template="Amrita_CatalogSearch::advanced/search.phtml">
                        <arguments>
                            <argument name="my_arg" xsi:type="string">testvalue</argument>
                        </arguments>
                    </block>
</block>

I want to set the value of my_arg dynamically within a loop and render the search block, where i will retrieve the value of my_arg.

i've tried the following within the parent block:

$block->GetChild('search')->SetData('my_arg', $_code);
                            $block->getChildHtml('search');

and then to retrieve:

$_code = $block->getData('my_arg')

This throws an error:

Invalid method Magento\CatalogSearch\Block\Advanced\Form::GetChild(Array
(
    [0] => search
)
)

What's the correct way to achieve this?


texts: "404 page" and CSS problems after successfully completing Magento2 installing wzard

texts:
folks,

I am working on Ubuntu 14 and I followed this short video to install Magento2. I've also used some installation guidelines from Magento website.
I've passed the readiness check successfully and I have completed the installation also successfully with no errors or even one warning.

Now the problems that I'm facing:

When I try to open http://127.0.0.1 this opens a broken, not organized, not aligned, and not formatted page. I did a search on the net and I found that it is a problem related to something called CSS, which I don't know what it is and how to fix.
If I try to open 127.0.0.1/admin (and I'm sure that the link is correct) I get that 404 Not Found page!

For god sake help :( ... I've been working on fixing this for a week!
But Please use simple words and detailed steps; as I'm not deep in IT things ... when you suggest a solution please tell me exactly how to do it ... when you want me to change something in any file or any configuration, please tell me where it is exactly or how to find it.

thanks in advance


texts:
Let me go directly with an existing sample. I have a product with entity_id=319 that as I'm seeing in sales_flat_invoice table has a discount_amount equal to -100000.

I want to know from where this discount has been input but I have no idea. I know it may come from a promotion rule or a coupon code but couldn't make a relation between these three.

It would be helpful if a relationship between db tables could be pointed out.


texts: Magento-2 get all products having product qty less than 5 only

texts:
I'm trying to get product collection, only the products which have the qty less than 5 in Magento 2, but I'm failing to load.

use Magento\Framework\App\Bootstrap;
require DIR . '/../app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$productCollection = $obj->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$collection = $productCollection->create()
->addAttributeToSelect('*')->load();
$collection->addAttributeToFilter('qty',['lt'=>5])


texts: Need Clarity on Bulk import methods in Magento

texts:
I have seen that we have import/export option for bulk products. My question is what is the difference between 1.import product 2. export product and DataFlow-Profiles.

In Dataflow profiles also, import all products and export all product options are there. Why there are two kind of import/export options available and what is the difference?

Please refer the image,and my question is  what is the difference between option 1 and option 2?

when we click the option2 we are getting below window.


texts: Force login to catalog and product pages in magento 2 custom theme

texts:
I have found this module :

https://github.com/bitExpert/magento2-force-login

But this show errors in Frontend -

1 exception(s):
Exception #0 (ReflectionException): Class BitExpert\ForceCustomerLogin\Controller\LoginRouter does not exist

Exception #0 (ReflectionException): Class BitExpert\ForceCustomerLogin\Controller\LoginRouter does not exist
#0 C:\wamp64\www\sk\vendor\magento\framework\Code\Reader\ClassReader.php(19): ReflectionClass->__construct('BitExpert\\Force...')
#1 C:\wamp64\www\sk\vendor\magento\framework\ObjectManager\Definition\Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('BitExpert\\Force...')
#2 C:\wamp64\www\sk\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('BitExpert\\Force...')
#3 C:\wamp64\www\sk\vendor\magento\framework\ObjectManager\ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('BitExpert\\Force...', Array)

Any options to force login in catlog and product page without module


texts: Magento2 can not update to Version 2.3.0

texts:
I'm trying to upgrade magento 2.2.2 to 2.3.0.

Php version 7.1.19(>7.1.3+)
i have run command :

...
composer update
php bin/magento cache:flush
php bin/magento setup:upgrade

======O/p=====

Module 'Magento_Variable':
Module 'Apptrian_ImageOptimizer':
Module 'Magento_Backend':
Module 'Magento_Config':
Module 'Customweb_Base':
Module 'Magento_Eav':
Module 'Magento_AdminNotification':
Module 'Magento_Indexer':
Running schema recurring...
Module 'Emipro_Custompayment':
Module 'Magento_Customer':
Module 'Magento_Cms':
Module 'Magento_Catalog':
Running schema recurring...
Module 'Magento_Quote':
Module 'Magento_Email':
Module 'Magento_Rule':
Module 'Magento_SalesSequence':
Running schema recurring...Unique constraint violation found


texts: How to make Choose an Option the default on drop down for configurable products?

texts:
When I make a configurable product, I would like the default selection on the drop-down to be "Choose an Option..." (as apparently it should be).

For example, for a product I have:

Choose an Option...
Yes, add accessory +$9.99
No, do not add accessory

When I view the product on the frontend, the default selection is "Yes, add accessory +$9.99" instead of "Choose an Option..." like it should be and thus makes the default price $9.99 higher than it should be.

How do I fix this? I suppose I could make simple products and just add these options as Custom Options, but it will not track inventory if I do it that way.


texts: Need City and its zones drop down in customer shipping form

texts: For magento 1.9.2.4, i need city and its zones drop down in customer shipping form, an extension would be excellent as programming give errors.


texts: OnePageCheckout How to get customers shipping postal/zip code?

texts:
I want to collect a users postal code from the form input on the onepage checkout and show the result in a later checkout step before they submit the order.

<input type="text" class="input-text validate-zip-international  required-entry validation-passed" value="" id="billing:postcode" name="billing[postcode]" title="Zip/Postal Code">

What is the best way of achieving this please?


texts: How to Disable Shipping info and method for custom product type in magento

texts:
I have created a custom product type extending simple product.I need to disable shipping information and shipping method for this product type on onepagecheckout just like it is disabled for virtual product. I cannot use virtual product and cannot extend from virtual product.

Please provide the any config or solution.

Thanks


texts: How to validate email Domain name in magento?

texts:
In magento the email check only for "@" and "." validation but it is not validating the domain name.
For example : abc@xyz.in  is been accepted in magento.
Please help me to validate the domain names
Thank You


texts: How to find checkout_submit_all_after event

texts:
Is there any way  to find how much or who is using/listing specific core event ?

I want to find,On my Magento which extensions are using event "checkout_submit_all_after" .

Please help me for this..


texts: Magento 2: Getting dynamic url of image from media browser in js

texts:
So I have been building an extension to allow me to insert images into the textarea block of blocks and pages with custom styles. I call the MediabrowserUtility and am able to get a long funky url into a hidden input box, but this url doesn't work on the frontend and seems like I need a dynamic url in the form of {{media url="wysiwyg/banner_image"}}

Here is my js code:

/* my_js.phtml */
<?php
    $sourceUrl = $block->getUrl('cms/wysiwyg_images/index',
    ['target_element_id' => 'tce-image-chooser', 'type' => 'file']);
    $mediafn = 'MediabrowserUtility.openDialog(\'' . $sourceUrl . '\', 0, 0, \'MediaBrowser\', {});';
?>
<script>
require(['jquery'], function ($) {
    let openGallery = () => { <?= $mediafn ?> };

    let listener = null;

    $('#insert_image').click(evt => {
        clearInterval(listener);

        let image_selector = $('#tce-image-chooser')[0];
        let initVal = image_selector.value = 'tce-empty';

        openGallery();
        listener = setInterval(() => {
            if(image_selector.value !== initVal) {
                let url = image_selector.value;
                /* Do something with url */
            }
        }, 250);
    });
});
</script>

So currently the url I get is of the form: https://domain.com/admin/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvS2FmZmViX25uZXIucG5nIn19/key/a9b2feeed684ea00c0f02365f97a01627a14e7c2a6fa603a76e48b616a2e9bfa/ but I need it to be a dynamic url such as {{media url="wysiwyg/banner_image"}}

Any help or ideas will greatly be appreciated.


texts: get.php in server logs - security issue?

texts:
I noticed multiple hits per day on get.php in the access logs of a Magento 1.14 store, resulting in PHP errors and a HTTP 500 response.

Some of them have bot user agents like facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php) or  Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm), some come from Outlook and most do not have a user agent at all, but often from the same few IP addresses at the same time of day.

Is there a logical explanation for that other than somebody is trying to gather information or exploit security holes in get.php? We never used the feature to store images in the database, so there is no legit usage for this script.

I reckon, it is safer to delete the file to eliminate a possible attack vector, but first I'd like to understand what could be going on there. Any ideas?


texts: Change JPG compression settings in Magento2

texts:
Our uploaded product images are appearing on the website with JPG artefacts.

Is there a way to change the JPG compression settings in Magento 2?


texts: What Happens if i kill php process while magento site is running

texts:
I want to know that what happens if i kill php process from my godaddy hosting account while somebody is placing an order on my website. does that effect my site anyway?.

after killing php process my site works more faster.


texts:
I'm using "AW blog" in Magento 1.9.3.2. On the homepage I've got the recently added blogs with the date, the date is now showing: 29 May 2017. How can I change that into Dutch like; 29 Mei 2017? I've tried several thing I found on the internet but I couldn't get it to work :(

This is the code:

<div class="lt-blog-info <?php if($i==1) echo $this->__('info-first-blog')?>">

        <a title="<?php echo substr($post->getTitle(), 0, 25);?>" href="<?php echo $post->getAddress(); ?>"><?php echo substr($post->getTitle(), 0, 25); ?>

        <?php
            $date = $post->getCreatedTime();
            $dateToShow = date('j F Y',strtotime($date));
            echo $dateToShow;
        ?>

        <?php echo substr(strip_tags($post->getShortContent()), 0, 120);  ?>


texts: load style-m only in sub domain but and in main domain load style-l

texts:
I was looking forward to load mobile style like style-m.less only to sub domain

Ex in m.domain.com Magento 2 will only load style-m.css or style-m.less, and in domain.com Magento will load only style-l.css or style-l.less.

But I don't know where to start here. Can any one give me a hint or how to do this is very much appreciated?


texts: Magento 2 offers easy integration to RabbitMQ, but why and when do I need RabbitMQ installed in my store?