X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   add to cart button help (https://forum.x-cart.com/showthread.php?t=25810)

lootsale 10-15-2006 05:21 AM

add to cart button help
 
hi guys,

could you tell me that how can i change the link on add to buy button so it would keep me to the same page when i click on add to cart button. it takes me to the basket page which i dont want becuase i have mini basket which appears once you click on add to basket.

you may view the website at www.lootsale.co.uk

Kind Regards,

balinor 10-15-2006 05:33 AM

Re: add to cart button help
 
General Settings/Redirect customer to cart. Uncheck it.

lootsale 10-15-2006 03:38 PM

Re: add to cart button help
 
nice, fanx..

digitalchild 02-08-2007 06:16 AM

Re: add to cart button help
 
I was looking for the exact same thing, so thanks

dub713 06-26-2007 09:09 PM

Re: add to cart button help
 
that checkmark to not redirect is great, but i've just learned that is does not apply when you're in a wishlist and you click add to cart.

in wlbuttons.tpl this is the code...



<td class="ButtonsRow">{include file="buttons/add_to_cart.tpl" href="cart.php?mode=wl2cart&wlitem=`$wlitem_data.w ishlistid`"}</td>

<td class="ButtonsRow">{include file="buttons/add_to_cart.tpl" href="cart.php?mode=wl2cart&fwlitem=`$wlitem_data. wishlistid`&eventid=`$eventid`"}</td>


how would you get the add to cart action to take place, but stay in the wishlist? i've tried messing with the urls, and i can get it to stay put, but i cannot get it to add the item.


***EDIT... i just found this... the call or action is wl2cart. so, go to wishlist.php and this appears to be the chunk of code that controls the action. anyone have any idea how to modify it to not redirect to the cart? or would we not even need to touch the php, and it can be done in the tpl's?

Code:

    #

    # Add to cart product from wish list

    #

    if (!empty($eventid)) {

        $wishlistid = $fwlitem;

        $login_cond = "event_id='$eventid' AND wishlistid='$fwlitem'";

        $wlid = func_query_first_cell("SELECT login FROM $sql_tbl[wishlist] WHERE $login_cond");

        $wlid = md5($wlid);

        $wlid_eventid = $eventid;

    }

    else {

        if ($wlitem) {

            $wishlistid = $wlitem;

            $login_cond = "login='$login' AND wishlistid='$wlitem'";

        }

        else {

            $wishlistid = $fwlitem;

            $login_cond = "MD5(login)='$wlid' AND wishlistid='$fwlitem'";

        }

    }



    if (!empty($wlid)) {

        $giftreg = array("wlid"=>$wlid, "eventid"=>$eventid);

        $friends_wihlists[] = $giftreg;

    }



    $wlproduct = func_query_first("SELECT wishlistid, productid, amount-amount_purchased as amount, options, object FROM $sql_tbl[wishlist] WHERE $login_cond AND (productid='0' OR amount-amount_purchased>0)");



All times are GMT -8. The time now is 05:31 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.