Wednesday 7 September 2011

Development Blog - Branded Sites

Today I have been working on completing the last sections of code update for the basket to include the value of the gift cards/gift vouchers in the order total. the first section of code that required changing was the pre-basket preparation code that is run after the customer selects a method of postage and where to send the card.

The second part that required updating was the code within the basket itself, which needed to be update to call the extra fields from the table, and display the information within the basket. It was also necessary to update the totals array to include the total of all gift cards in the basket. I have also added some additional code to display a thumbnail image of the gift card the customer has purchased next to the card preview image in the basket.

I've also been working on the images for the inside left page of the card preview, and have now created one for each of the available gift cards for B&Q, much as I did for New Look. With those images done, I have also been able to complete the B&Q include file, and once I have a domain and directory for the B&Q site I will be able to test that it is working.

The annoying preview display glitch decided to rear its head again today. It seems that though I though I dealt with the issue, I either missed some of the code, or had accidentally overwritten one of the modifications I had made, and so some of the time the preview generator was looking for an older png version of the back page, which was only a half completed page, and was also not supported by the version of flash being used, and so the whole preview would not display. Having fixed that minor glitch, it seems that it all works fine now, and repeated runs through the system haven't thrown up any other errors.

Another thing that I had to do for these demo branded sites was edit some session variables to convince the site that a user had already logged in (using one of my test accounts), in order to bypass a number of issues the login code sometimes caused. Unfortunately due to the fact that the login code was built over a number of successive iterations of the original hello turtle design, and in some places still referred to old elements of the code, it occasionally caused errors when it forced the customer to login half way through the card process. Fooling the system so that it believes the user to already be logged in fixes this problem as the card process will never be interrupted.

Finally, I've managed to fix a minor bug with the gift card selector which was preventing the list of cards from scrolling left or right when the user hovered over the cards. This was a necessary function in order to reduce the amount of space (either horizontal or vertical) that the list of gift cards took up, by limiting the visible width of the list to around a sixth of the total width of the list, and then using javascript to allow the user to scroll through the list, dynamically updating which of the list items were displayed in the visible area of the list.

No comments:

Post a Comment