SourceSquare Official Blog:

All About Web Design and Search Marketing

Drupal Commerce: Adjusting Stock from Code

Recently I have been working on a project using Drupal Commerce to build a Jewelry online shop for client. At one point we needed to find a way to adjust the stock of a product that is referenced by another product through the use of Entity Reference field, and unforutnately the current implementation of DC does not provided the needed feature in Rules, hence we had to do it through Code.

After some testing, turned out the stock data is not simply stored in just 1 table (or perhaps there was something that we did wrong? :P), though thanks to the awesome work from Commerce Guys they have already implemented some very useful functions that will ease the pain digging through the data structure. The following steps already assume that you have commerce_stock module installed already.

Using Views Programmatically - HKDUG Meetup with Jason Yee (Jyee)

We had our monthly Hong Kong Drupal User Group meetup last week (thanks to CNNGo.com for the always wonderful venue), and this time it is a little bit different. Jason (jyee at Drupal.org) from Aten Design Group, one of the organizers of the upcoming Denver Drupalcon 2012 and a well known contrib module developer has joined us for the evening, and shared some of his thought on "Using Views Programmatically".

For those of you who missed the presentation, here is a video of the same presentation Jason did back in Drupalcon Colorado 2011:

Steve Jobs 1955-2011


Steve Jobs   1955-2011

Steve Jobs    1955-2011


Your inspirations will live in your Designs, in Apple, and in All of Us who admired you, forever.

May you rest in peace.


標籤:

Print Taxonomy Terms in Blocks and page.tpl.php in Drupal 7

I recently have started working on a Drupal 7 project creating a comparatively simple brochure website. To my surprises a lot of familiar functions, syntax and platform for simple things have changed dramatically! Certainly many functions and handlers are become easier and simpler to do, however there are a lot of simple procedures gets to be more complicated.

Getting the Taxonomy term in page.tpl.php is one of them.

Drupal 6 - Taxonomy Term using $term object

Back in Drupal 6, Taxonomy terms are embedded in $node object. To print the taxnomy term, all you need to do is get it directly from the $node object:

<?php
foreach ( (array)$node->taxonomy as $term ) {
// $term->name has the taxonomy term name
// $term->tid has the taxonomy term id
}
?>

建立網站和博客 Blog 常用辭彙 Glossary

建立網站和博客 Blog 常用辭彙 Glossary我剛開始網頁編程和搜尋引擎行銷相關的工作時,最令我頭痛的就是每天到要面對數十個不認識的專門辭彙,隨時可能要花半天的時間在網上找這找那的,十分耗費時間,所以整理了一個建立網站和博客 Blog 常用辭彙 Glossary,希望能幫大家節省一點點寶貴的時間。

A

Above the Fold - 打開一個網頁時不需要垂直滾動就能看到的頁面範圍,這是每一頁最有價值的位置。

AdSense - Google AdSense 是一項可增加線上發佈商獲利機會的免費計劃,透過這項計劃,即可在各式各樣的線上內容中顯示相關廣告,賺取廣告收入。

Affiliate  - (電子)商務夥伴,又名聯合行銷夥伴,他們會在自己的網頁或博客中推廣別人的產品或服務,從中抽取部分交易收益作為中介費或佣金。

Affiliate Program - 電子商務伙伴計劃,又名聯合行銷計劃,是有內容、產品或服務供應商設立的計劃,計劃的營運方式是把部分營業額與提供聯合行銷服務的合作夥伴分享所帶來的直接收益。

Archives - 檔案匯總,其實是指舊或過期的博客文章的匯總,通常都是按發表日期排序。

Analytics - 網站分析,通常是指一些關於你的博客或網站流量和關鍵字等的數據。

Analytics Program - 網站分析系統,用於收集你的網站流量相關的數據,然後提供各種不同類型的圖表作分析用途。

Why Has Drupal CMS Become Our Choice of Development Platform?

Image of Various CMS SystemsBefore we jump right into Drupal CMS, perhaps we should start why the market is obsessed with designing websites with CMS.

What is CMS? Why CMS?

"CMS" (Content Management System) is THE hip, trendy term on the Internet in 2010s. As elegantly described in Wikipedia, a Web CMS is basically a system that "simplifies the publication of web content to web sites and mobile devices -- in particular, allowing content creators to submit content without requiring technical knowledge of HTML or the uploading of files."

Generally speaking, the rise of CMS is due to the huge success of Blog platforms like blogger.com. Ever since the launch of blogger.com in 1999, next thing I know everyone has started publishing on the Internet, and the volume of new content published online exploded in folds ever since.

Drupal vs Wordpress vs Joomla - 應該怎麼選?

Drupal vs Wordpress vs Joomla

這一直以來令無數 developer 茶餘飯後,茶飯不思廢枕忘餐的辯論:Drupal vs Wordpress vs Joomla,到底應該選哪一個?到底哪一個比較好,比較適合?作為一個 developer 我當然也有偏好,但關係到客戶的網站,作為 Web Design Agency 還是必須得客觀、實際一點的去為了客戶切身的考慮才行。

根據經驗...

為客戶設計網頁經常都有接觸過 DrupalWordpressJoomla ,有些時候是因應項目的需要而要選用特定的 CMS 平台,有時候則是因為需要修改客戶一直沿用的 CMS 平台而接觸到。總括而言,如果客戶需要一個完成度較高,而又較易上手的 CMS 平台,我一般都會建議使用 Wordpress,因為它的系統架構較簡單,而且用戶介面比 DrupalJoomla 都要易用。如果要設計一個功能簡單的網站(例如: BLOG 網站),Wordpres 可以說是當然之選。

Youtube Is Rolling Out New Expand Feature

Youtube New Expand FeatureJust while I was stumbling upon Youtube looking for a few relaxing video clips to spice up my breakfast, I was surprised and super excited that Youtube has finally started rolling out the most wanted feature (of mine) -- viewers can now "expand" the video to window size!

Ok, it might be quite confusing to those who don't usually use the expand feature. "Expand" is a button that locates on the lower right corner of every youtube video (this feature is only available if you are watching the clip on Youtube.com). Once you click on it, it will expand the video clip to the size of your browser window, and change the resolution automatically from 360p to 480p. 

新年快樂,兔年吉星高照!

致親愛的客戶和朋友,

我們能有今天的成果全靠各位一直以來對我們的支持和信任,實在要感謝每一位曾給我們寶貴的機會和意見的朋友。我們的團隊已整裝待發,準備好來年盡全力報答大家的支持!

謹祝各位兔年生意興隆,財源廣進,業務蒸蒸日上!

Best,

Kelvin Lee
Director
SourceSquare | Search Marketing Strategies

標籤:

Link Request 是什麼?為什麼你不能忽視?

你有自己的網站嗎?還是你負責管理你公司的網站?你有沒有收過別的網站管理員向你提出交換連結的要求?我們會告訴你為什麼你需要重視這些 Link Request,和當你收到這些 Link Request 的時候應該怎樣處理;如果你曾經收過這些電郵而你直接把它們丟掉的話,建議你立即到資源回收筒找一下,因為正確處理 Link Request 可能會為你的網頁帶來意想不到的收穫。

Link Request 是什麼? Links (網站連結)到底有什麼作用?

Why You Should Care About Link Requests現代搜尋引擎都以數以百計的條件去決定一個網頁在搜尋結果的排名,單以 Google 為例,搜尋排名的條件就多達200+(註:「排名」在這裡指搜尋結果排名 [SERP Ranking / Position],不是網站排名 [PageRank])。每一個因素的份量都不同,而且還會因應環境,使用者習慣等等而不斷更新,確保搜尋結果質素的同時,防止有人蓄意欺騙搜尋引擎排名。

在眾多影響排名的人數當中,但是涉及 backlinks 連結的就佔總比重的15%,足以直接影響一個網站、甚至乎整個 marketing campign 的成敗。

標籤:
訂閱文章