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)
-   -   Viewing "Add to Wish List" button at all times (https://forum.x-cart.com/showthread.php?t=19273)

davidsaldana 01-15-2006 07:33 PM

Viewing "Add to Wish List" button at all times
 
Hello,

I am looking to set up the "add to wish list" button to all pages for all users (not just those who are signed in). If possible, when a person hits the add to wish list button and he/she is not a user, he/she should be redirected to become a member. After the membership is completed, he/she should be redirected to the "wish list" cart. If anyone could please help with this, it would be great.

Thanks,
David Saldana

balinor 01-16-2006 03:40 AM

You would need to replace the wishlist button code with an if statement similar to this:

{if $login eq ""}

Show button but link to another page

{else}

Show actual wishlist button

{/if}

davidsaldana 01-16-2006 07:03 AM

Do you know which file actually needs to be edited?

balinor 01-16-2006 07:05 AM

product.tpl for the product detail page
products_t.tpl for a multi-column product display
products.tpl for a single column display

davidsaldana 01-16-2006 07:34 PM

Thanks for that. It was so easy to do and I highly recommend this mod which will allow your "add to wishlist" button to be shown at all times. If the customer is not logged in, it will redirect them to the registration page.

Add to product.tpl:

Code:

{if $login eq "" and $active_modules.Wishlist ne""}
{include file="buttons/add_to_wishlist.tpl" style="button" href="http://www.yoursite.com/store/register.php"}</a>
{/if}


After:

Code:

{if $login ne "" and $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}


Jerrad 04-06-2006 12:24 AM

Thanks for this very usefull and easy to implement mod! :D

katandmouse 06-15-2006 03:44 AM

one problem with wishlist mod
 
That is a helpful mod, however there is one problem. What if the user already has an account and just needs to log in. Instead of sending them to the register page, it should send them to a log in page where they will be met with instructions to register if they haven't already. How do you do that easily? I'm creating a my account page with a login form that will do the trick, but if there is an easier way to send them to login, I'd like to know about it.

balinor 06-15-2006 03:48 AM

The system has no idea if they are already registered or not when they aren't logged in, so sending them to a 'My Account' page is going to be your best solution.

davidsaldana 04-06-2007 05:46 AM

Re: Viewing "Add to Wish List" button at all times
 
Quick Note, if you are using the HTML Catalog generator, this mod will not work with those static pages.

klong 04-06-2007 06:16 AM

Re: Viewing "Add to Wish List" button at all times
 
Here's how I handled it: www.bambinibliss.com. And yes, I had problems when using the html generator.

ryhan_balboa 11-07-2007 07:40 AM

Re: Viewing "Add to Wish List" button at all times
 
Hi All..

I've tried putting following code on customer/main/cart.tpl:

{if $login ne "" and $active_modules.Wishlist ne ""}
{
include file="customer/add2wl.tpl"
}
{else}
{
include file="buttons/add_to_wishlist.tpl" style="button" href="register.php"
}
{/if}

The idea is, when a customer has added something to his/ her basket, I want a link that offeres to add the product to his/her wishlist. The register function works, when not logged in :) But when logged in, it doesn't take me anywhere, instead says that an object is expected.

Then I tried
{if $login ne "" and $active_modules.Wishlist ne ""}
{
include file="buttons/add_to_wishlist.tpl" style="button" href="cart.php?mode=wishlist&wl_productid.value=`$ products[product].productid`"
}
{else}
{
include file="buttons/add_to_wishlist.tpl" style="button" href="register.php"
}
{/if}

This time, it does take me to the wishlist page, but does not actually add the product to the wishlist.

Lots of Thanks if someone can help??


All times are GMT -8. The time now is 02:57 PM.

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