News

Asia Connect Special Offer

We only build the successful webshops!

We offer Unique Webshop
At Asia Connect Technology, we appreciate both creativity and diversity. We strongly believe that each business customer is unique and so are the webshop design requests. You can trust in us for an unique and exclusive webshop of your own that is specifically adapted to your concrete business requirements and goals. Our expert team will provide you with innovative concepts to choose and you can select the one which best suits your needs. Thus you can expect really professional services and individual …

Read More »

Our blog

16 Oct 16 Oct 2009 Comments Off

Most of you probably know this, but here’s a little code snippet for every Magento beginner that needs page with products on sale listing.
So, easiest way to accomplish that is to follow these steps…
1) Make CMS page called “Products on sale”, or whatever you wanna call it…
2) Put this code:

{{block type="core/template" template="callouts/products_on_sale.phtml"}}

in CMS page you created
3) Make app/design/frontend/default/YOUR_THEME/template/callouts/products_on_sale.phtml
4) Put this code in products_on_sale.phtml

< ?php
$product = Mage::getModel(’catalog/product’);
$collection = $product->getCollection();

foreach ($collection as $product)
{
$result[] = $product->getId();
}

$j = 0;
$product_ = array();
foreach ($result as $_product_id)
{
$in_stock = 0;

$_product = new Mage_Catalog_Model_Product();
$_product->load($_product_id);

#var_dump(get_class_methods(get_class($_product)));exit();
$time = time();
if(strtotime($_product->getSpecialFromDate()) …

Read More

 
15 Oct 15 Oct 2009 1Comment

Adding an Adwords tracking code to order confirmation page in Magento is relatively easy task. One that can be handled under an hour or so if you choose to implement it the proper way. Here is how.
Modify the “app/design/frontend/default/my_custom_theme/layout/checkout.xml” file. Look for section

<checkout_onepage_success>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block name="checkout.success" template="checkout/success.phtml" type="checkout/onepage_success" />
</reference>
</checkout_onepage_success>

And turn it into

<checkout_onepage_success>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block name="checkout.success" template="checkout/success.phtml" type="checkout/onepage_success" />
</reference>
<reference name="before_body_end">
<block name="google_adwords_tracking" template="checkout/google_adwords_tracking.phtml" type="core/template" />
</reference>
</checkout_onepage_success>

Create the “app/design/frontend/default/my_custom_theme/template/checkout/google_adwords_tracking.phtml” file and copy-paste the the Adwords tracking JavaScript code into it.

This code relies on

< ?php echo $this?>getChildHtml(’before_body_end’) ?>

block call from footer of each …

Read More

 
15 Oct 15 Oct 2009 Comments Off

This post describes how Magento navigation works. I hope it will help you.
The begining of all is in template file: “category/navigation/top.phtml”

<ul id="nav">
< ?php
foreach ($this->getStoreCategories() as $_category): ?>
< ?php
echo $this->drawItem($_category);
?>
< ?php endforeach ?>
</ul>

There we call the method from class Mage_Catalog_Block_Navigation $this->getStoreCategories(). This method returns the array $_nodes from object Varien_Data_Tree_Node_Collection.
This array contains objects of Varien_Data_Tree_Node.
Every node is object of Varien_Data_Tree_Node and it is extension from Varien_Object.
Example 1:
If we wish to see how much categories we have, we can do it with method showed below:

< ?php
echo $this->getStoreCategories()->count();
?>

We will get only number …

Read More

 
14 Oct 14 Oct 2009 1Comment

There are two unused product list blocks in Magento which can be very useful if you push a few buttons, edit few layouts ..

1. Promotion
Block located in app\code\core\Mage\Catalog\Block\Product\List\Promotion.php
This is basically built in featured product functionality. It reacts to “promotion” attribute which needs to be created, so let’s click
Catalog->Attributes->Manage Attributes->Create New Attribute
Attribute Code: promotion
Scope: Global
Catalog Input Type for Store Owner: Yes/No

Label: Promotion (second tab)
Other params can be left alone, but it’s up to you of course. I also labeled it Promotion just for this article.
Now we need to add …

Read More

 
14 Oct 14 Oct 2009 Comments Off

In order to speed things up with building admin sections under System > Configuration area in Magento I wrote a little blank extension. Hopefully its a step or two beyond “Hello world” level. I named the extension “CoolDash”, short from CoolDashboard. Name holds no special meaning, just something I popped out of my head. First thing you might notice when you open config.xmls and system.xml is the attribute naming. I intentionally used names like “somecooldashmodel2″. I found it extremely difficult, error prone and annoying to get around in scenarios where …

Read More