Voucher redeem code gone AWAL?

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Post Reply
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Voucher redeem code gone AWAL?

Post by Snooper »

Here is something I spotted and wondered before I dig down and try find a resolve,.. Does any body know about this and have worked out the answer ?

If you buy a gift voucher, the redeem code is stored on the system database, which is where it should be.. But what if the buyer calls you and says (say) they are having a problem using the code when buying. You would almost certainly go to admin and view the customer record as a start position of helping them.

The obvious first question, is why do they need to have called you IF the information being sought should be in their personal accounts section ?
Now here is the second question.. Where would you go to locate the information you need when In the places you would expect the answer to be – Orders > View Orders, the answer is not in view ?

In fact when you drill down on this, you realise that you don’t have any where you can see the redeem code listed. You have the fact and the amount, but so too does the customer. But not the actual code itself. Missing? Not programmed in?

Image
Last edited by Snooper on Fri Jul 30, 2010 11:44 pm, edited 3 times in total.
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Voucher redeem code gone AWAL?

Post by Martin »

Gift vouchers are only available as functions for the most expensive Interspire license and I only have Professional so I've never looked at them or seen any bugs.

I could have sworn you were using the Starter edition so did you mean "Coupon Codes" as provided under the "Promotion" tab?
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: Voucher redeem code gone AWAL?

Post by Snooper »

Yes your right it was Coupon codes *tut* :oops: ty..

My asking the question above was partly not getting the question right (okay, getting coupon and voucher mixed!!) but also by observation from using the Interspire live demo in trying to find my answer. I noted the voucher system and thought I’d use it. It is a good idea and I like its potential and if I can convince myself about upgrading would want to have.

When you go through the buying processes using the Interspir demo, there is a tick option to pay in store rather than go onto what ever bank (Paypal). Now in admin if you now take a look as part of (say) a daily audit. You will see a customers purchase pending. A quick enquiry and it shows it’s a gift voucher and the amount to be paid.. But NOT the redeem code ??!!

Because the ISC online sample has been admin set up, when buying, you as a customer are automatically making an account with the site. As an account owner you can login and look at you current/past account activity. You also get the gift voucher as a purchase and the amount, and obviously not the redeem code. So as a customer, all looks ok.

However, if the customer DOES pay online they get a downloadable gift voucher as we know. But what if they lose that download for what ever reason? They obviously would go to their shop accounts and login, the idea being the answer to the question 'what was that code again'. However, they will only see the fact they purchased a gift voucher and the amount in value, but no redeem code. Suddenly a hole in the system opens as they obviously call the shop to ask for help. Admin has no record either.. !!

It seems both sides were dependant on a single email and nobody with out admin digging through SQL data having a way forward out of this situation.. Am I seeing this right? And if so, what would be the fix?
Last edited by Snooper on Mon Jul 05, 2010 10:02 pm, edited 3 times in total.
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: Voucher redeem code gone AWAL?

Post by Snooper »

I have worked out that the gift voucher when displayed on the ISC test site the script used to show the redeem code seems to be – GiftCertificateBalanceRemaining.html

<div class="Moveable Panel GiftCertificateBalanceRemaining" id="GiftCertificateBalanceRemaining">
<h2>%%LNG_GiftCertificateBalanceFor%% %%GLOBAL_GiftCertificateCode%%</h2>
<div class="InfoMessage">
%%GLOBAL_RemainingBalance%%
</div>
</div>

I shall (on my own it seems) try work out what is what here. In the mean time I have drilled down the location of the shopping cart from the admin side – Orders > View orders
And traced through the nets of code the constructed page gave (right click view source) to a point where I see the following –

<div id="GridContainer" class="GridContainer">
<table id="IndexGrid" class"GridPannel SortableGrid AutoExpand" cellspacing....... >
:
:
<td id ="trQ32" class="QuickView" colspan="12">
<table.....
<tbody>
<tr>
<td class="QickViewPannel".....
:
The code is the left section Billing Details
:
</td>
<td class="QuckViewPannel".....
:
If used this code would be Shipping Details
:
</td>
<td width="33%" valign="top" style=".......
<h5>Order Details</h5>
<table...
:
Everything customer has purchased listed here including price, totals etc
:
</table>
</td>

As a novice PHP writer, I can only assume the section starting with <td id ="trQ32" class="QuickView" colspan="12"> and the last section headed 'Order Details' is the location not showing the redeem code (as I think it should be). This makes the class QuickView (???) possibly key to a solution. Only three classes seem to have reference to QuickView – class.remote, shipment and orders PHP respectively.

I can not work out if any of the three are constructing the table OR that it is a table called or constructed from script from some other place. But by end of this evening (maybe) I shall have a better idea one way or another..
Last edited by Snooper on Mon Jul 05, 2010 9:59 pm, edited 2 times in total.
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Voucher redeem code gone AWAL?

Post by Martin »

Snooper wrote:Yes your right it was Coupon codes *tut* :oops: ty..
Actually, based on what you've added since it's pretty obvious that you are referring to Gift Vouchers which are definitely in the enterprise version and way above my pay grade. Given that most folks didn't really need the extra features in that version I doubt anyone has any useful intel but someone may spot something that makes sense while you delve in there and post your thoughts out-loud.
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: Voucher redeem code gone AWAL?

Post by Tony Barnes »

Yep, no gift certificates for us either. Looking in the SQL the table isc_gift_certificates would appear to hold all the info you are after.
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: Voucher redeem code gone AWAL?

Post by Snooper »

Thank you for that pointer Tony.. Although I doubt if Interspire would be forward in letting me dig that deep into their database.. *lol*

However, I was able to take your pointer and work around the phrase isc_gift_certificates.. What I found was a class.giftcertificates.php has the line –

$GLOBALS['GiftCertificateCode'] = isc_html_escape($certificate['giftcertcode']);

With that I was able to trace using a dummy sale from the ISC test site a section of code that had the following script when viewed in a browser –

<div>Code:
<span id="GiftCertificateCode">26Q-D50-0Z9-9O7</span>
</div>

This in turn feeds (I think) back to the original code from the one line above, to start life as –

<div>%%LNG_CertificateCode%%:
<span id="GiftCertificateCode">%%GLOBAL_GiftCertificateCode%%</span>
</div>

IF I am right, then it would suggest that the method of showing on screen the now printable reddem code is my next task to learn. After which to place what ever works (shows the code) on the correct line for a customers Order Details (admin view) and based on the above and then where to locate it correctly in the main code as a mod is the next task. I think as I posted before, I have the right general coded area on admin page, even if not the ‘actual’ PHP or what ever that constructs that section (table).

So in the end instead of admin (and I hope the customer seeing this) --

Order Details
All items in this order are downloadable, so no delivery is required.

1 x £3.00 Gift Voucher £3.00

The mod I am looking for means instead they see --

1 x £3.00 Gift Voucher 26Q-D50-0Z9-9O7 £3.00 etc etc and another dumb Interspire over sight resolved !!!
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
Snooper
Posts: 264
Joined: Sat Jun 26, 2010 9:22 pm

Re: Voucher redeem code gone AWAL?

Post by Snooper »

With thanks to user cupargarden I now know the partial answer to my question was under my nose *lol*

Marketing > View Gift Certificates

So with this information I can assume how that code was retrieved and then posted, is somewhere where a solution to my question maybe found. You see, the reason why I asked the question in the first place, was because of what was learnt on the ISC test site and result of sorting something completely different out !!

BUT (always a but) CAN the redeem code now be integrated into the admin section so it sits along side the information on the admin Order Details page ? I know it is unlikely we would use ‘pay at shop’ as a check out option. But the information is missing where it should be for both places….

Customers > View Customers (view all customers) select Customer who has a voucher > View Complete Order Detail (the sample image given above)

AND the customers own Accounts page.. My Account > Order Status (and or) View Order Status

What cupargarden has done however, is shown me where to look for the script so I might find a way to embed this in the right places of ISC. Well, in my limited knowledge of the subject, will give this a go.....!!

But yes, many thanks for a 'glint' of light !!
ISC 5.5.4 Ultimate : Being used here -- http://www.kdklondon.com
Post Reply