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 2, 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 2, 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
User photo
yoav

Hi Carol 

we run SweetTooth 1.8.4.0 and latest OneStepCheckout.com ver 4.1.3 with Magento 1.8.1

I'm checking on compatibility issues as this thread is from 2013. do we need any patches as stated above ? 

can you confirm these patches, if needed, are updated for recent versions of Magento 1.9,ST 1.8.4.3, OSC 4.1.3 ??

thank you

January 15, 2015, 15:07
User photo
Roel
Sweet Tooth

Hi Yoav,

Please ask your developers to check the section "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:".

Thanks!

 

January 15, 2015, 15:16
User photo
Eric

Hi, 

I'm using Magento 1.9.1, One Step Checkout 4.1.3, and Sweet Tooth 1.8.5.1 (Start-Up). However when I follow the steps in  "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:" the REVIEW YOUR ORDER section on the OneStepCheckout page is now blank.  

There are some additional steps for Sweet Tooth Platinum users, but I didn't follow these steps as I don't believe they apply to me. In fact I don't even see a "Platinum" option on your website. 

Also, the last line in step 1 is missing ?> at the end.

 

Thanks!

March 31, 2015, 01:40
User photo
Lynn Aque Penaloza
Sweet Tooth

Hi Eric,

Thanks for pointing out the missing ?> on the last line. Our technicians could not replicate the issue, there could be other reason why you are seeing a blank page. Please contact support@sweettoothrewards.com so we can look into this further for you.

Regards,

Lynn

March 31, 2015, 05:17