Slow product page updates

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Slow product page updates

Post by heinscott » Thu Jul 31, 2008 9:53 am

Can someone help me with a bit of customization troubles?
I have added a bit of customization to my products page. One of them is to popup a "Please Select a valid size" message when the Add to Cart button is clicked when no option had been selected. To accomplish this, I just wrapped the whole OnCLick method in an If statement that would add a popup event to the button to run on pageload. Now, for some reason, this takes an unreasonable ammount of time. It's an extremely easy task, but takes more time that it takes to initially load the whole page!
Also, I have my product price tied to the selected option (and displaying the lowest kit price otherwise), so that the price shown in Orange changes when a different option is selected. This also takes extremely long on my server.
Now, on my development side (which is a vista machine, with SQL Express), everything runs much quicker... In fact, the AJAX working screen never even comes up. On my production server, however... Whoah! Look out!! Sometimes, 5 or 6 seconds.
Here is a good page to test this out on...

http://localhost:53336/AquaChek-7-Way-T ... P2938.aspx

Does anyone have any ideas for me? I'm at my wits end. I can't figure out a way of doing the check on the client side either, since these elements already have onchange or onclick event associated with them. Maybe I just don't have enough experience to come up with the best solution. That's what I'm betting on :)
Any help would be greatly appreciated!

Scott

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Slow product page updates

Post by heinscott » Fri Aug 01, 2008 7:18 am

Anybody have any ideas??

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Slow product page updates

Post by mazhar » Fri Aug 01, 2008 7:28 am

Please provide some valid URL this seems to be your localhost URL and doesn't work
http://localhost:53336/AquaChek-7-Way-T ... P2938.aspx

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Slow product page updates

Post by heinscott » Fri Aug 01, 2008 7:37 am

I'm SO sorry! My fault completely! I've been staring at this code for so long, it's caused me to lose my mind!!
Here is the URL for the production site. http://76.12.100.221/BioGuard-Polysheen-Blue-P2239.aspx
Thanks Mazhar!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Slow product page updates

Post by mazhar » Fri Aug 01, 2008 9:21 am

You can try it with the client side script for example you can define a some javascript on the product control with a function like below

Code: Select all

<script type="text/ecmascript" language="javascript">
function OptionCheck()
{
    selectElement = document.getElementById("here will be the dropdown id etc");
    if(selectElement.value == "")
    {
        alert("Please select blah blah...");
        return false
    }
    return true;
}
</script>
and call the above function at the client click of the AddToBasket button as below

Code: Select all

<asp:LinkButton ID="AddToBasketButton" runat="server" SkinID="Button" Visible="true" OnClick="AddToBasketButton_Click" Text="Add to Basket" EnableViewState="false" ValidationGroup="AddToBasket" OnClientClick="return OptionCheck()"></asp:LinkButton>
Last edited by mazhar on Mon Oct 20, 2008 10:53 am, edited 1 time in total.

User avatar
heinscott
Captain (CAPT)
Captain (CAPT)
Posts: 375
Joined: Thu May 01, 2008 12:37 pm

Re: Slow product page updates

Post by heinscott » Fri Aug 01, 2008 9:39 am

Thank you so much Mazhar! I did not know that the OnClientClick existed. That will solve everything for me.
Thanks again!

Scott

Post Reply