Virtuemart E-Commerce

Virtuemart E-Commerce

Virtuemart HomeSudah lama juga nih nggak ng-update blog. Sehubungan dengan kesibukan akhir-akhir ini yang makin menyita waktu. Meskipun sibuk, harus tetap semangat. Betul ? :D

Bermula dari kuliah e-commerce yang saya ikuti. Ada beberapa model bisnis dalam jagat E-commerce ini. Antara lain Bisnis to Bisnis (B2B), Bisnis to Customer (B2C), Customer to Customer (C2C) dan belakangan Goverment (pemerintah) pun ikut masuk juga dalam model bisnis E-commerce ini. Kedepannya E-commerce akan bertambah marak, hal ini diperkuat dengan M-Commerce (mobile commerce) yang memudahkan kita dalam bertransaksi melalui media mobile seperti Handphone.

Virtuemart List

Virtuemart Detail

Tak disangka dosenku memberikan tugas masing-masing mahasiswa untuk membuat sebuah Website E-commerce. OsCommerce, satu nama Content Management System (CMS) langsung terlintas di benakku.

Tapi pilihan itu kandas terkait sulitnya mengkustomisasi tampilan (template) website OsCommerce.

Pilihanku pun jatuh pada Joomla, sebuah CMS yang sudah dikenal luas. Kebetulan Joomla pun sudah mempunyai komponen khusus E-Commerce yaitu bernama Virtuemart (Thanks ya Mr. Febri atas rekomendasinya).

Berikut adalah langkah-langkah dalam menginstall sebuah website E-Commerce menggunakan Joomla CMS:

  1. Jika belum tersedia webserver, anda bisa menginstall nya di komputer anda sendiri dengan memakai Installer Wamp atau Apache2Triad . Installer tersebut akan otomatis menginstall Apache-PHP-MySQL di komputer anda.
  2. Download file instalasi Joomla+Virtuemart di sini . Waktu itu saya pilih untuk mendownload Joomla! 1.0.15 eCommerce Edition yang berbentuk file terkompresi (tar.gz).
  3. Buatlah sebuah database baru di MySQL, namanya terserah anda tapi yang penting harus diingat karena akan dibutuhkan pada step berikutnya.
  4. Ekstrak file Joomla.tar.gz tersebut ke folder htdocs atau www di webserver anda, namai direktori tsb dengan joomla. Kemudian buka web bwoser, bukalah halaman instalasi Virtuemart dengan mengetikkan http://localhost/joomla/instalation. Ikuti step-step pada proses instalasi dan jangan lupa untuk memasukkan nama server database MySQL (isi dengan nama localhost), masukkan username MySQL (biasanya : root), password MySQL (biasanya tidak di isi / dikosongkan), serta nama database yang tadi dibuat pada point nomer 3. Setelah langkah terakhir selesai, anda akan diminta untuk menghapus direktori tempat file-file instalasi Joomla berada, untuk keperluan security.(biasanya ada di ..\www\joomla\instalation atau di ..\htdocs\joomla\instalation).
  5. Untuk memanage Website anda bisa membuka alamat http://localhost/joomla/administration. Sedangkan alamat “toko” E-Commerce anda adalah di http://localhost/joomla/

Secara kita kan hidup di negara yang tercintah ini. Jadi ya sikon(situasi dan kondisi)nya harus disesuaikan juga toh. Mulai deh setting-setting ganti mata uang US$ (default) ke mata uang Rupiah (Rp.).

Masalah muncul saat menginputkan produk-produk yang harganya mencapai jutaan rupiah (8 digit atau lebih). Harga yang ditampilkan makin ngawur di Website.

Solusinya yaitu dengan merubah parameter di database MySQL yaitu :

di Field product_price pada tabel jos_vm_product_price dirubah typenya dari 10,5 menjadi 16,5 atau 20,5 sekalian. Artinya agar field product_price dapat menampung nilai harga, maksimal 20 digit.

Muncul problem baru lagi, website yg sudah dibuat susah-susah, malah gak bisa tampil sempurna di komputer lain (layout, font dan keseluruhan template gak tampil dengan benar). Fiuhh, ternyata problem ini adalah WAJAR. Banyak pengguna Joomla yang bernasib sama.

Eits jangan putus asa dulu, ada solusinya nih. Caranya :

buka file configuration.php di folder ..\www\joomla atau ..\htdocs\joomla.
Rubah $mosConfig_live_site = ‘http://localhost/joomla’;
menjadi
$mosConfig_live_site = ‘http://ip_address_komputer_anda/joomla’;
atau
$mosConfig_live_site = ‘http://nama_komputer_anda/joomla’;

Pasti sekarang Website anda sudah tidak berantakan lagi kalau diakses dari komputer lain.
Sekian dan terimakasih. Mudah-mudahan tugasku dapat nilai yang memuaskan. :)


Ref :

1. http://agung-nugroho.web.id/?p=53=1

2. http://www.chris-wallace.com/2009/07/17/simplecartjs-a-free-wp-e-commerce-thematic-child-theme/

3. http://www.joomla.org/download.html

4. http://dev.virtuemart.net/redmine/projects/virtuemart/files

Hitung hari antara 2 tanggal (minus tgl merah)

Hitung hari antara 2 tanggal (minus tgl merah)
procedure TForm1.Button1Click(Sender: TObject);
var
tglmerah,sabtu, minggu,jml:integer;
jumlah:variant;
tgl1,tgl2:tdatetime;
begin
tglmerah:=3;
tgl1:=encodedate(2010,04,01);
tgl2:=encodedate(2010,04,30);
jml:=0;
while tgl1<=tgl2 do
begin
if (formatdatetime('dddd',tgl1) ='Sabtu') or (formatdatetime('dddd',tgl1) ='Minggu') then
jml:=jml+1
else
jml:=jml+0;

tgl1:=tgl1+1;
end;
tgl1:=encodedate(2010,04,01);
jumlah:= tgl2-tgl1;
jumlah:=jumlah-jml -tglmerah;
showmessage(inttostr(jumlah));
end;

Instalasi zkemkeeper_TLB.pas (Component Read Log Fingerprint)

Instalasi zkemkeeper_TLB.pas (Component Read Log Fingerprint)
It has 2 method:
1,download stand alone SDKs from zk website and copy these sdks to system32 directory. use "regsvr32 zkemkeeper.dll" in the run window. or you install the access control and T&A software, it will auto-install zkemkeeper.dll
import zkemkeeper.dll Activex control, please see http://hk.zksoftware.com/bbs/vie ... &extra=page%3D1.

2, If you haved registered the zkemkeeper.dll, but you update the zkemkeeper.dll, because the sdk add a new function, but you didnt find it special function. so you need copy the new dlls to the system32 directory, and use "regsvr32" command. then you need open the delphi, select menu Component->Import Activex control->ZKEMKeeper 6.0 Control->Create Unit.


Getdate() In SQL Server

Getdate() In SQL Server

Be Careful That You Know What Getdate() Returns

by Les Smith
Print this ArticleDiscuss in Forums

Be careful when using getdate() in SQL Server as a Start or End date for a sql statement or Stored Procedure. This is fairly elementary for most developers, but could give you a problem if you are not aware that the getdate() function in SQL Server returns both the current date and time.

For example if you had a Where clause that went something like this:

Where Date_Requested >= getdate() - 1


and you wanted records that were requested yesterday....

Since
getdate() returns current date and time, depending on the time that the query is run, you probably will not get what you are expecting. What you probably wanted here was just yesterday's date and a time of 00:00:00, meaning that you wanted all records that were requested yesterday. Unfortunately, using just a call to getdate(), you won't get all the records.

There are several ways to correct this, and probably can be done easier than I will demonstrate below, but the following line does the trick.

Where Date_Requested >= cast(convert(varchar(8),getdate()-1,1) as datetime)

What I have done is to convert the DateTime value returned from getdate() to varchar and then cast it back to DateTime. The effect is to drop the time and reinsert it as 00:00:00. I am sure someone will tell me an easier way, but let's just don't get caught thinking we are getting all of the records, when we aren't.

If you have comments on any of my articles, or want to ask a question, contact me on my blog at
Les's Blog.


http://www.knowdotnet.com/articles/getdatereturn.html