Gift Certificates and "Credits"

Locked

Views: 2,174

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
30 Apr 2008, 2:53 AM
#1
robear avatar

robear

New Zenner

Join Date:
Apr 2008
Location:
Winnipeg, Canada
Posts:
12
Plugin Contributions:
0

Gift Certificates and "Credits"

Can GC be called Credits?

Can they be used to access or limit access to Links to a secure Web page?
(sim. to a digital download link...)

robear

30 Apr 2008, 3:05 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Gift Certificates and "Credits"

You can rename Gift Certificates to "Credits" by adjusting the appropriate wordings in the various language files.

But renaming begs the question of "why".
Technically a Gift Certificate is considered to be "money", and not necessarily credits such as time or subscription access etc.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Apr 2008, 3:06 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Gift Certificates and "Credits"

If you desire to allow access to certain parts of your Zen Cart site based on whether the logged-in customer has a balance greater than zero, you can simply write a function to check their balance in the database and allow/deny based on the returned value.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Apr 2008, 5:25 AM
#4
robear avatar

robear

New Zenner

Join Date:
Apr 2008
Location:
Winnipeg, Canada
Posts:
12
Plugin Contributions:
0

Re: Gift Certificates and "Credits"

Hi drbyte



Gift Certificates won't fit on my Coin (but Credits!).....:smile:
and it doesn't give the same meaning, although that is semantic.

Where might I find the "simple function" of which you speak?

Perhaps the better question for my current level is where might I find the "WHO" that could create such a function and of course how much?

I am truly impressed at the level of support available within the zenCart community as opposed osC where I spent several weeks chasing this elusive rabbit.

Can you help me with this function or point me to someone else, please?

robear

30 Apr 2008, 7:09 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Gift Certificates and "Credits"

The logic would probably work something like this:```
$gv_result = $db->Execute("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . (int)$_SESSION['customer_id'] . "'");
$gv_amount = $gv_result->fields['amount'];

if ($gv_amount > 0) { 
  .... set ALLOW mode here
} else {
  .... set DENY mode here
}

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Apr 2008, 2:17 PM
#6
robear avatar

robear

New Zenner

Join Date:
Apr 2008
Location:
Winnipeg, Canada
Posts:
12
Plugin Contributions:
0

Re: Gift Certificates and "Credits"

on what directory / .php page would this snippet of code (logic) belong?

or

can I use the same logic as a digital Download where if an item is purchased they are redirected or given a link to follow for Downloading the Item?

robear

28 May 2008, 2:44 AM
#7
robear avatar

robear

New Zenner

Join Date:
Apr 2008
Location:
Winnipeg, Canada
Posts:
12
Plugin Contributions:
0

Re: Gift Certificates and "Credits"

Finally the project is complete with Credits instead of Gift Certificates and a working PHP application instead of a download page.

What a wonderful experience learning zenCart and developing new skill in the process.

Now I get to market the Web Tool and Cart under the same login.

Thanks to all who helped.

Rene
http://treasurechestsolutions.com/DDRcart_v1/