Help please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bagsobrands
Forum Newbie
Posts: 1
Joined: Wed Mar 26, 2008 6:05 am

Help please

Post 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.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Help please

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply