|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
E-commerce Cartweaver - CF8 Advanced Discounting?
Hi,
I'm Chris a graphic designer by trade that has been used to building "pretty" static websites. I recently inherited a "hand me down" website that was built dynamically in .ASP. It was a pretty intense site. Over a 3 year period prior to me getting the site. The site was handed down from one company to the next, finally residing in my hands. Needless to say after touching so many hands, the site was so full of unused pages and outdated e commerce software, that functionality of the site was mediocre at best. I, being a go getter and sometimes not thinking things through logically, said "no prob. I got this" Pressing for a raise and always eager to learn new things, I did some research and decided on rebuilding the site from scratch in CF, and saving myself the hassle of trying to figure out someone else's work and trying to figure out a language that I was very unfamiliar with. As I stated before I am a noob when it comes to dynamic web development. Coldfusion seemed like the obvious answer to someone starting out. Currently I am using Dreamweaver CS3, Coldfusion8, and Cartweaver 3 for my companies new site. Thus far everything I have encountered through out this process has been pretty strait forward. I have been able to edit, and mold code to work for what I needed it to do. I really enjoy coldfusion and it's flexibility. It rocks to say the least! I ran into a problem the other day. This is not a problem with in coldfusion but with my lack of knowledge. Cartweaver has the ability to apply a discount or coupon code at check out. By default it applies a dollar or percentage discount to either certain items or all items. Additionally, promo codes are valid for however long you set the date range for it. My problem is that: my company has requested that there are a set number of valid coupon codes. Lets say 500 unique codes. Once a customer uses a code, that code entered would take off the amount the voucher is good for from the total amount of the customers purchase. Once used, the recent code entered would then be invalid from future use. My noobie thought is that I would have to have the valid codes stored in a database. Along with a script or cfscript to call on the coupon code to apply changes to total amount, and then remove that coupon code or blacklist it from further use. I don't need someone to do it for me. Right now my brain is fried from trying to figure this out Maybe some outside thoughts, a new perspective, and experience with this issue could help out. Sorry for the long post... I'm new here and wanted to introduce myself. Thanks in advance! Chris |
|
#2
|
|||
|
|||
|
Have you actually contacted Cartweaver about this? If the only way they handle coupons is by date range, the only solution I can see is to somehow set the end date of the coupon range to a past date (like yesterday or even the time at which the coupon was used) so that it is no longer valid. However, I've never used Cartweaver so I have no idea if this is possible (is the code open or is it encrypted)?
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Quote:
Thanks for a quick response! I have contacted Cartweaver via there news groups.. Waiting for a response. The code is open. I can display what the code is that handles the discount operation, if that helps... I have also been informed that creating a simple csv file would be the way to go as far as handling the "promo codes" but to stop it from handling the validity by date range, I would imagine would require me to edit Cartweavers code. Which is an option, and I have had to do already for this project. Thanks again! Chris |
|
#4
|
||||
|
||||
|
This would be quite easy i would think, iam quite new to CF but i am quite confident of tackling this.
Hardest part would be having your fucntion working with someone elses code (cartweaver) and working out how it process's at checkout, but again, coffee + a few hours i think its very doable. logicaly speaking i would first work out cartweavers checkout then I would approch problem like so: (excuse vagueness and bad english) Have a table, 4 fields..lets say cuponCde, couponExp, couponValue, couponIsvalid (1 for valid 0 for invalid) Processing this i would prob go; (logicly speaking) Grab the code (from form) and todays date, see if a code exists, if it does, what is the status of validity. If code does not exist, thow error AND or return to checkout and prompt user to check code. If code exisits and is valid, fetch all fields and compare its expiry date with todays date, if expiry is GT todays, mark code as invalid, and return to checkout, and inform user. If LT todays date, apply discount as per couponValue field. Now if you are dealing applying an actual monetery discount (and not percentage like a giftcard sort of thing), than u would also apply logic to see what the purchase price is then see if the purchase price is LT the total value of the voucher, if so, calculate difference, and Update the couponValue field to said difference, if the total value is GT the voucher, u can get away with just marking the voucher as invalid AFTER it has been used. iam not sure if this help, i dont understand english too well |
|
#5
|
|||
|
|||
|
For being new to CF you really seem to have a pretty good grasp of it. Most of what you said makes sense and has helped me out in my approach to this. I am a bit confused though on the reference to the "date" and checking validity of the "promo code"
Im trying to avoid the date range of the "promo code" Ideally I would like it to be valid until used. The voucher would be of monetary value. Thanks for your thoughts on this. Im going to get some coffee and look through the check out code and single out the discount section. Chris |
|
#6
|
||||
|
||||
|
Quote:
ok sorry my bad english, just ignore all reference to date I might check out cartweaver myself someday soon i think |
|
#7
|
|||
|
|||
|
Quote:
No prob! Definitely check out Cartweaver. From my expeirence with it thus far I must say I'm pretty pleased. Thanks again! Chris |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > E-commerce Cartweaver - CF8 Advanced Discounting? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|