Knowledge Base/Tips & Tricks/Conflicting Extensions

One Step Checkout Compatibility

Lynn Aque Penaloza
posted this on March 13, 2012 09:19

Extension Name

Idev_OneStepCheckout

Developer

OneStepCheckout

Issue Status

Resolved with modifications.

Problem

The One Step Checkout extension doesn't implement the base Magento totals rendering functionality, so the final points earned and redeemed information doesn't show up.

In versions later than 2.2, Sweet Tooth catalog discounts are sometimes missing or incorrect. A patch for this was released in Sweet Tooth 1.6.0.4. This patch supports Magento 1.4.2.0 and up. If store prices are set to include tax, some problems may persist in versions of Magento prior to 1.4.2.0.

In some older versions of One Step Checkout (v3.1.9), there is also a re-write on the Quote model which poses an extra conflict with Sweet Tooth.

In the new version of One Step Checkout (v4.0.3) and Sweet Tooth 1.6.0.6, the One Step Checkout page is not loaded and it load the default Magento One Page checkout.

Resolution

To solve, follow these instructions:

1. Open app\code\local\Idev\OneStepCheckout\Block\Summary.php

2. Replace Mage_Checkout_Block_Onepage_Abstract with Mage_Checkout_Block_Cart_Totals on line 10. 

3. Open app\design\frontend\default\default\template\onestepcheckout\summary.phtml (in newer versions the file is app\design\frontend\base\default\template\onestepcheckout\summary.phtml) and replace lines 37-66:

 

<?php foreach($this->getTotals() as $total): ?>
	<tr>
		<td class="title">
 
			<?php
 
			$code = $total->getCode();
 
			if($code == 'subtotal')	{
				$total_name = $this->__('Subtotal');
			}
			elseif($code == 'shipping')	{
				$total_name = $this->__('Shipping');
			}
			elseif($code == 'grand_total')	{
				$total_name = $this->__('Grand total');
			}
			else	{
				$total_name = $total->getTitle();
			}
 
			echo $total_name; 
 
			?>
		</td>
		<td class="value">
			<?php echo $this->helper('checkout')->formatPrice($total->getValue()); ?>
		</td>
	</tr>
	<?php endforeach; ?>

 

with the following code:

<?php echo $this->renderTotals(); ?>
<?php echo $this->renderTotals('footer'); ?>

 

4. Open app\code\local\Idev\OneStepCheckout\Model\Sales\Quote.php and replace the following line

class  Idev_OneStepCheckout_Model_Sales_Quote extends Mage_Sales_Model_Quote

with

class  Idev_OneStepCheckout_Model_Sales_Quote extends TBT_Rewards_Model_Sales_Quote

 

5. Only if you modified the file above, edit app\etc\modules\Idev_OneStepCheckout.xml and add in the extra dependency line as demonstrated below:

<config>
    <modules>
        <Idev_OneStepCheckout>
            <active>true</active>
            <codePool>local</codePool>
            <depends>TBT_Rewards</depends>
        </Idev_OneStepCheckout>
    </modules>
</config>

 


For stores running Sweet Tooth 1.7+ and One Step Checkout 4.0.8+, follow these steps to make sure all checking links are redirected to One Step Checkout:

1. Open app\design\frontend\base\default\template\onestepcheckout\summary.phtml) and replace lines 59-105:

<?php foreach($this->getTotals() as $total): ?>
    <?php if(!$total->getTitle()){continue;}?>
        <?php
        $fullInfo = $total->getFullInfo();

        if(!empty($fullInfo) && $checkoutHelper->settings['display_full_tax']):
            foreach ($fullInfo as $info):
                $rates = current($info['rates']);
                $amount = $info['amount'];
        ?>
            <tr>
                <td class="title"><?php echo $rates['title'] ?> (<?php echo $rates['percent'] ?>%)</td><td class="value"><?php echo $this->helper('checkout')->formatPrice($amount); ?></td>
            </tr>
        <?php endforeach;
        endif;?>
    <tr<?php if($total->getCode() == 'grand_total'): ?> class="grand-total"<?php endif; ?>>
        <td class="title">
            <?php

            $code = $total->getCode();
            $value = $total->getValue();

            if($code == 'subtotal')    {
                $total_name = $this->__('Subtotal');
            }
            elseif($code == 'shipping')    {
                $total_name = $this->__('Shipping');
                if($checkoutHelper->settings['display_tax_included'])   {
                    $value += $this->getQuote()->getShippingAddress()->getShippingTaxAmount();
                }
                            }
            elseif($code == 'grand_total')    {
                $total_name = $this->__('Grand total');
            }
            else    {
                $total_name = $total->getTitle();
            }

            echo $total_name;

            ?>
        </td>
        <td class="value">
            <?php echo $this->helper('checkout')->formatPrice($value); ?>
        </td>
    </tr>
    <?php endforeach; 

with

<?php echo $this->renderTotals(); ?>
<?php echo $this->renderTotals('footer'); ?>

 

2. Open app\code\local\Idev\OneStepCheckout\Model\Sales\Quote.php and replace the following line

class  Idev_OneStepCheckout_Model_Sales_Quote extends Mage_Sales_Model_Quote

with

class  Idev_OneStepCheckout_Model_Sales_Quote extends TBT_Rewards_Model_Sales_Quote

 

3. Only if you modified the file above, edit app\etc\modules\Idev_OneStepCheckout.xml and add in the extra dependency line as demonstrated below:

<config>
    <modules>
        <Idev_OneStepCheckout>
            <active>true</active>
            <codePool>local</codePool>
            <depends>TBT_Rewards</depends>
        </Idev_OneStepCheckout>
    </modules>
</config>

 

 


For stores running Sweet Tooth 1.6.0.6 and One Step Checkout 4.0.3, follow the steps below to make sure all checkout links are redirected to One Step Checkout:

1. Copy /app/code/community/TBT/Rewards/Block/Checkout/Onepage/Link.php to /app/code/local/TBT/Rewards/Block/Checkout/Onepage/Link.php so that you are not modifying core extension files.

2. Open app/code/local/TBT/Rewards/Block/Checkout/Onepage/Link.php, change:

class TBT_Rewards_Block_Checkout_Onepage_Link extends Mage_Checkout_Block_Onepage_Link


to

class TBT_Rewards_Block_Checkout_Onepage_Link extends Idev_OneStepCheckout_Block_Checkout_Onepage_Link

 


Additional Steps For Sweet Tooth Platinum users:

1. Copy app/code/community/TBT/RewardsOnly/Block/Checkout/Onepage/Link.php to app/code/local/TBT/RewardsOnly/Block/Checkout/Onepage/Link.php so that you are not modifying core extension files.

2. Open app/code/local/TBT/RewardsOnly/Block/Checkout/Onepage/Link.php

3. Edit line 46 to be this instead:

 

class TBT_RewardsOnly_Block_Checkout_Onepage_Link extends Idev_OneStepCheckout_Block_Checkout_Onepage_Link

 

4. Open app/etc/modules/TBT_RewardsOnly.xml

5. Add the following after <TBT_RewardsPlat/> (line 10):

 

<Idev_OneStepCheckout/>

 


Please keep in mind that implementing any modifications to your Sweet Tooth core code does void your support agreement because you're adding dependency to the other module.

 

Comments

User photo
Jonathan Hudson
joannehudson.com

Can this be updated for OneStepCheckout 4.0.8? These instructions are no longer correct.

April 10, 2013 09:41
User photo
Jaap Krijgsman

Can this be updated for OneStepCheckout 4.0.8? en Mangento 1.7.0.2

April 11, 2013 10:24
User photo
Carol Spira
Sweet Tooth

Hey Jonathan and Jaap.  We are requesting this extension from the developer to see whether we can help resolve the extension conflict.  As soon as we have an update, I will be sure to pass it along to you both.  Thanks for your patience.

April 11, 2013 10:34
User photo
Jonathan Hudson
joannehudson.com

Any luck?

April 23, 2013 11:22
User photo
Jonathan Hudson
joannehudson.com

OneStepCheckout is now at 4.0.9. Any chance someone can look into this?

May 02, 2013 09:14
User photo
Carol Spira
Sweet Tooth

Hey Jonathan,

We have been in touch with extension developer and are working together to get this updated and resolved.  I will ensure that we test this out as well for version 4.0.9.  Thanks!

May 02, 2013 12:42
User photo
Jonathan Hudson
joannehudson.com

Just thought I'd check-in again to see how things are progressing.

May 28, 2013 13:31
User photo
Jonathan Hudson
joannehudson.com

Hi, checking in again to see if there are any new instructions that match version 4.0.9 

June 20, 2013 11:42
User photo
Carol Spira
Sweet Tooth

Hi Jonathan and Jaap, the article has now been updated with the steps to resolve the conflict between Sweet Tooth and the newest versions of One Step Checkout.

July 22, 2013 12:01