texts: Need to override edit.phtml on cart page to add new button near it

texts:
I need to add new button near edit button on cart page. I want o override edit.phtml in my custom module.  Can someone guide me how to achieve this?

  vendor/magento/module-checkout/view/frontend/templates/cart/item/renderer/actions/edit.phtml


texts: Only show active store groups within store selectors

texts:
I have a problem where the admin order creator shows a store selector when creating a new order or a customer, but it shows all the store (groups) we have in our store. Not all of these stores are active anymore

I would like to know if there's an easy way to make the store selector only show active stores as my employer isn't ready to delete the old stores yet. The site itself has a total of 9 stores in the backend, but only 4 are active on the frontend.

We're running Magento 1.7.


texts: Magento 2 Load REST API cart quote on frontend via URL

texts:
I want to load a previous generated quote in magento 2 using REST API. Directly on frontend using custom URL like "/myurl/cart/index" that should redirect to "/checkout/cart" with the products loaded. That I'm doing in API is the following:

  1) POST /rest/V1/guest-carts

Return something like: bca5b94b97710599026d73h358e058f7

  2) POST rest/V1/guest-carts/bca5b94b97710599026d73h358e058f7/items

{
  "cartId": "bca5b94b97710599026d73h358e058f7",
  "cart_item": {
    "quote_id": "bca5b94b97710599026d73h358e058f7",
    "sku": "mysku",
    "qty": 1
  }
}

the above return the item added. Then:

  3) GET /rest/V1/guest-carts/bca5b94b97710599026d73h358e058f7

That return cart object:

{
    "id": 21,
    "created_at": "2018-07-30 18:07:14",
    "updated_at": "2018-07-30 18:32:21",
    "is_active": true,
    "is_virtual": false,
    "items": [
        {
            "item_id": 2,
            "sku": "mysku",
            "qty": 1,
            "name": "Test",
            "price": 150,
            "product_type": "simple",
            "quote_id": "5"
        }
    ]
}

  4) Then I've managed to load the quote in my controller with route "/myurl/cart/index" and I can see my quote loaded, something like:

Array
(
    [entity_id] => 21
    [store_id] => 1
    [created_at] => 2018-07-30 18:07:14
    [updated_at] => 2018-07-30 18:32:21
    [converted_at] =>
    [is_active] => 1
    [is_virtual] => 0
    [is_multi_shipping] => 0
    [items_count] => 1
    [items_qty] => 1.0000
    [orig_order_id] => 0
    [store_to_base_rate] => 0.0000
    [store_to_quote_rate] => 0.0000
    [base_currency_code] => USD
    [store_currency_code] => USD
    [quote_currency_code] => USD
    [grand_total] => 150.0000
    [base_grand_total] => 150.0000
    [checkout_method] =>
    [customer_id] =>
    [customer_tax_class_id] => 3
    [customer_group_id] => 0
    [customer_email] =>
    [customer_prefix] =>
    [customer_firstname] =>
    [customer_middlename] =>
    [customer_lastname] =>
    [customer_suffix] =>
    [customer_dob] =>
    [customer_note] =>
    [customer_note_notify] => 1
    [customer_is_guest] => 0
    [remote_ip] =>
    [applied_rule_ids] =>
    [reserved_order_id] =>
    [password_hash] =>
    [coupon_code] =>
    [global_currency_code] => USD
    [base_to_global_rate] => 1.0000
    [base_to_quote_rate] => 1.0000
    [customer_taxvat] =>
    [customer_gender] =>
    [subtotal] => 150.0000
    [base_subtotal] => 150.0000
    [subtotal_with_discount] => 150.0000
    [base_subtotal_with_discount] => 150.0000
    [is_changed] => 1
    [trigger_recollect] => 0
    [ext_shipping_info] =>
    [is_persistent] => 0
    [gift_message_id] =>
)

Which is fine, but now I need to redirect to the cart/checkout in frontend with products loaded to display to the guest user/customer.. Is that possible without create an order?

Thanks,


texts: How to translate "Filter by" in magento 2

texts:
I want to translate Filter by text:

I have translated it in app/i18n/es_ES.csv and in app/design/frontend/.../Theme/i18n/es_ES.csv but this doesn´t work. I have tried all the possibilities:

What can I do?
Thanks


texts:
I have noobie problem. I want to rewrite the class Catalog_Model_Layer_Filter_Price. I made a module SpartakusMd_MageOverride, but it doesn't seem to work. I think the problem is in config.xml or in file path or maybe there should be more files, like a controller.

File /app/etc/modules/SpartakusMd_MageOverride.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <SpartakusMd_MageOverride>
            <active>true</active>
            <codePool>local</codePool>
        </SpartakusMd_MageOverride>
    </modules>
</config>

File app/code/local/SpartakusMd/MageOverride/etc/config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <SpartakusMd_MageOverride>
            <version>
                0.1.0
            </version>
        </SpartakusMd_MageOverride>
    </modules>

    <global>
        <models>
            <catalog>
                <layer_filter_price>SpartakusMD_MageOverride_Catalog_Model_Layer_Filter_Price</layer_filter_price>
            </catalog>
        </models>
    </global>
</config>

File /app/code/local/SpartakusMd/MageOverride/Model/Layer/Filter/Price.php:

class SpartakusMD_MageOverride_Catalog_Model_Layer_Filter_Price extends Mage_Catalog_Model_Layer_Filter_Price {

    protected function _getItemsData()
    {
        die('inside');
    }

}

Edit

I forgot to add <rewrite> xml tag. But now I have another problem a include error.

Warning: include(SpartakusMD/MageOverride/Catalog/Model/Layer/Filter/Price.php): failed to open stream: No such file or directory  in /var/www/clients/client1/web97/web/lib/Varien/Autoload.php on line 93


texts: How to add extra image field in Manage Products Form?

texts: How to add extra upload files field in Magento admin manage products section?


texts:
I see the system log is getting really big, it was about 6GB today. In the system log I see this:

Does anyone know what it means and how I can solve this?


texts:
today i have installed an extension "mageplaza banner slider" using following composer command

composer require mageplaza/module-banner-slider

after running this command

Using version ^2.0 for mageplaza/module-banner-slider
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing mageplaza/module-core (1.4.6): Loading from cache
  - Installing mageplaza/module-banner-slider (2.0.3): Loading from cache
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files

after setup:upgrade when i had refreshed my home page all i got is a blank home page. anyone who ever faced this issue or know anything about this. Thanks


texts:
A customer made a order but he got that same order number was already created in magento , so his order number was not imported in magento and was not sent to paypal .

After a research on magento blogs i found :

It's entirely normal to have one out of sequence like that, be previous to the current allocated numbers and a month or more old. The secret to it is that it was a logged in customer who didn't complete the order after a certain critical stage, came back, logged in and decided to finally buy.

The quote with the allocated Sales Order number uses that number for the Sales Order number.

can we make it so that it will not hapen again with any other customer please ?

Thanks
Kuldeep !


texts: Catalog URL Rewrites Duplicate Index (HY002)

texts:
I've seen this problem all around the internet and have yet to find a reasonable solution yet. I've truncated the core_url_rewrite table, set my permissions properly, etc.

It seems there is an issue when actually performing the query, duplicate data is being inserted into the table, and no exception is thrown, causing the script to hang indefinitely. All other indexes work fine. The table has about 300,000+ records. So any number of these could be causing an issue.

I've pruned the database to make sure products do not share the same SKU, as that was also one of the recommended solutions. I'm not exactly sure what the indexer is doing specifically that would cause this conflict. Any suggestions are greatly appreciated!


texts: Admin Panel order grid: Multiple sort conditions?

texts:
I am wondering if it's possible to specify multiple sorting conditions for the order grid in the Admin Panel.

Let's say for example I wanted to sort all orders first by their Bill to Name and then the Purchased On column. Any ideas how that can be done?

I have looked at the code but I got stuck at the Varien_Data_Collection_Db::_setOrder method, with no idea how to implement a solution there:

private function _setOrder($field, $direction, $unshift = false)
{
    $this->_isOrdersRendered = false;
    $field = (string)$this->_getMappedField($field);
    $direction = (strtoupper($direction) == self::SORT_ORDER_ASC) ? self::SORT_ORDER_ASC : self::SORT_ORDER_DESC;

    unset($this->_orders[$field]); // avoid ordering by the same field twice
    if ($unshift) {
        $orders = array($field => $direction);
        foreach ($this->_orders as $key => $dir) {
            $orders[$key] = $dir;
        }
        $this->_orders = $orders;
    } else {
        $this->_orders[$field] = $direction;
    }
    return $this;
}


texts: Magento 2: Load storeview id in controller returns error

texts:
I loaded following class into my controller:

use Magento\Store\Model\StoreManagerInterface;

And injected it in my constructor:

StoreManagerInterface $storeManagerInterface,

However it returns following error:

Exception #0 (Magento\Framework\Exception\RuntimeException): Type Error occurred when creating object: Qxs\Verkoopje\Controller\Index\Index\Interceptor

How to load the storeManager in my controller?


texts:
I wanted to remove Shipping method under checkout in magento.

I used this extension "Magetitan skippshipping method" using " Direct package file upload."

But it did't works. after that i copied every files into respective folder.

but still it's not working.

Can anyone give me the "Paste key extension" to remove or skip "shipping method."

I used zip format in windows . but i can't able to install magento extensions using Direct package file upload.

How to install magento extension properly using " Direct package file upload."

Thanks in Advance.


texts: Validation for Zip code with only 6 numbers & Digits in view page

texts:
in Product view page we are displaying textfield to

enter zip code and find shipping is available or not .

We want to validate with only numbers & 6 digits.

if we enter other than above condition, it should give error as Invalid Zip code.

<?php if ($this->isFieldVisible('postcode')): ?>

<label for="search"<?php if ($this->isFieldRequired('postcode')):?> class="required" <?php endif;?>><?php if ($this->isFieldRequired('postcode')):?>*<?php endif;?><?php echo Mage::helper('webdevlopers_productpageshipping')->__('') ?>

<input placeholder="Enter your PIN Code" class="input-text validate-postcode<?php if ($this->isFieldRequired('postcode')):?>
required-entry<?php endif;?>" type="text" id="estimate_postcode" name="estimate[postcode]"
value="<?php echo $this->htmlEscape($this->getFieldValue('postcode')) ?>" onkeydown="if (event.keyCode == 13) { return false;}" />

<?php endif; ?>


texts: Problem overriding scss files in rwd theme

texts:
I'm having a strange issue with compass compilation, it seems that even though i have overridden rwd scss files such as /mixin/_typeography.scss, the old copy is still being used for compilation by the @include h2 reference in _product-list.scss, but (correctly) the new copy is being used by _common.scss.

If i go to the mixin folder of the rwd theme and rename _typeography.scss its all fine.

I get the same results with a compass watch batch file or using grunt contrib-watch-sass.

I've tried deleting the sass-cache - no difference.

Config.rb is as follows:

require 'susy'

http_path = "/skin/frontend/tpt_rwd/default/"
add_import_path "../../../rwd/default/scss"

css_dir = "../css"
sass_dir = "../scss"
images_dir = "../images"
javascripts_dir = "../js"
fonts_dir = "../fonts"

relative_assets = true
output_style = :compact
environment = :development

and grunt config is:

options: {
      http_path: 'skin/frontend/tpt_rwd/default/',
      cssDir: 'skin/frontend/tpt_rwd/default/css/',
      sassDir: 'skin/frontend/tpt_rwd/default/scss/',
      imagesPath: 'skin/frontend/tpt_rwd/default/images/',
      javascriptsDir: 'skin/frontend/tpt_rwd/default/js/',
      fontsDir: 'skin/frontend/tpt_rwd/default/fonts/',
      importPath: 'skin/frontend/rwd/default/scss/',
      relativeAssets: true,
      outputStyle: 'compact',
      environment: 'development'
}

Obviously this is really holding me up, and really causing me to scratch my head! i know i could just copy all the sass to my theme and remove the import in config, but it seems silly to have to. What am missing\doing wrong?


texts: configurableSwatches not working after update

texts:
I've updated from 1.8 to 1.9.3.10
I've managed to make the update after several problems, but in the end what has worked was:
(I'm working on a dev site to "try" the update procedure)

1) update everything the connect manager highlighted with the last stable version
2) copy all the 1.9.3.10 files from a fresh package on he server (this was done to solve one of the update issues, as a test, and it worked)
3) copied the local.xml and all the theme files into the new updated system.

now, if I:
set app/etc/modules/Mage_ConfigurableSwatches.xml to "false" I can see the frontend.

if I set it to "true" the frontend goes blank, and in the system.log these lines are logged:

2018-11-06T12:44:23+00:00 ERR (3): Warning: include(/home/ggservice/ivsanbernard/app/code/core/Mage/ConfigurableSwatches/Model/Resource/Catalog/Product/Type/Configurable/Product/Collection.php): failed to open stream: No such file or directory  in /home/ggservice/ivsanbernard/lib/Varien/Autoload.php on line 94
2018-11-06T12:44:23+00:00 ERR (3): Warning: include(): Failed opening 'Mage/ConfigurableSwatches/Model/Resource/Catalog/Product/Type/Configurable/Product/Collection.php' for inclusion (include_path='/home/ggservice/ivsanbernard/app/code/local:/home/ggservice/ivsanbernard/app/code/community:/home/ggservice/ivsanbernard/app/code/core:/home/ggservice/ivsanbernard/lib:.:/usr/share/php:/home/ggservice/ivsanbernard/app/code/local/TypoStores/Less/Model')  in /home/ggservice/ivsanbernard/lib/Varien/Autoload.php on line 94

also, if I go in the backend, in the configuration of the configurable swatches, clicking on the link to "configure" them, a 404 page in admin is presented.
I've also tried to switch to the default theme, but the frontend keep being blank.

what can I do? may I "reinstall" that configurableswatches? how?


texts: Get userid of the admin logged in magento 2 helper

texts:
Trying to get admin user id in Magento 2 helper,
in new at magento 2 any help will be appreciated.


texts: PayPal Express not giving option for Check out as Guest, even if it is active (PayPal Paying Guest option to YES)

texts:
I had some problems with paypal settings in Magento 1.7.0.2.

The problem is this: I am using using paypal express (I have my account created and verified Paypal Company). It has active PayPal Paying Guest option set to YES, but when a user in my shop will complete your purchase and pay with Paypal will be the option PayPal API perfect, but does not show me the option to pay without paypal account. I have VERIFIED ALL settings in Magento Admin Panel and everything "seems to be fine".

I have also tried making a new store to rule out any configuration already had my store "old", that might not let me do my Enable PayPal Guest Checkout, but still have the same problem. I look forward to your help to solve the problem, since I have no idea what else to do on my page. thanks


texts: Magento 2 custom payment method not rendering in frontend

texts:
I have tried to create custom payment method in magento2, when i tried to configure it is coming in the backend, but not in the front end.

I ham trying to like purchase order and follow the step of core module Magento_Offline-payments. please suggest me how to debug the issue.


texts:
When I try to connect to magenento api through soap with this code:

//soap call test
    $client = new SoapClient('https://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client->login('user', 'key');

$result = $client->call($session, 'catalog_product.info', '930569');
var_dump($result);

//If you don't need the session anymore
$client->endSession($session);

I get this error:

Got error 'PHP message: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from <URL>  : Extra content at the end of the document

Everything is enable the user and role, I cannot figure out what is the problem.


texts: Is there a way to limit the backorder qty?   ie:  I want to allow a product to get back-ordered, but only by a few


texts:
$websiteId  = $this->storeManager->getWebsite()->getWebsiteId();

    // Instantiate object ( this is the most important part )
    $customer   = $this->customerFactory->create();
    $customer->setWebsiteId( $websiteId );

    // Preparing data for new customer
    $customer->setEmail( 'email1@gmail.com' );
    $customer->setFirstname( 'name1' );
    $customer->setLastname( 'name2' );
    $customer->setPassword( '123456' );
    $customer->setData( 'isAdmin', 1 );
    // Save data
    $customer->save();


texts: Magento 2.0.2 installation, fatal error: DOMDocument

texts:
I am trying to install Magento 2.0.2 on a GoDaddy "Ultimate Linux Hosting with cPanel" server. When I open the page I am given this error:

  Fatal error: Class 'DOMDocument' not found in
  /home/intx/public_html/dev/vendor/magento/framework/Config/Dom.php on
  line 364

I have tried looking all over and can not figure out what I am supposed to do to fix this.


texts:
I got this block:

  \Magento\Sales\Block\Reorder\Sidebar

On page it is within the div sidebar-additional which is located on the right side.
However I want the sidebar to be located on the left side.

Here it is being set:

<referenceContainer name="sidebar.additional">
    <block class="Magento\Sales\Block\Reorder\Sidebar" name="sale.reorder.sidebar" as="reorder" template="reorder/sidebar.phtml"/>
</referenceContainer>

How can I do that?
Thanks!


texts: Checkout one page doesn't load next step

texts:
I'm using Magento 1.9.2.4 and facing an issue with Onepage checkout. It's not moving to next step when I click on "Continue" button.

I didn't find any errors in browser console.

Site URL: http://handasia.net/en/

Any help would be appreciated.


texts: How to send custom invoice as attachment through mail

texts: Hi I have created a custom invoice.Its saving in one of the magento root folder.How to send the file as attachment in mail.


texts: Address validation in magento 2 checkout page and address book

texts:
I am facing an issue with invalid address inputs by customers. I have implemented paypal integration in my magento 2 site. If the user enter an invalid address, paypal is rejecting the payments.

I have searched out for a address validation plugin and nothing found. And someone are too expensive to buy. Can anyone suggest me some address validation plugins for address validation in magento2?

Or how can I write my own validation plugin there, I have a state table and a zipcode table(this table contains city too).

I tried with https://github.com/Nabooru/module-address-validation-core but I don't get the list of adapters to check with.

My magento version is "2.1.2" and  I need a city, state and zipcode combination validation.


texts: Restrict the unauthorized users from the magento site

texts:
Customer can register the details as usual in magento site.  Admin can view the registered customer details via admin dashboard. Once admin can approve the details valid customers can able to login into the site invalid customers in the sense they need to be resticted from the usage of the site.

This is the concept but I don't know how to do.. Please share your valuable comments.


texts: For magento 2.3.4, what is the best option to adopt PayPal Payments Pro (or) PayPal Payments Advanced

texts: For my US customer which is the best option to adopt? PayPal Payments Pro or PayPal Payments Advanced?


texts: Magento 2 : Reset filters in a collection such as addFieldtoFilter, addAttribute to filter etc

texts:
I want to deploy following logic ;

 - Load product collection

  *start loop*

 - Extract the value with which I filter collection.

 - Filter based on above attribute to see if the product is there.

 - Reset the collection so I can use the same collection for filtering
   again

    *end loop*

But I do not know how to reset filters in a collection such as addFieldtoFilter, addAttribute to filter etc.
Any help would be appreciated.


texts: How to create admin menu to call a function (replacing cronjob)

texts:
I have created a custom module to sync product details. There is a cron job configured to run model "my_module/Cron::syncDetail". I would like to convert this to a manual job in admin menu.

The syncDetail function in Cron.php is executing

Mage::getModel('My_Module_Model_Product')->syncDetails();

i have managed to create the admin menu drop down, however i can't figure out what to put in the action of the menu.

my question is what is the correct action to directly call the model function?


texts: I want to override these files in magento?

texts:
1. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php

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

3. app/design/frontend/rwd/default/template/catalog/product/view/options.phtml

4.app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml

How to achieve this in module ?


texts: Magento modify collection object element value

texts:
I want to modify collection object element value without using $collection->getData() as getData() is returning an array. But I want an object to be returned.

$collection = Mage::getModel('test/test')
                ->getCollection();

$i = 0;
foreach ($collection as $key => $value) {
    //$collection[$i]['flat_last_order_amount'] = '39.99';
    //$collection[$i]['products_sku'] = '4361-4361';
    $i++;
}

I tried with commented code(with using getData()) but its not working. Any other way to do this please.


texts: Magento override Mage/Core - check for enabled yes/no, if no default to core

texts:
We have code where we override Mage_Catalog_Model_Url

class SNH_CategoryParentUrl_Catalog_Model_Product_Url extends Mage_Catalog_Model_Url
{
    public function getCategoryRequestPath($category, $parentPath)
    {

in the override we check for enabled yes/no

$configValue = Mage::getStoreConfig('catalog/seo/category_use_parentcategory',Mage::app()->getStore());

if (null === $configValue || $configValue) {

So if it is null (not set) or yes (=default) the code is executed

But what I rather would have is that if the settings is null or enabled - that the whole override is not used but rather the Mage Core file (for better upgrade protection)

Question: How can I achieve this?


texts: M2 Change title of Orders and Returns page

texts:
I have tried to change the title of the Orders and Returns page with XML with the following code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <title>Orders and Tracking - Test</title>
    <link rel="canonical" src="http://www.extenderstore.com.au/sales/guest/form/" src_type="url"/>
</head>
<body>
    <referenceBlock name="page.main.title">
        <action method="setPageTitle">
            <argument translate="true" name="title" xsi:type="string">Orders and Tracking</argument>
        </action>
    </referenceBlock>
</body>
</page>

The canonical URL appears but the title does not. I have looked in vendor/magento/module-sales and I can't find an XML file which sets the title so I am assuming it is being done with a PHP function. I have done some further research and to override this I would need to make a module. How do I create this?


texts: Passing checkout shipping information to observer

texts:
I'm creating an event that will log information from this page, however, i'm not entirely sure how to log the information contained within this form upon checkout.  So, I plan to dispatch an event that an observer will listen for.  This observer will create an entry in a log file.  Currently I have something that looks like this:

<?php
Mage::dispatchEvent(
    'no_quotes_available',
    array(
        'address' => $address,
        'products' => $products
    )
);
?>

And within the observer is:

    public function log_shipping_error($observer){
        $event = $observer->getEvent();
        $date = Mage::getModel(‘core/date’)->date(‘Y-m-d H:i:s’);
        $products = $event->getProducts();
        $address = $event->getAddress();
        Mage::log('date: '.$date, null, 'noShipLog.log');
        Mage::log('products: '.$products, null, 'noShipLog.log');
        Mage::log('address: '.$address, null, 'noShipLog.log');
        return;
    }
}

My question can be condensed to:  How do I get information relating shipping information from the checkout page to my observer?

What would be the best way to get:

$products

and

$address

from checkout?


texts:
I have followed these instructions to apply the above patch - http://devdocs.magento.com/guides/v2.0/release-notes/tech_bull_207-upgrade.html and on the bottom it instructs to execute the command

cp -R magento2-updater-10.0.2/* update/

which copies files from one directory to the other. However, I received over 50 prompts asking me if I want to overwrite the current file. In future, what command do I use so it overwrites all the files?


texts: how to refresh cache for custom module only?

texts:
I'm trying to update cache for a custom module only (config.xml to be specific)
Is this possible? The situation is this that we can't refresh cache as it is live server and it'd affect the whole site.
so need a quick solution to only refresh the particular cache separately.

thanks


texts: How to add some text from helper to system config

texts:
I want to add module current version to system config.

in helper i am getting module version and show it to system config

How can i do this?


texts: Change increment customer ID from 1 to 00001 with zero padding

texts:
Is there a way to change the customer ID to start with 00001. Now it's just 1. I need this for importing into a different system.

So each customer number starting with 00001, 00002 and so on...


texts: How to move products title in products view page magento 2 using custom theme?

texts:
Actually i want to move products title in products view page using
  custom theme in magento 2


texts: interpreting controller path compared to url

texts:
I have a file as follows:

app/code/local/Mycompany/Catalog/controllers/ProductController.php

and a uniquely defined action in that file:

public function sendfriendemailAction() ..

However the URL to post to that action is as follows:

<form action=<?php echo $this->getUrl('ajax/product/sendfriendemail');?>" .. >

The string in the form action doesn't even remotely compare to the path where the actual action method is found (and BTW it does work).

How does Magento figure out that that URL maps to that location?  Thank you for insight on how Magento thinks.


texts: Magento 2.3 - What is the recommended practice for adding custom text in product page

texts:
I want to add custom text to the product page,

Here how can i achieve this task, which is the recommended way to do that: Module (or) Events Observer (or) Preference. What kind of workout safe for future version upgrade?


texts: How to delete an extension from Magento Developer Profile 'My Extensions'?

texts:
I want to submit an extension I developed to the Magento Connect Marketplace for review.
However, I uploaded a wrong Icon and I'm not able to delete it again. I uploaded the correct picture in the screenshots section and defined it as the Base Image but I can't delete the old one.
Neither can I delete the whole extension btw.
Ideas?


texts:
I am add following Functionality to seller. How to get seller following count in that page

 <?php $connectionresource = Mage::getSingleton('core/resource');
        $readconnection = $connectionresource->getConnection('core_read');
        $allrecord = $readconnection->select()->from(array('userdata'=>'followup'))
        ->where('userdata.cus_mail=?', $email);
        $alldata =$readconnection->fetchAll($allrecord);
        if(!$alldata){?>

    <form action="<?php echo Mage::getUrl('followup/index/follow') ?>" method="post" id="follow-up">
        <?php $myStatus = Mage::getSingleton('customer/session')->isLoggedIn() ?>
        <?php if($myStatus): ?>
            <input type="hidden" id="sellerid" name="sellerid" value="<?php echo $partner->getMageuserid();?>" class="Follow-up-email-sellerid">
            <input type="submit" value="Follow Up" class="Follow-up-email">
            <?php else: ?>

<a href="<?php echo Mage::getUrl('customer/account/login');?>" title="Customer Register">Follow Up

        <?php endif ?>
    </form>

            <?php $connectionresource = Mage::getSingleton('core/resource');
            $connectionWrite = $connectionresource->getConnection('core_write');
            $query = "insert into followup "
                                 . "(name,seller_id, cus_mail) values "
                                 . "(:name, :seller_id, :cus_mail)";

            $binds = array(
                              'name'    => $name,
                              'seller_id'   => $sellerid,
                              'cus_mail' => $email);
            $connectionWrite->query($query, $binds);
            //Mage::getSingleton('core/session')->addSuccess('Following');
         }
        else{?>

            <input type="submit" value="Following" class="Follow-up-email" readonly>
        <?php }?>

Also i want to restrict user follow same Seller More then one time


texts:
In app/code/core/Mage/Customer/conrtrollers/AccountController.php there is

Mage::dispatchEvent('customer_register_success',
            array('account_controller' => $this, 'customer' => $customer)
        );

How this event code i.e customer_register_success is fired in magento when dispatchEvent is called.


texts: Magento 2, how to redirect to my orders when click on My Account?

texts: Using Magento 2.2, Front-end, My Account. I want to redirect to My Order when i click My Account from pop-menu.


texts: How to save attribute field from new customer form backend to database table?

texts: I have created new attribute and got select field i.e. dropdown in add new customer form in backend. I want to save that field value into database table 'customer_entity'. How to save that field value into database?


texts: Category filter in custom admin grid in tab not working

texts:
I have created a grid under tab

Everything is working fine except the category filter,data under category column is shown using renderer. When I change the value in dropdown , the loader just keeps loading.
Please help if any one knows what I have skipped.


texts: how to generate and get the coupon code?

texts:
$generator = Mage::getModel('salesrule/coupon_massgenerator');
    $data = array(
        'uses_per_customer' => 1,
        'uses_per_coupon'   => 1,
        'qty'               => 1,  //number of coupons to generate
        'length'            => 16, //length of coupon string
        'to_date'           => date('Y-m-d', strtotime("+1 month",  time())), //ending date of generated promo
        'prefix'            => 'rev',
        'suffix'            => 'tf',
        'dash'              => 5,
        /**
         * Possible values include:
         * Mage_SalesRule_Helper_Coupon::COUPON_FORMAT_ALPHANUMERIC
         * Mage_SalesRule_Helper_Coupon::COUPON_FORMAT_ALPHABETICAL
         * Mage_SalesRule_Helper_Coupon::COUPON_FORMAT_NUMERIC
         */
        'format'          => Mage_SalesRule_Helper_Coupon::COUPON_FORMAT_ALPHANUMERIC,
        'rule_id'         => 1 //the id of the rule you will use as a template
    );
    $generator->validateData($data);
    $generator->setData($data);
    $generator->generatePool();

    $salesRule = Mage::getModel('salesrule/rule')->load($data['rule_id']);
    $collection = Mage::getResourceModel('salesrule/coupon_collection')
                ->addRuleToFilter($salesRule)
                ->addGeneratedCouponsFilter();

I have this method to generate coupon code but how can I get a coupon code.


texts: Duplicate Orders for one payment through Paypal Express Checkout Magento 1.8

texts:
When a user is trying to purchase through PayPal Express Checkout first time if billing address is not correct the payment is declined and they are redirected back to Magento

In short, the site responds to this error appropriately and as said in the doc: when the buyer's first payment is denied, the buyer is redirected back to PayPal.

The problem seems to be linked to that redirection, which creates two orders in Magento (the two payment attempts — the first being denied by PayPal — are interpreted as two different orders/invoices. The buyer is charged once.).

Thus, in the backend (Sales > Orders) we can see for the same transactionid (PayPal) :
    2 different billing address
    2 different order ID numbers (magento)
    2 different correlationid
    a « Completed » vs. « completed » payer address status (different syntax)
    an « IPN "Completed" » comment noticed on the first order

What could be done to solve this?

Thanks for helping!


texts:
I want our `example.net' route to point to a custom module we have created.

This custom module is located at app/code/Vendor/Module and the page we want to serve is /Controller/Index/Index.php

So, if you currently navigate to example.net/module you will see the page, but we want to put this page at just example.net

Is this possible in Magento?

Edit: If you don't need CMS, you can just change the 'default web URL' through the dashboard: see the accepted answer

What I've tried so far is registering the module as a CMS page using the UpgradeDataInterface class, but I am confused as to what values should go into this function:

private function createCmsPage()
{
    /** @var PageInterface $cmsPage */
    $cmsPage = $this->pageInterfaceFactory->create();
    $cmsPage->setIdentifier('page-identifier')
        ->setTitle('Page Title')
        ->setContentHeading('Content Heading')
        ->setContent('Page HTML content')
        ->setPageLayout('1column')
        ->setData('stores', [0]);

    $this->pageRepository->save($cmsPage);
}

For things like setTitle and setContent, should I be linking these up to already existing values, say in my layout files? Really stuck on this and not able to find any good documentation or conversation on the issue; it might be too much of an edge case?

I tried running the script once, with titles, identifiers that I just arbitrarily decided. The page appears in Content -> Pages, and I'm able to set the homepage at Stores -> Configuration. But when I navigate to the page I just see blank content. Feels like I am not hooking something up right.

I just want this page (that we've already built using typical module creation, with layouts, templates, controllers, blocks, etc.) to exist at the root of our site. Impossible?


texts: After magento version upgrade from 1.5 to 1.9.2.3 re-indexing not working

texts:
Last day I upgraded my Magento site from 1.5 to 1.9.2.3. But after that Re-indexing is not working. On Re-indexing it throws error:

  Cannot initialize the indexer process.

I had truncated catalog_product_index_price tables and executed repair query for my db. But no use.

Please suggest me a solution for this.


texts:
an external company needs to install its extension and they asked me to provide repo credentials to my Magento 2 site.
But I don't know what to give him. Can anyone tell me how I can generate these credentials to have them install the extension?


texts: Add to cart goes 404 redirect in Magento 2

texts:
After clicking on add to cart of any product.

It goes to 404 page. But when i cleared cache page its working fine and product added to card and cart page is totally working fine but after some day again and again i found this problem. Please help to figure out this.


texts: Custom Magento module config.xml not loading after applying security patch

texts:
I've just applied the security patches on Magento 1.9 and after that, my custom modules didn't work. I tried clearing the cache and index but nothing happened. When I tried visiting the URL of my custom module, it says 404 not found.

I tried this

die(Mage::app()->getConfig()->getNode()->asXML());

to check if my config.xml was there but it wasn't.

Here's my app/code/local/Custom/Product/etc/config.xml code

<?xml version="1.0"?>
<config>
<modules>
    <Custom_Product>
        <version>0.1.0</version>
    </Custom_Product>
</modules>
<frontend>
    <routers>
        <customproductview>
            <use>standard</use>
            <args>
                <module>Custom_Product</module>
                <frontName>customproductview</frontName>
            </args>
        </customproductview>
    </routers>
</frontend>
</config>

Here's my app/etc/modules/Custom_Product.xml code

<?xml version="1.0"?>
<config>
 <modules>
    <Custom_Product>
        <active>true</active>
        <codePool>local</codePool>
    </Custom_Product>
 </modules>
</config>

Is there anyone who experienced this issue? Thank you.


texts:
I followed Magento instruction and added the following rule in the root .htaccess file (inside IfModule mod_rewrite.c>):
RewriteRule ^(index.php/?)?rss/ - [L,R=403]

I still can access RSS request page: /index.phprss/catalog/notifystock

Any idea how to block RSS access on 1.7 magento?

https://magento.com/security/best-practices/protect-your-magento-installation-password-guessing-new-update

P.S.
I found on the website https://support.hypernode.com/knowledgebase/how-to-protect-your-magento-store-against-brute-force/

"Because the RSS endpoint is reachable under various locations, it is generally not possible to filter RSS when using Apache (without using mod_rewrite). It is recommended to upgrade to at least version 1.9.3 and disable RSS in the backend."


texts: No products on site after backup/restore database from one server to another

texts:
I'm trying to copy the database data from my production Magento 2.3.2 site to a local development site.

I created a backup of my production MySQL database with phpmyadmin like in the screenshot below.

Then on my local server, I created a new database named magento and restored my production database (named ad2f5134_newlive) into it with mysql -u root -p magento < ad2f5134_newlive.sql

Then I updated the URLs in core_config_data for my local development site.

The problem is that no products show up on my local development site.  When I go to Catalog > Products in the Admin section, I get this message:

I checked catalog_product_entity on my local development site, and all the products from my production site are in the table.

One thought I had is that it is an indexer problem, so I ran bin/magento indexer:reindex.  That gives me the following error:

General error: 1449 The user specified as a definer ('ad2f5134_newlive'@'%' does not exist...

So my two questions are:

Why are no products on the site -- even though they are in the database -- and why don't any products show up in the Admin section under Catalog > Products?
The user ad2f5134_newlive is the database user from my production site.  Something in the database must now be telling my local development site to be using the ad2f5134_newlive user to run those reindexing queries.  How do I change that user to by my local user?


texts: How to access DEFAULT_READ_RESOURCE with instance of Mage_Core_Model_Resource?

texts:
I'm trying to set set a DATETIME field in my model to NOW() using Magento's RDBMS abstractions with[1]:

/** @var $adapter Varien_Db_Adapter_Interface **/
$now = $adapter->formatDate(Varien_Date::now())
// or
$nowDateOnlyWithoutTime = $adapter->formatDate(Varien_Date::now(), false)

However, I need to get a handle on that $adapter first.  I'm trying to do this (with annotations):

$resource = Mage::getSingleton('core/resource');
#=> instance of Mage_Core_Model_Resource

Mage::log("get read connection: [{$resource->DEFAULT_READ_RESOURCE}]");
#=> get read connection: []

$adapter = $resource->getConnection($resource->DEFAULT_READ_RESOURCE);

So my question is, how do I access DEFAULT_READ_RESOURCE?

I have app/code/core/Mage/Core/Model/Resource.php open, and it defines the constant as const DEFAULT_READ_RESOURCE = 'core_read';, yet I get an empty string in my code.

With all this MVC bs bloating Magento's code, it appears I'm supposed to access class constants through instances rather than hardcoded class names--in case someone, somewhere, sometime overrides the constant in a subclass and hooks the subclass in as a replacement.

I know I can use a number of alternatives here: Mage_Core_Model_Resource::DEFAULT_READ_RESOURCE, or even 'core_read'.  But these seem counter to Magento's MVC conventions.

[1]: https://stackoverflow.com/a/13836895/1149718


texts: Get translated string programmatically in custom module

texts:
I am writing custom module in order to verify customers mobile number before checkout if the cart have products from specified type.

The message body sent to mobile operator passed to translation function

$messageContent = __('Use that code to verify').': '.$verifyCode;

The string have been translated in csv file but when I use like this to send http request to SMS gateway server it goes to the mobile like below:

{{{TRANSLATED_STRING}}{{TRANSLATED_STRING}}{{ENGLISH_STRING}}{{THEME_KEY}}}

How can I get the string for every store view in code

Edit:

After @Max Stsepantsevich answer I turned off the inline translation and now I get only the English string.

I have that line in my custom module to translate

  "Use that code to verify ","أستخدم هذا الكود للتفعيل
  ",module,Magento_Bundle

I added the following piece of code to emulate the store view but still get the english only see below:

$resolver = $this->om->get('\Magento\Framework\Locale\Resolver');

$resolver->emulate('2');//store view id
$content = urlencode(__('Use that code to verify '). $verifyCode);

$sender->send($content);
$resolver->revert();

Thanks in advance


texts:
I am Create a extension vendor attribute extension . I need to get all the vendor attributes in a grid format. My resource model is like this.

$entityTypeId = $this->entityModel->setType(
    \My\Marketplace\Model\Vendor::ENTITY
    )->getTypeId();

   //echo 'entityId'.$entityTypeId;
  parent::_initSelect();
  //Join eav attribute table
  $this->getSelect()->joinLeft(
  ['eav_attribute' => $this->getTable('eav_attribute')],
  'eav_attribute.attribute_id = main_table.attribute_id'
  );
    $this->getSelect()->where('eav_attribute.entity_type_id=?',$entityTypeId)->order('main_table.attribute_code','DESC');

When i run this query getting below error message.both tables having attribute_code field here.

Integrity constraint violation: 1052 Column 'attribute_code' in order clause is ambiguous, query was: SELECT `main_table`., `eav_attribute`. FROM `my_marketplace_vendor_form_attribute` AS `main_table`
LEFT JOIN `eav_attribute` ON eav_attribute.attribute_id = main_table.attribute_id WHERE (eav_attribute.entity_type_id=9) ORDER BY `main_table`.`attribute_code` ASC, attribute_code ASC

I have another issue as well. When i try to save data to database it is giving error like this

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
         $data[]= array(
         'attribute_id' => $model->getId(),
         'attribute_code' => $attributeCode,
          'is_visible' => $is_visible,
          'sort_order' => 0,
          'store_id' => 0,
          'use_in_registration' => $use_in_registration,
          'position_in_registration' => 0,
          'use_in_left_profile' => 0,
          'fontawesome_class_for_left_profile' => 0,
          'position_in_left_profile' => 0
          );
          $objectManager->get('My\Marketplace\Model\Vendor \Form')->insertMultiple($data);

It is giving following error message.But data is inserting finely in database.

Notice: Array to string conversion in /var/www/html/b2b/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228


texts: How to add custom validation rule to billing address field Magento 2

texts:
I am using magento 2.1.7. I have added vat field to billing address form. I want to add custom field validation. i have added below code.

Added below validation to phtml file

But my custom validation not working. Magento required field validation is working fine. Can anyone help me.


texts:
I need to change the name value from

lib/Zend/Locale/Data/de.xml

I have there two lines:

    <territory type="HK">Sonderverwaltungszone Hongkong</territory>
    <territory type="HK" alt="short">Hongkong</territory>

Magento is loading the first line while I'd need the second one. As there is the alt="short" I think I miss some setting somewhere.
How to adjust that update save (not changing the given file)


texts: Get value from apscustomer_entity_varchar

texts:
I created a customer attribute in backend magento, but I want to show this attribute to the user so that he can alter its value in the frontend. My input field is being displayed in the frontend, but the value is not there. I am not able to get this value. I found that the value that I need to display is in the apscustomer_entity_varchar table and the collumn is called 'value'. How can I get that value from that table? I am trying this:

$collection = Mage::getModel('eav/entity_attribute')->getCollection();
foreach ($collection as $data) {
  return $data;
}

How can I get the value collumn from my apscustomer_entity_varchar table?


texts: Fastest way to index a new product i Solr with EE 1.14.0.1?

texts:
I'm setting up a site on EE 1.14.0.1 with Solr search. Whats the fastest way to get a new product indexed in Solr (as in searchable in frontend)? I'm hoping there's a way without havng to reindexing everything.

Products are created through a custom integration if it matters.


texts: Magento 1.9.2.4: Show category images in top navigation menu

texts:
Hi I am using copy of rwd theme to make a custom theme. What i need to do is to show category image in the top menu, I am trying to make it happen through renderer.phtml. Tried a lot of thing but nothing worked. Here is code from renderer.phtml.

 <?php
            $html = '';

            $children = $menuTree->getChildren();
            $parentLevel = $menuTree->getLevel();
            $childLevel = is_null($parentLevel) ? 0 : $parentLevel + 1;

            $counter = 1;
            $childrenCount = $children->count();

            $parentPositionClass = $menuTree->getPositionClass();
            $itemPositionClassPrefix = $parentPositionClass ? $parentPositionClass . '-' : 'nav-';

            foreach ($children as $child) {
                $child->setLevel($childLevel);
                $child->setIsFirst($counter == 1);
                $child->setIsLast($counter == $childrenCount);
                $child->setPositionClass($itemPositionClassPrefix . $counter);

                $outermostClassCode = 'level'. $childLevel;
                $_hasChildren = ($child->hasChildren()) ? 'has-children' : '';

                $html .= '
_getRenderedMenuItemAttributes($child) .'>';

                $html .= 'getUrl() .'" class="'. $outermostClassCode .' '. $_hasChildren .'">'. $this->escapeHtml($this->__($child->getName())) .'';

                if (!empty($childrenWrapClass)) {
                    $html .= '
';
                }

                $nextChildLevel = $childLevel + 1;

                if (!empty($_hasChildren)) {
                    $html .= '
';
                    $html .=     '
';
                    $html .=         'getUrl() .'">';
                    $html .=             $this->__('View All') . ' ' . $this->escapeHtml($this->__($child->getName()));
                    $html .=         '';
                    $html .=     '
';
                    $html .=     $this->render($child, $childrenWrapClass);
                    $html .= '
';
                }

                if (!empty($childrenWrapClass)) {
                    $html .= '
';
                }

                $html .= '
';

                $counter++;
            }

            return $html;


texts: how to get custom attributes in rest search api?

texts:
In order rest api http://127.0.0.1/mag/index.php/rest/V1/orders/1
it shows custom attributes
 "payment_additional_info": [
        {
            "key": "method_title",
            "value": "Check / Money order"
        }
    ],
    "applied_taxes": [],
    "item_applied_taxes": [],
    "preorder": "1"

while in order search rest api http://127.0.0.1/mag/index.php/rest/V1/orders/?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=1
it did not shows custom attribute
"payment_additional_info": [
                {
                    "key": "method_title",
                    "value": "Check / Money order"
                }
            ],
            "applied_taxes": [],
            "item_applied_taxes": []
//did not show preorder which is custom attribute


texts: How to handle mobile devices - A specific theme for mobile devices (not looking for the same responsive theme as on the desktop) and configuration

texts:
Magento 1.9.1.0

I installed and configured the Porto Theme #14 and it works great on the desktop. Somehow, it changed the URL for mobile devices trying to access the site (when they type in www.mySITE.com - it redirects them to m.mySITE.com - but there is nothing there at m.mySITE.com). I tried to search the web and also the support pages of the Porto theme on how to configure the mobile page but there seems to be no information whatsoever.

What I think is happening across the board is - people are just installing "responsive themes" that are "mobile friendly". I think that's just NOT good enough though! Imagine you have 50 products on your desktop version - that is fine I think but then someone accessing the site on a tablet or a mobile phone with just mobile data connection - it takes forever to load! Also lines and lines of text at the top of the desktop version (where there is a plenty of space for that) is fine but NOT on the mobile. So what I think is - I need to get a SPECIFIC mobile design. I've spent hours and hours looking for one but was not really successful. I tried Shopgate and it was really awe-full (it took them almost a year to get the site up and even then - it wasn't working).

I have 4 questions for you smart people:

Can anyone recommend a good (tried) mobile design I can install and run on m.mySITE.com
How do I actually do it? Shall I setup another STORE FRONT and use the sub domain m. for the URL? Would it be the same as when I add another STORE/STORE front using a different domain?
Where shall I look for the redirect that's already in place since I didn't actually put it in? www.mySITE.com going into --> m.mySITE.com on mobile devices.
Could I possibly use another Porto design and just configure it and load it onto the m.mySITE.com domain/store?


texts:
I have discovered in a Magento CE 1.7.0.2 installation that I inherited that Zend apparently was upgraded at some point over the past year.  There have been a number of odd issues that have haunted me over the last couple months and I am curious as to whether or not replacing the lib/Zend package from a vanilla 1.7.0.2 installation can really bugger things up.

I am suspecting that it can, but I want to verify that here before I go replacing it.


texts: Problems moving magento2 from shared cpanel to dedicated Centos 6 LAMP server

texts:
I am having some problems with moving my magento 2.1.3 site from a shared cpanel server to a dedicated Centos 6.8 server with PHP 7.0.14, MySQL 5.6 & Apache 2.2

Here's what I did: I basically compressed all of the files in my public_html folder and exported my database SQL file.

Then uploaded the compressed folder to my /var/www/html folder on the dedicated server. Then imported my SQL file to the new database.

All seems to have gone ok but the site isn't loading properly. All that will load is the homepage with no styles or javascript. If I click on another page such as "products" for example, I get a 404 file not found error.

I have followed all instructions to set the users and permissions in the magento2 documentation, made sure mod_rewrite was enabled and then upgrade, compile, static:deploy, reindex and cache flush.

But nothing is having an effect. You can see the site here: http://www.invest-in-bullion.com

Thank you for your time.


texts:
I need to say, its really hard and sadly magento typically that nothing works out of the box as it should if you follow offical step-by-step tutorials.

Since a few hours or better days I try to install Magento2 over composer.
Actually, it hangs up while downloading all the packages.

The biggest one, I guess is the magento2-base...

If the download is nearly by 100% I get some "code" like this:
"WRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvUHVibGljQ29kZVRlc3QucGhwUEsBAhQDFAAAAAgApKF7TUcyaURQAwAA6ggAAEcAAAAAAAAAAAAAALaBu5GGAWRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvUmVhZG1lL1JlYWRtZVRlc3QucGhwUEsBAhQDFAAAAAgApKF7TZ9XoRITAQAAtAQAAFAAAAAAAAAAAAAAALaBcJWGAWRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvUmVhZG1lL19maWxlcy9ibGFja2xpc3QvY2UudHh0UEsBAhQDFAAAAAgApKF7TRS0GhorAAAANAAAAE0AAAAAAAAAAAAAALaB8ZaGAWRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvUmVhZG1lL19maWxlcy9zY2FuX2xpc3QudHh0UEsBAhQDFAAAAAgApKF7TSkeRFoCAwAAAAcAAEcAAAAAAAAAAAAAALaBh5eGAWRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvVGVzdFBsYWNlbWVudFRlc3QucGhwUEsBAhQDFAAAAAgApKF7Teb0yRx8BQAAdBIAAEQAAAAAAAAAAAAAALaB7pqGAWRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvWG1sL1NjaGVtYVRlc3QucGhwUEsBAhQDFAAAAAgApKF7TSxxzkwAAQAAMAMAAFoAAAAAAAAAAAAAALaBzKCGAWRldi90ZXN0cy9zdGF0aWMvdGVzdHN1aXRlL01hZ2VudG8vVGVzdC9JbnRlZ3JpdHkvX2ZpbGVzL2JsYWNrbGlzdC9leGNlcHRpb25faGllcmFyY2h5LnR4dFBLAQIUAxQAAAAIAKShe027mLA8hwAAADcCAABQAAAAAAAAAAAAAAC2gUSihgFkZXYvdGVzdHMvc3RhdGljL3Rlc3RzdWl0ZS9NYWdlbnRvL1Rlc3QvSW50ZWdyaXR5L19maWxlcy9ibGFja2xpc3Qvb2JzZXJ2ZXJzLnR4dFBLAQIUAxQAAAAIAKShe01iCBz1VgQAAFoSAABQAAAAAAAAAAAAAAC2gTmjhgFkZXYvdGVzdHMvc3RhdGljL3Rlc3RzdWl0ZS9NYWdlbnRv)"

Download failed, retrying...

Downloading https://repo.magento.com/archives/magento/magento2-base/magento-magento2-base-2.3.0.0.zip
Downloading (xx%)

Than the download restarts... several times but not possibility to get the package.

After a few problems I faced, which looks like that the magento repo server has some connection problems, this seems to be the hardest nut.
Has anyone ever faced such problems? In the best case excactly this error?

Thanks for your help.

Bye

Timm


texts: How to set default value for configuration field with type image

texts:
I have system.xml with some fields:

<field id="image_width" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
    Image width
</field>
<field id="image_height" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
    Image height
</field>
<field id="placeholder_image" translate="label comment" type="image" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
    Image placeholder
    <comment>Allowed file types:PNG, GIF, JPG, JPEG, SVG.</comment>
    <backend_model>MyNamespace\MyModule\Model\Config\Backend\Image\Placeholder</backend_model>
    <base_url type="media" scope_info="1">module_folder</base_url>
</field>

And i set default values for them in config.xml:

<image_width>100</image_width>
<image_height>100</image_height>
<placeholder_image>placeholder.gif</placeholder_image>

The problem is in placeholder_image field. My placeholder image lies in app/code/MyNamespace/MyModule/view/frontend/web/images/placeholder.gif and Magento 2 looks for it in pub/media/module_folder/placeholder.gif. How can i tell magento to copy it from my folder to pub/media?


texts: Error in check after installing PATCH 5344 successfully

texts:
I applied the PATCH 5344 supree, manually, by going through each file change as mentioned in this link

After successful changes, to test whether the patch is applied or not, I used this magento.com/security-patch link.

This showed me that the site is safe now by showing this message:

Now after one day (approx.), when I checked again with the same link, It showing me the following message:

What could be the issue? Is the site is showing wrong or my site is been attacked by hacker again?


texts: how to pass $_product instance to createBlock in Magento?

texts:
I want to pass $_product instance to createBlock, I have done below code but it does not working. I have written this code on product listing page list.phtml file.

echo Mage::app()->getLayout()
 ->createBlock('easylife_switcher/catalog_product_view_type_configurable_config')
 ->setTemplate('easylife_switcher/catalog/product/view/type/configurable/config.phtml')
 ->setProduct($_product)->toHtml();

Below is config.phtml file code.

<?php if (Mage::helper('easylife_switcher')->isEnabled()) : ?>
<script type="text/javascript">
//<![CDATA[
    var switcherConfig = <?php echo $this->getJsonAdditionalConfig() ?>;
    document.observe('dom:loaded', function(){
        if (spConfig){
            spConfig = new Easylife.Switcher(Object.extend(spConfig.config, switcherConfig));
        }
    });
//]]>
</script>

Below is the getJsonAdditionalConfig() function code:

public function getJsonAdditionalConfig()
{
    var_dump($this->getProduct()->getId());exit;
}

Right now it returns

Call to a member function getId() on null in

How can I pass $_product instance to easylife_switcher block.

Thanks


texts:
For some reason this past week my magento store has started loading slowly, particularly the time to first byte being the issue.

I've disabled an extension that I installed but to no avail. I've ran the profiler and the slowest loading item is

CORE::create_object_of::Mage_Core_Model_Session

Has anyone seen this before? I'm having trouble finding anything online.

The site is memcached and session data is stored using the DB.

Before this last week the site was loading quickly, so not 100% sure what has caused such a change.

Any help would be appreciated, I'm not sure if I can single out the session object in the profiler?

The website in question is www.normadorothy.com

Thanks


texts:
I am trying to install the security patches via SSH and I am getting the following errors:

www.mysite.com@www01:~$ sh ./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 24: 127: not found
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 24: 127: not found
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 29: cannot create 0: Permission denied
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 29: 0: not found
ERROR: "/www/sites/www.mysite.com/app/etc/" must exist for proper tool work.

www.mysite.com@www01:~$ sh ./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 24: 127: not found
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 24: 127: not found
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 29: cannot create 0: Permission denied
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 29: 0: not found
ERROR: "/www/sites/www.mysite.com/app/etc/" must exist for proper tool work.

Any ideas?


texts:
How do you unset a where on a query. I have extended a core function and it has the following code:

$select->where('is_active = ?', 1)

In my extended function I want to remove this where condition. Is this possible?


texts: Stop sending automatic invoice email on invoice creation

texts:
In my store, when I create an invoice and click on 'submit invoice',(not on 'send email') the invoice email is automatically sent to bcc email id (not to customer email) (ie; Sales Emails > Invoice > Send Invoice Email Copy To). And when I click on 'send email' then the invoice email is sent to customer and bcc(2nd time).

I want to stop the first email which is sent to bcc automatically on invoice creation


texts: M2 - Check if product has custom options

texts: On the category page (in list.phtml) I need to check if a product has custom options. What is the best way to do that without abusing the objectmanager?


texts: Getting page not found on custom module Magento 2

texts:
I'm building a Magento 2 module, I need to set up a frontpage page and show some information, I have created my routing:

routes.xml (in namespace/modulename/etc/frontend)

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
  <router id="standard">
    <route id="namespace_modulename" frontName="modulename">
        <module name="Namespace_ModuleName"/>
    </route>
 </router>
</config>

I have also my Controller:

<?php

namespace Namespace\ModuleName\Controller\Index;

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

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

    /**
     * Index constructor.
     *
     * @param Context $context
     */
    public function __construct(
        Context $context
    ) {
        parent::__construct($context);
    }

    /**
     *
     * @return \Magento\Framework\View\Result\PageFactory
     */
    public function execute()
    {
        echo "Test";
        exit;
    }

}

When i go to modulename/index/index I'm getting g page not found.

Not sure why, any ideas? Already done magento upgrade and i can see the module there.

My module registration:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Namespace_ModuleName',
    __DIR__
);


texts: Product attribute creates a duplicate group

texts:
From installer I have installed the following attribute but instead of inserting it into a 'inventory' tab it creates another inventory tab. and inserts into new inventory tab.

    $installer->addAttribute('catalog_product', 'qty_new', array(
        'group'             => 'inventory',
        'type'              => Varien_Db_Ddl_Table::TYPE_NUMERIC,
        'backend'           => '',
        'frontend'          => '',
        'label'             => 'New Quantity',
        'input'             => 'text',
        'class'             => '',
        'source'            => '',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => true,
        'default'           => '',
        'searchable'        => false,
        'filterable'        => false,
        'comparable'        => false,
        'visible_on_front'  => false,
        'unique'            => false,
        'apply_to'          => '',
        'is_configurable'   => false
    ));

Please advise me if you need more information ...


texts: Magento 2 explanation for special Keywords on hove in description

texts:
is there an Add-on/Plugin where i can define special keywords and explanations and Magento will create an "on-hover" explanation in every description?

example:
http://www.vango.de/camping-trekkingzelte/trekkingzelte/trekking-pro/829/zenith-pro-100-anthracite?c=40
See the word "Wassersäule"?

I want to organize those keywords centrally and don't want to edit every description.
Some tips? I could not find any on google.

Thanks in advance!


texts: Send custom pdf in attachment in email in magento2.2.6

texts:
How to add PDF as attachment in magento 2.2.6 ?

I have created code using an event "checkout_onepage_controller_success_action" to sends an email after place an order button click.

1) When someone clicks on the place order button then email sent successfully and redirect to the checkout/success page,

2) but when I use AddAttachment() function to send PDF as an attachment with email then after clicking on place order it's not redirecting to checkout/success/page
and loader showing ...
but I have received email with attachment in my mail

below is my code to add attachment :

 $this->inlineTranslation->suspend();
    $this->_transportBuilder
            ->setTemplateIdentifier($templateId)
            ->setTemplateOptions([
                'area' => $area,
                'store' => $store->getId()
            ])
            ->setTemplateVars($vars)
            ->setFrom($from)
            ->addTo($to['email'], $to['name'])
            ->addAttachment($pdfData, 'Credit Application');

    $transport = $this->_transportBuilder->getTransport();

    $transport->sendMessage();
    $this->inlineTranslation->resume();

//code to create PDF:

public function createPdf( $name,$email)
     {
                 $pdf = new \Zend_Pdf(); //Create new PDF file
                 $page = $pdf->newPage(\Zend_Pdf_Page::SIZE_A4);
                 $pdf->pages[] = $page;
                 $top = 810;
                 $left = 50;
                 $page->setFont(\Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_HELVETICA), 20);  //Set Font
                 $page->drawText("Heading", $left+200, $top-110,'UTF-8');

                 $page->setFont(\Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_HELVETICA), 14);  //Set Font
                 $page->drawText("Name : ".$name, $left, $top-140,'UTF-8');
                 $page->drawText("Email : ".$email, $left, $top-165,'UTF-8');

                 $pdfData = $pdf->render(); // Get PDF document as a string

                 header("Content-Disposition: inline; filename=result.pdf");

                 header("Content-type: application/x-pdf");
                 return $pdfData;
     }

Anyone has an idea then let me know.


texts:
I am developing a new cronjob, since it is in development phase I want to check the output of cronjob after every edits.

Right now I am creating a log file at the end of cron, and I am executing cron through shell:

php bin/magento cron:run --group=my_cron_group

It is very time taken process to execute cron and check in log file. Is there any way to check cron output like in browser or something else that speedup my development.

Any help would be appreciated.


texts: select element or add filter after massaction

texts:
I need your help because I really can't move forward with my problem.
I would like to select or filter the elements that have been manipulated during my massaction in sales_order_grid.
So I would like to be able to retrieve the modified orders very quickly.
I hope I have been clear, and thank you for your help.


texts:
Dears,
I'm trying to change the Ultimo checkout page by adding the header and the footer.
I create the following file in the the following path:  /var/www/magento/app/design/frontend/Infortis/ultimo_child/Magento_Checkout/layout/override/base/
file: checkout_index_index.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>

            <referenceBlock name="minicart" remove="false"/>
            <referenceContainer name="header.panel" remove="false"/>
            <referenceBlock name="top.search" remove="false"/>
            <referenceBlock name="catalog.compare.link" remove="false"/>
            <referenceBlock name="catalog.topnav" remove="false"/>

            <referenceBlock name="base-header-container" remove="false" />
            <referenceBlock name="base-footer-container" remove="false" />
    </body>
</page>

However, the checkout page didn't open at all with error 500.
I tried to switch my theme to the 'base' and did the same changes in the:
/var/www/magento/app/design/frontend/Infortis/base/Magento_Checkout/layout/checkout_index_index.xml

and it works
however, I want to use the child.
Could you please let me know the right way ?


texts: Get Most(Top) Rated Products in Magento2

texts:
I am using Magento 2.1.9 version.
I need to get Top Rated Product Collection without using object manager.
How to get it.
I referred this link

I used the below code in Namespace\Module\Block\Product\Toprated.php:

public function getTopRatedProducts() {
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $reviewFactory = $objectManager->get(\Magento\Review\Model\ReviewFactory::class);
    $storeManager = $objectManager->get(\Magento\Store\Model\StoreManagerInterface::class);
    $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
    $collection = $productCollection->create()
        ->addAttributeToSelect('*')
        ->load();
    $rating = array();
    foreach ($collection as $product) {
        $reviewFactory->create()->getEntitySummary($product, $this->_storeManager->getStore()->getId());
        $ratingSummary = $product->getRatingSummary()->getRatingSummary();
        if($ratingSummary!=null){
            $rating[$product->getId()] = $ratingSummary;
        }
    }
    return $rating;
}


texts: What CLI Commands do I need to run after Magento version upgrade?

texts:
I updated my Magento Open Source installation to version 2.1.9. I did the upgrade via Composer by first modifying my root composer.json file to require the higher version, like so:

"require": {
    "magento/product-community-edition": "2.1.9", <--modify this line

And then run console command "composer update". Composer magically does all the job of flawlessly updating my entire Magento System in the span of several minutes. (side note: I just don't know how people update Magento without Composer, cheez.) Anyway, it's a localhost installation, so I don't care about backing up databases and such.

Since I didn't find one concise answer to what Magento CLI commands do I need to run after version update, so this is my question.

I suppose the first command to run would be (from root):

php bin/magento cache:clean

But then, do I need to run setup:di:compile ?
Do I need to run setup:static-content:deploy ?

Do I need to delete files from pub/static/adminhtml and frontend? Any other folders' contents in pub/static to delete?
Should I delete contents in var/generation and var/view_preprocessed ? Any specific folders to delete in the mentioned paths or just delete it all?

What are the specific steps for best system setup after version upgrade?


texts: Add Product custom option Value in product Shipping Label

texts:
I am Using extension For Create Shipping Lable For Shipping Following code is Generator Product Detail on Shipping Lable. but we also Need Product Custom Option Value Color Size etc so I have to try to add Line in code  $order_details .=  " - ".$product->getProductOption();
and also  $order_details .=  " - ".$product->getOptions(); but not working Please Tell Me Value for Showing Product Custom option Value in Product Detail For Printing Lable
                        $items = $order->getAllItems();
                        $ship_qty = 0;
                        $weight = 0;
                        $order_details = " ";
                        foreach($items as $item) {
                            $ship_qty = $ship_qty+$item->getQtyOrdered();
                            $weight    = $weight+($item->getWeight() * $item->getQtyOrdered());
                            $product = $item->getProduct();
                            $order_details .= $product->getName();
                            $order_details .=  " - ".$product->getSku();
                            $order_details .=  " - ".$product->getProductoPtion();
                            $order_details .=  " ( ".$item->getQtyOrdered()." ) , ";

                        }


texts: How can I swap the position of shipping and tax on the invoice?

texts:
I wish to swap the position of tax and shipping on the invoice.

How can I go about to do this?


texts:
In magento 2 how to override stock availability in product detail page in custom module

  app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml

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

    <referenceContainer name="product.info.type">
        <block class="Magento\Catalog\Block\Product\View\Type\Simple" name="product.info.simple" as="product_type_data" template="Vendor_Module::product/view/type/default.phtml"/>
    </referenceContainer>

</page>

  app/code/Vendor/Module/view/frontend/templates/product/view/type/default.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php /* @var $block \Magento\Catalog\Block\Product\View\AbstractView */?>
<?php $_product = $block->getProduct() ?>

<?php if ($block->displayProductStockStatus()): ?>
    <?php if ($_product->isAvailable()): ?>
        <div class="stock available" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
            <?= /* @escapeNotVerified */ __('In stock with static text') ?>

    <?php else: ?>
        <div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
            <?= /* @escapeNotVerified */ __('Out of stock') ?>

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


texts: I have install magento latest 2.2.3 on local but on adding custom css file it does not refelect in the source code

texts:
I have added code in the default XML block(FOR CUSTOM CSS FILE) in my custom theme and after this made content-deploy also but it was still not reflecting in my source code,

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
        <css src="css/theme.css"/>
        <css src="css/bootstrap.min.css"/>
    </head>
</page>


texts: Why my Magento admin area redirects to the old url?

texts:
Magento 2.3.1 installed on lightsail using the official bitnami AWS installer, if you go to the admin, it redirects back to the old website.  In the database core_config_data the URLs are correct.

I updated the domain name, I updated letsencrypt, I cleared and flushed Magento cache and restarted everything. Only the admin area is redirecting


texts: Wysiwyg / TINYmce Editor Removing itemscope , itemtype

texts:
Whenever I edit content for category/product with tinymce it removes itemscope or itemtype for google snippets from elements like for example this <div itemscope="" itemtype="https://schema.org/FAQPage" class="faq-main-div"> this is removed everytime I reload the page and I have to insert it manually because If I make a single change and save the page this dissapears.
I mean, which genius designed this? This is some serious flaw, why is this even in magento? How do I fix this?


texts:
i want to Add "add to compare" and "add to Wishlist" functionality in minicart magento 2.

I cannot find where to modify. Can you help me, please?

thanks


texts:
It's been a few days that this error show up when editors editing a product:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) AND (p.entity_id = '4623') LIMIT 1' at line 3, query was:SELECT DISTINCT p.entity_id FROM catalog_product_entity AS p INNER JOIN catalog_product_flat_4 AS cpf ON cpf.entity_id = p.entity_id LEFT JOIN catalog_category_product AS ccp ON ccp.product_id = p.entity_id WHERE ( () ) AND (p.entity_id = '4623') LIMIT 1

I suppose it's due to empty WHERE section of sql statement, i'm not sure if editors changed/delete record or something? I roll back database to few days back and check the equal sql statement that works fine and here it is:

SELECT DISTINCT p.entity_id FROM `catalog_product_entity` AS `p` INNER JOIN `catalog_product_flat_4` AS `cpf` ON cpf.entity_id = p.entity_id LEFT JOIN `catalog_category_product` AS `ccp` ON ccp.product_id = p.entity_id WHERE ( (`ccp`.`category_id` IN ('68')) ) AND (p.entity_id = '3671') LIMIT 1

As you see the part missing from first statement is ccp.category_id IN ('68') part. I checked the category with id=68 and it still exist.
Any idea what may caused this error?
Also what is interest me is that ccp.category_id IN ('68')) section is on every product i tried to edit. Although many products not belongs to this category (68). Why magento check that?


texts: Magento 1.9.3.2 checkout not working after applying SUPEE 10572 patch

texts:
The regular one-page checkout (/checkout/onepage/) has stopped working following applying the 3 latest SUPEE patches.

exception 'Mage_Core_Exception' with message 'Invalid block type: ' in /var/www/html/myshop/app/Mage.php:595
Stack trace:
#0 /var/www/html/msyhop/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /var/www/html/myshop/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
#2 /var/www/html/myshop/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'root')
#3 /var/www/html/myshop/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'root')
#4 /var/www/html/myshop/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_La$
#5 /var/www/html/myshop/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#6 /var/www/html/myshop/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 /var/www/html/myshop/app/code/core/Mage/Checkout/controllers/CartController.php(194): Mage_Core_Controller_Varien_Action->loadLayout()
#8 /var/www/html/myshop/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->indexAction()
#9 /var/www/html/myshop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#10 /var/www/html/myshop/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /var/www/html/myshop/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#12 /var/www/html/myshop/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#13 /var/www/html/myshop/index.php(100): Mage::run('', 'store')
#14 {main}

Points #1,#2,and #3 all have an empty string in the block calls.  This would suggest to me that a block has been declared/called in the layout with no type. However I cannot find an empty block declaration so far.

Does anyone have any suggestions how to speedily debug this type of issue?

Thanks

UPDATE
Actually this turned out to be a problem with the php version. I tracked the error down to app/code/core/Mage/Checkout/Model/Type/Onepage.php

Parse error: syntax error, unexpected '[' in /var/www/html/myshop/app/code/core/Mage/Checkout/Model/Type/Onepage.php on line 732
Array
(
    [type] => 4
    [message] => syntax error, unexpected '['
    [file] => /var/www/html/msyhop/app/code/core/Mage/Checkout/Model/Type/Onepage.php
    [line] => 732
)

The line here uses an array reference syntax not valid for php 5.3 (which my server was) which has appeared after doing applying SUPEE-10572.  By upgrading to 5.4 the checkout now works.


texts: Magento store/save data in custom columns

texts:
I added two text columns to sales_flat_quote_item in order to store data and for other reasons When i add product to cart. my problem is that i cant save the data. i tried a lot of examples but without any success.
Config.xml file :

 <events>
        <catalog_product_load_after>
            <observers>
                <iwp_package>
                    <type>model</type>
                    <class>iwp_package/observer</class>
                    <method>catalogProductLoadAfter</method>
                </iwp_package>
            </observers>
        </catalog_product_load_after>
    </events>

here i add the coulmns :

$installer = $this;
$connection = $installer->getConnection();
$installer->startSetup();
$installer->getConnection()
    ->addColumn($installer->getTable('sales/quote_item'),
    'pack_name',
    array(
        'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
        'nullable' => true,
        'default' => null,
        'comment' => 'pack_name'
    )
);
$installer->endSetup();

This is the code in my observer where i try to save the data :

$quote_item  = Mage::getModel('sales/quote_item')->load($quote->Id);
$quote_item->setPackName($string);
$quote_item->save();

any help?


texts:
Just for a specific customer every time when I tried to modify some Personal Information in the backend(customer section), or if I tried with the same user to access the cart or the checkout page, I receive this error in the browser: ERR_EMPTY_RESPONSE.

In var/log folder I don't have anything related to this issue.

What is really weird is the fact that only for one user this is happening, and unfortunately, i can't delete this user because there are many orders related with.

If i tried to do the same operations with other users everything goes fine.

What i found related to my issue is to  try flushing the APC Opcode cache by using:

 apc_clear_cache();
apc_clear_cache('user');

But when i tried to do this i receive "undefined method" error which means that i don't have PHP  APC extension enabled.

Does anyone know what i should do to solve this err?


texts: How to add the default search of magento in a div

texts:
I have created a div . In this div I want to show the search box that is already present in default magento. How can I do it. I have initially remove the search box from header with this code:

<default>
 <reference name="header">
  <remove name="top.search"/>
 </reference>
</default>

Now I want to show it in my div.


texts: Magento displaying base currency not default display currency

texts:
I'm developing a site for a client which allows purchases to be made in one of 3 currencies: GB Pounds, Euros and US Dollars. However the client is based in the Arab Emirates and their bank account can only take transactions in AED (United Arab Emirates Dinari).

From what I've read, setting Magento up to do that should be easy: I've set the Base Currency as AED, the default display currency as GBP, and allowed currencies as GBP, USD, EUR and AED.

However, the website is only displaying prices in AED. I thought if I set the default display price as GBP then the website should display in GBP?
I'm using Magento CE 1.9.2.1 with a Payfort extension to provide the payment gateway.

Can anyone suggest what might be wrong here?


texts:
We have created a megamenu and want to load the category image on the menu. I'm not sure how to load that.

As of now, we have just hardcoded the image.

Below is the code:

<?php
namespace Butterfly\Megamenu\Block;
class Categorylist extends \Magento\Framework\View\Element\Template
{
    protected $_categoryHelper;
    protected $categoryFactory;
    protected $_catalogLayer;
    protected $_categoryRepository;

    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Catalog\Helper\Category $categoryHelper,
    \Magento\Catalog\Model\CategoryRepository $categoryRepository,

        array $data = []
    ) {

        $this->_categoryHelper = $categoryHelper;
    $this->_categoryRepository = $categoryRepository;
        parent::__construct(
            $context,
            $data
        );

    }

    public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
    {
        return $this->_categoryHelper->getStoreCategories($sorted , $asCollection, $toLoad);
    }

    public function getCategoryById($categoryId)
    {
        return $this->_categoryRepository->get($categoryId);

    }

public function  getSubcategories($categories, $parent= '') {
    $i = 0;
    $array= '
';
    foreach($categories->getChildrenCategories() as $category) {
        $array .= '
';
        $cat_image = 'https://techcrunch.com/wp-content/uploads/2010/10/pirate.jpg?w=990&crop=1';
        if($i == 3 && $parent == '' && $cat_image != ""){
            $array .= '';
            $array .= '

';
        }
        $array .= 'getRequestPath().'">' .
                  $category->getName() . "\n";
        if($category->hasChildren()) {
            $children = $this->getCategoryById($category->getId());
             $array .=  $this->getSubcategories($children, 'child');
            }
         $array .= '
';
         $i++;
    }
    return  $array . '
';
}

}

Any help will be appreciated!

I can see the category images in DB:


texts: Enterprise Magento2.3.2 Unable to get Category Image Url Programmatically

texts:
<?php
namespace Vendor\Module\Controller\Index;

use Magento\Framework\App\Action\Action;
use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Index extends Action
{
    protected $resultJsonFactory;
    /**
    * @var \Magento\Catalog\Helper\Category
    */
    protected $categoryHelper;

    /**
    * @var \Magento\Catalog\Model\CategoryRepository
    */
    protected $categoryRepository;

    protected $resultPageFactory;

    public function __construct(Context $context,
        JsonFactory $jsonFactory,
        \Magento\Catalog\Helper\Category $categoryHelper,
        \Magento\Catalog\Model\CategoryRepository $categoryRepository,
        PageFactory $pageFactory)
    {
        $this->resultJsonFactory = $jsonFactory;
        $this->categoryHelper = $categoryHelper;
        $this->categoryRepository = $categoryRepository;
        $this->resultPageFactory = $pageFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $selectedCatId = $this->getRequest()->getParam('subCatId');

        $categoryObj = $this->categoryRepository->get($selectedCatId);

        var_dump($categoryObj->getImageUrl());
            exit;
    }
}

I have set the image in admin for category Id: 358:

Below is the output of print_r($categoryObj->getData());

<pre>Array(
[entity_id] => 358
[attribute_set_id] => 12
[parent_id] => 2
[created_at] => 2019-08-05 11:43:07
[updated_at] => 2019-08-05 12:08:06
[path] => 1/2/358
[position] => 22
[level] => 2
[children_count] => 34
[row_id] => 358
[created_in] => 1
[updated_in] => 2147483647
[store_id] => 1
[abacos_codigo] =>
[abacos_codigo_pai] =>
[all_children] =>
[automatic_sorting] =>
[available_sort_by] =>
[category_zone] =>
[children] =>
[custom_apply_to_products] => 0
[custom_design] =>
[custom_design_from] =>
[custom_design_to] =>
[custom_layout_update] =>
[custom_use_parent_settings] => 0
[default_sort_by] =>
[description] =>
[display_mode] => PRODUCTS
[filter_price_range] =>
[hide_desktop] => 0
[image] =>
[include_in_menu] => 0
[is_active] => 1
[is_anchor] => 0
[landing_page] =>
[meta_description] =>
[meta_keywords] =>
[meta_title] =>
[mobile_img] =>
[name] => Start
[nav-image] =>
[page_layout] => category-full-width
[path_in_store] =>
[thumbnail] =>
[url_key] => start
[url_path] => start
[weltpixel_category_url] =>
[weltpixel_category_url_newtab] => 0
[weltpixel_mm_bottom_block] =>
[weltpixel_mm_bottom_block_cms] =>
[weltpixel_mm_bottom_block_type] => none
[weltpixel_mm_columns_number] => 4
[weltpixel_mm_column_width] => auto
[weltpixel_mm_display_mode] => sectioned
[weltpixel_mm_left_block] =>
[weltpixel_mm_left_block_cms] =>
[weltpixel_mm_left_block_type] => none
[weltpixel_mm_mob_hide_allcat] => 0
[weltpixel_mm_right_block] =>
[weltpixel_mm_right_block_cms] =>
[weltpixel_mm_right_block_type] => none
[weltpixel_mm_top_block] =>
[weltpixel_mm_top_block_cms] =>
[weltpixel_mm_top_block_type] => none

)


texts: Make the Price of Associated Products required

texts:
In the configurable product, how to make the Price of Associated Products Required? (When the price is null, don't make save action success and has some tips.)

Note:

The price is not in the edit page of Associated Products, because the price there does not working.

The price is in the Associated Products tab which is in the configurable product. You could see the image below for reference


texts: How to set frontend compilation via the database

texts:
How do you set the front-end workflow option via the DB rather than the admin?

This is the setting I'm referring to:

Stores > Configuration > ADVANCED > Developer > Front-end development workflow

Example use case is when I need to change something whilst DI compile is running for twenty million years.


texts: magento 1 checkout register - account exists

texts:
I have a problem where customers who already have an account re-register at the checkout.

The customer fills out their details, pays and then the site gives an error saying duplicate email (but we've taken your money anyway!)

How can I get Magento to check that the email isn't already registered before they complete checkout. In Magento 2 this is automatic, but in Magento 1?


texts: "403 Forbidden" error page when trying to open Magento 2 setup page

texts:
I'm trying to install Magento 2 on a Godaddy Ubuntu virtual machine. After following what is in the installation manual (hopefully), and when I reached to the step of opening the setup page of the Magento 2 installation, I'm getting the following error:

"403 Forbidden" page

However, after I installed Apache I tried to open "http:// [the IP address of the VM]", and it successfully opened the default page of Apache.

The following is the configuration in '/etc/apache2/sites-available/000-default.conf' :

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/magento2
        #DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
<Directory /var/www/magento2>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted
</Directory>

And permission on /var/www/magento2 folder is as follows:

find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

What did I miss in my configuration? how can that be fixed?


texts: M2 Include disabled products in product list widget collection

texts:
I'm not sure if this is an m2 2.2 bug or just due the way I'm trying to filter the collection,
but I can't seem to include disabled products in my product list collection.
I've tried a few different options from what I've seen in a few forum posts.
The below code snippet is purely to retrieve disabled products (as a first step, though the aim is to have enabled and disabled products).
This code results in zero products listed despite having disabled products which meet the criteria. Trying here in case there's something glaringly obvious I'm missing or a known bug with m2 2.2 requiring a workaround.

       $collection = $this->productCollectionFactory->create();
//$collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());

$collection = $this->_addProductAttributesAndPrices($collection)
    ->addStoreFilter()
    ->addAttributeToFilter('status', \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED)
    ->setCurPage($this->getRequest()->getParam($this->getData('page_var_name'), 1));

$conditions = $this->getConditions();
$conditions->collectValidatedAttributes($collection);
$this->sqlBuilder->attachConditionToCollection($collection, $conditions);

return $collection;

My widget is extended from:
class ProductsList extends \Magento\CatalogWidget\Block\Product\ProductsList


texts: Best way to create "free economy shipping" option WITH conditions?

texts:
Right now we have a shopping cart price rule enabled to give free shipping to orders over $199, in the US excluding Alaska and Hawaii and excluding certain SKUs. This is what's currently implemented: http://addoa.com/blog/how-restrict-free-shipping-magento

Our only shipping carrier enabled is UPS and we have the free shipping defaulting to UPS Ground.

What I'd like to do is create a shipping option called "Free Economy Shipping" and have that be the free option while UPS Ground shows the regular calculated price.

It looks like to do this I'll need to create a custom shipping module. Would that be the best way to solve this problem?


texts: How to get category collection as per store wise in admin from?

texts:
when i select English than the category comes is English store
when i select Arabic than the category comes is Arabic store category
how these possible can any one have help me..


texts: Magento 2.3.4 - infinite loop on checkout

texts:
I have upgraded from Magento CE 2.3.3 to 2.3.4 and on the checkout I get this error:

Has anyone had this problem before?

Theres nothing in the logs and I am on developer mode with debugging enabled.


texts:
I am trying to remove a block and switch the product page to 2-columns right. Here is the code-

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="left">
            <remove name="catalog.leftnav" />
        </reference>
    <catalog_product_view>
         <reference name="root">
             <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
         </reference>
    </catalog_product_view>
    </default>
</layout>

I have it placed in app/design/frontend/default/themename/layout

I have flushed the cache and made sure the proper theme is selected in system-->configuration-->design


texts: How to Remove New Products Block products Price for store 1 not for store 2

texts:
I need to remove home Page New product products price for store 1, not for store 2. if i remove

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

Both stores do not display price of New Products, how to remove the price of new products in store 1 not store 2.


texts: Redirect to customer's store view on login

texts:
We would like to redirect to the customer's store view on login, this seems like it should be default behaviour but we always get the default store view (ID: 1). Has anyone accomplished this?

We have an extension which adds 'Login as Customer' functionality to the admin area and bizarrely this does redirect the customer to the correct store view, so something is amiss only on the frontend/regular customer login process.


texts: How to call resource model function in controller in Mangeto 2

texts:
I have this resource model:

<?php
namespace namespace\module\Model\ResourceModel;

class Post extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
    /**
     * Date model
     *
     * @var \Magento\Framework\Stdlib\DateTime\DateTime
     */
    protected $_date;

    /**
     * constructor
     *
     * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
     * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
     */
    public function __construct(
        \Magento\Framework\Stdlib\DateTime\DateTime $date,
        \Magento\Framework\Model\ResourceModel\Db\Context $context
    )
    {
        $this->_date = $date;
        parent::__construct($context);
    }

    /**
     * Initialize resource model
     *
     * @return void
     */
    protected function _construct()
    {
        $this->_init('clubshop_login', 'id');
    }

    /**
     * Retrieves Post Name from DB by passed id.
     *
     * @param string $id
     * @return string|bool
     */
    public function getPostNameById($id)
    {
        $adapter = $this->getConnection();
        $select = $adapter->select()
            ->from($this->getMainTable(), 'name')
            ->where('id = :id');
        $binds = ['id' => (int)$id];
        return $adapter->fetchOne($select, $binds);
    }
    /**
     * before save callback
     *
     * @param \Magento\Framework\Model\AbstractModel|\Mageplaza\HelloWorld\Model\Post $object
     * @return $this
     */
    protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
    {
        $object->setUpdatedAt($this->_date->date());
        if ($object->isObjectNew()) {
            $object->setCreatedAt($this->_date->date());
        }
        return parent::_beforeSave($object);
    }
}

Now i want to call getPostNameById in my controller, and i don't know how.

Can anyone tell me how can I call this function in my controller?