01-09-2023, 07:35 AM
Hi all this is a little code mod I did that I thought I would share. A big thanks to renlock for some help with this.
This mod takes the original "watch this item link", in item.tpl and ads an ELSE statement, so when a user clicks the "watch this item" link and returns to the item, instead of the link now displaying "remove this item" it will display "Item is in your watch list" upon clicking the new link the user is taken back to his/her watched items page where if they wish they can remove it, basically how it works on eBay.
Modification Difficulty: Easy
Open item.tpl and locate
and replace with
Next open up languages/EN/messages.php
Find
Below Add
And thats it ENJOY
This mod takes the original "watch this item link", in item.tpl and ads an ELSE statement, so when a user clicks the "watch this item" link and returns to the item, instead of the link now displaying "remove this item" it will display "Item is in your watch list" upon clicking the new link the user is taken back to his/her watched items page where if they wish they can remove it, basically how it works on eBay.
Modification Difficulty: Easy
Open item.tpl and locate
Code:
<!-- IF B_LOGGED_IN -->
<a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a>
<!-- ELSE -->
<a href="{SITEURL}user_login.php?">{L_5202}</a>
<!-- ENDIF -->
and replace with
Code:
<!-- IF B_LOGGED_IN -->
<!-- IF WATCH_VAR eq 'add' -->
<a href="{SITEURL}item_watch.php?{WATCH_VAR}={ID}">{WATCH_STRING}</a>
<!-- ELSE -->
<a href="{SITEURL}item_watch.php?={ID}">{L_001A}</a>
<!-- ENDIF -->
<!-- ELSE -->
<a href="{SITEURL}user_login.php?">{L_5202}</a>
Next open up languages/EN/messages.php
Find
Code:
$MSG['001'] = "New user registration";
Below Add
Code:
$MSG['001A'] = "Item is in your watch list";
And thats it ENJOY