Page 1 of 1

Help please

Posted: Wed Mar 26, 2008 6:13 am
by bagsobrands
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.


Hi I'm learning php as I develop cubecart and Joomla websites. I am trying to set a minimum order value on a cubecart I am working on. I have got it to the point where it blocks orders below £25 and calls a java message to let the customer know but it keeps defaulting back to the index page once the customer has ordered over the set ammount.
the script below is part of a the hack that I used. Could anybody tell me what it means and if possible, where I'm going wrong.

Code: Select all

   if(($grandTotal<25) && (($_GET['act']=="step2") || ($_GET['act']=="step3") || ($_GET['act']=="step4") || ($_GET['act']=="step5")))
    {
        $view_cart->assign("VAL_UNDER_LIMIT1", "<a href=\"#\" ");
        $view_cart->assign("VAL_UNDER_LIMIT2", " class=\"txtCheckout\" onclick=\"javascript&#058;alert('Minimum Order Value is £25.00 please add more to the cart');\" >");
        $view_cart->assign("VAL_UNDER_LIMIT3", " </a>");
    }
    else
    {
        $view_cart->assign("VAL_UNDER_LIMIT1", "<a href=");
        $view_cart->assign("VAL_UNDER_LIMIT2", " class=\"txtCheckout\">");
        $view_cart->assign("VAL_UNDER_LIMIT3", " </a>");
 
Sorr if this isn't how it's done , i'm new to the forum .
Any help would be greatly appreciated as i need this done by Yesterday.

Cheers Nigel Turner (Bagsobrands)


~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.

Re: Help please

Posted: Wed Mar 26, 2008 10:25 am
by pickle
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.