#StackBounty: #magento-1.9 #onepage-checkout #shopping-cart-price-rules #debugging #alert OnePage Checkout Page Error – Free Shipping e…

Bounty: 50

My condition, free shipping for selected zip-code/postal code,
range is, from 600003 to 600151

I am using Shopping Cart Price Rule, my workout

enter image description here
enter image description here
enter image description here
enter image description here
enter image description here

Note : Shopping Cart Price Rule condition Matching still alert open

I am using Multistore

How can i solve this error.

Note: Log Error

2018-05-17T10:48:21+00:00 ERR (3): 
Mage_Core_Exception: Please specify a shipping method. in /home/abc/public_html/app/Mage.php:595
Stack trace:
#0 /home/abc/public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(303): Mage::throwException('Please specify ...')
#1 /home/abc/public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(222): Mage_Sales_Model_Service_Quote->_validate()
#2 /home/abc/public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(238): Mage_Sales_Model_Service_Quote->submitNominalItems()
#3 /home/abc/public_html/app/code/core/Mage/Checkout/Model/Type/Onepage.php(812): Mage_Sales_Model_Service_Quote->submitAll()
#4 /home/abc/public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(604): Mage_Checkout_Model_Type_Onepage->saveOrder()
#5 /home/abc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_OnepageController->saveOrderAction()
#6 /home/abc/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#7 /home/abc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /home/abc/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/abc/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#10 /home/abc/public_html/index.php(87): Mage::run('', 'store')
#11 {main}


Get this bounty!!!

#StackBounty: #magento-1.9 #event-observer #onepage-checkout #msrp Magento 1.9 : Switch Poducts msrp/price in Onepage Checkout

Bounty: 50

I have created a custom module and created an observer method for “sales_quote_collect_totals_before” event. In this method, I check some of the quote data. Based on the current checkout data, I’d like to apply MSRP prices on products that are placed in the cart. Or switch products back to normal prices, if the criteria are not satisfied.

How can I do that?

Here’s a sample of the code:

public function changeQuotePrices(Varien_Event_Observer $observer){
    if (Mage::app()->getRequest()->getModuleName() == 'onepage'){
        $event = $observer->getEvent();
        $quote = $event->getQuote();
        $quoteShippingAddress = $quote->getShippingAddress();
        if (!is_null($quoteShippingAddress->getId())){
            $quoteShippingAddress->collectShippingRates()->save();
            $quoteShippingMethod = $quoteShippingAddress->getShippingMethod();
            if($quoteShippingMethod && $quoteShippingMethod = "payonpickup_payonpickup"){ 
                $cart = Mage::helper('checkout/cart')->getCart()->getQuote()->getAllItems();    
                foreach($cart as $item) {
                    $product = Mage::getModel('catalog/product')->load($item->getProductId()); 
                    $_msrpPrice = Mage::helper('core')->currency($product->getMsrp(),true,true);
                    if($_msrpPrice > 0){
                        /* apply msrp product prices */
                    }
                }
            }else{ 
                /* apply normal product prices */
            }

        }

    }
}


Get this bounty!!!

#StackBounty: #magento-1.9 #adminhtml #fieldsets Update native field properties

Bounty: 50

I’ve just finished building an extended password policy module, which allows for customisable control over the rules for creating / updating a password.

The general idea is that you can set the minimum characters, whether the password should contain a special character, uppercase character, etc…

The module works as expected, however there is no indication to the admin what rules he needs to follow when creating / updating an account.

I’ve found the form I need to update, Mage_Adminhtml_Block_Permissions_User_Edit_Tab_Main, and the field that needs editting and the property that needs adding:

$fieldset->addField('password', 'password', array(
    ....
    'after_element_html' => '<small># Output Rules Here #</small>',
));

My problem is I don’t really want to extend the Mage_Adminhtml_Block_Permissions_User_Edit_Tab_Main class and rewrite the entire _prepareForm() method, it’d be preferable to target that particular form and that particular field and update the properties, but I can’t seem to find out if that is even possible.

Any help would be appreciated.


Get this bounty!!!

#StackBounty: #magento-1.9 #cart #shipping-methods #quote Do I really need the sales_flat_quote_shipping_rate table?

Bounty: 250

We have a very simple logic for shipping methods and prices depending on the shipping country and the subtotal. We dont depend on any external API requests for the calculation. Do we really need to store the result inside the table?

My impression is, this table is only a performance optimization to avoid repeated expensive calculations or API requests to external shipping providers.

Has someone ever tried to turn this table off and found problems related to this? Which Problems were this?

But most importanly: do I really need this table, or can I workaround the logic to not use this table anymore?


Get this bounty!!!

#StackBounty: #magento-1.9 #orders #payment #authorize.net Magento and Authorize Suspected Fraud Credit Memo

Bounty: 100

When using authorize.net as payment gateway, why does it set transaction_id to null on the invoice generated when authorize.net returns a suspected fraud code. Later when the transaction is approved on authroize.net and I run get payment update to so that it changes the magento order state to processing allowing me to ship the product which is all fine.

Then later if I need to perform a credit memo on this transaction I can’t. After tracing all the conditionals in magento I realized it was because “transaction_id” is set to null on all authorize.net suspected fraud transactions. This needs to be set to 1 in order for the refund option to be given.

Are there any explanations on why the behavior is like this and if there are any solutions to this?


Get this bounty!!!

#StackBounty: #magento-1.9 #orders #authorize.net Magento and Authorize Suspected Fraud Credit Memo

Bounty: 100

When using authorize.net as payment gateway, why does it set transaction_id to null on the invoice generated when authorize.net returns a suspected fraud code. Later when the transaction is approved on authroize.net and I run get payment update to so that it changes the magento order state to processing allowing me to ship the product which is all fine.

Then later if I need to perform a credit memo on this transaction I can’t. After tracing all the conditionals in magento I realized it was because “transaction_id” is set to null on all authorize.net suspected fraud transactions. This needs to be set to 1 in order for the refund option to be given.

Are there any explanations on why the behavior is like this and if there are any solutions to this?


Get this bounty!!!

#StackBounty: #magento-1.9 Magento and Authorize Suspected Fraud Credit Memo

Bounty: 100

When using authorize.net as payment gateway, why does it set transaction_id to null on the invoice generated when authorize.net returns a suspected fraud code. Later when the transaction is approved on authroize.net and I run get payment update to so that it changes the magento order state to processing allowing me to ship the product which is all fine.

Then later if I need to perform a credit memo on this transaction I can’t. After tracing all the conditionals in magento I realized it was because “transaction_id” is set to null on all authorize.net suspected fraud transactions. This needs to be set to 1 in order for the refund option to be given.

Are there any explanations on why the behavior is like this and if there are any solutions to this?


Get this bounty!!!

#StackBounty: #magento-1.9 #database #mssql Add connection to MS SQL database

Bounty: 50

I want to add a connection to our ERP database that uses MS-Server, but i can’t figure out what I’m doing wrong.

I know how to connect to another MySQL DB, but for MSSQL?

config.xml

<resources>
    <erp_db>
        <connection>
            <host><![CDATA[1.2.3.4somename]]></host>
            <username><![CDATA[user]></username>
            <password><![CDATA[password]]></password>
            <dbname><![CDATA[db_name]]></dbname>
            <!-- ??? -->
            <model>mssql</model>
            <type>pdo_mssql</type>
            <!-- ??? -->
            <active>1</active>
        </connection>
    </erp_db>
    <erp_write>
        <connection>
            <use>erp_db</use>
        </connection>
    </erp_write>
    <erp_read>
        <connection>
            <use>erp_db</use>
        </connection>
    </erp_read>
    <erp_setup>
        <connection>
            <use>core_setup</use>
        </connection>
    </erp_setup>
</resources>

If I try this to list all tables …

$resource   = Mage::getSingleton('core/resource');
$connection = $resource->getConnection('erp_db');
$results    = $connection->fetchAll('SELECT * FROM sysobjects WHERE xtype="U"');
var_dump($results);

I get …

Fatal error: Class name must be a valid object or a string in /app/code/core/Mage/Core/Model/Resource.php on line 225

I also read Using MS SQL with Magento 1.9, some say it’s not supported, but from comments it seems to be possible …

The PDO adapter exists in Zend_Db_Adapter_Pdo_Mssql, but how to correctly use it?


Get this bounty!!!

#StackBounty: #magento-1.9 #php #shipping-methods #fedex Display fedex shipping rate in product page magento 1.9

Bounty: 50

I read the similar question but no luck.

I am working in magento 1.9. I want to display shipping rate in product view page. I have zipcode textbox in product page. After enter zipcode I want to display shipping charges in the same page.

I tried the following code. It is displaying changes but the actuall prices are different that means in checkout page the same zipcode charges are different. and by using following code the charges are different.

$shippingblock = $this->getLayout()->createBlock('checkout/cart_shipping');
        $quote = Mage::getModel('sales/quote');

        $shippingAddress = $quote->getShippingAddress();
        $shippingAddress->setCountryId('country');
        $shippingAddress->setPostcode('zipcode');
        $shippingAddress->setCollectShippingRates(true);


        $quote->addProduct($_product);
        $quote->getShippingAddress()->collectTotals();
        $quote->getShippingAddress()->setCollectShippingRates(true);
        $quote->getShippingAddress()->collectShippingRates();

        $rates = $quote->getShippingAddress()->getGroupedAllShippingRates();


        if(empty($rates)){
             echo  Mage::helper('shipping')->__('There are no rates available');
        }


        foreach ($rates as $code=>$rate) {
            $carierName = '
' . $shippingblock->getCarrierName($code) .'
'; echo $carierName; foreach($rate as $r){ $price = Mage::helper('core')->currency($r->getPrice(), true, false); $rates = '<div>' . $r->getMethodTitle() . ' <strong>' . $price .' </strong>'; echo $rates; } }

Any other way to display fedex charges in product page ? I am using default fedex method.


Get this bounty!!!