Add Linkshare Pixel To Magento

Posted: April 19th, 2011 | Author: | Filed under: magento, php, web | No Comments »

Add this code to:
\app\design\frontend\enterprise\<your theme>\template\checkout\success.phtml

<?php
 
$order_id = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getModel('sales/order')->load($order_id);
$_totalData = $order->getData();
 
/*linkshare vars*/
$skus = array();
$qtys = array();
$amounts = array();
 
foreach ($order->getAllItems() as $item) {
 
        $skus[$item->getProductId()] = $item->getSku();
	$names[$item->getProductId()] = rawurlencode($item->getName());
	$qtys[$item->getProductId()] = $item->getQtyOrdered() * 1;
	$amounts[$item->getProductId()] = $item->getRowTotal() * 100;	
}
 
$order_id = $_totalData['increment_id'];
 
$skuspipe = implode("|", $skus);
$namespipe = implode("|", $names);
$qtyspipe = implode("|", $qtys);
$amountspipe = implode("|", $amounts);
?>
<img src="https://track.linksynergy.com/ep?mid=xxxx&ord=<?php echo $order_id ?>
&skulist=<?php echo $skuspipe ?>&qlist=<?php echo $qtyspipe ?>&amtlist=
<?php echo $amountspipe ?>&cur=USD&namelist=<?php echo $namespipe ?>">

Make sure to replace ‘xxxx’ with your own Merchant Id number

Code modified/corrected from this post .


Magento: Load Javascript On One Page Checkout

Posted: March 18th, 2011 | Author: | Filed under: magento | 1 Comment »

Add this to page.xml

<checkout_onepage_index>
    <reference name="head">  
         <action method="addItem"><type>skin_js</type><name>js/myscript.js</name></action>
    </reference>
</checkout_onepage_index>

The type ‘System.TimeZoneInfo’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′

Posted: December 10th, 2010 | Author: | Filed under: rando | 4 Comments »

To fix the error in C# project:
The type ‘System.TimeZoneInfo’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′

Download and install .Net Framework version 3.5 (If you don’t already have that version).
After installation go into your project and add a reference to System.Core (.Net Tab), make sure the version is 3.5


Stream Music to iPhone from Home Computer

Posted: August 12th, 2010 | Author: | Filed under: iphone | 12 Comments »

audiogalxyAs a replacement to the now defunct SimplifyMedia, I have been using, and highly recommend audiogalaxy to stream any mp3 or .m4a (DRM free) to my smart phone.  This app can run on the iPhone/ iPad/iPodTouch or any Android device.  The server application (running on the computer with your music files) can be installed on any Windows or  Mac OS X 10.5 or greater machine.

Here’s a quick run down for comparison.

Audiogalaxy Pros:

  • Quickly loads large library (15k songs) on iPhone – tested on 3G
  • Has a web interface that allows you to play your library on an internet connected PC/MAC/Linux box
  • Allows you you shuffle entire library
  • Low processor footprint on server
  • Works over 3g or WiFi
  • Actively Developed – New features regularly added
  • Free!

Audiogalaxy Cons:

  • Does not buffer more than one song, so there is a delay between the songs
  • No support for .flac or .ogg
  • I couldn’t import my iTunes playlists

Minor Gripes:

  • Can’t scrobble to last.fm
  • No way to add friends or share library

That’s it!  Overall, I find audiogalaxy to be the best software that streams your home music library to your smart phone.

Audiogalaxy Web Interface

Audiogalaxy Web Interface