Page 1 of 11
s07e01 - Wishlist / Faves QUESTIONS/SUPPORT
Posted: Sun Jan 10, 2021 7:13 pm
by Denzel
Addon:
Adds a customer Favourites List, that could also be used as a Wishlist.
Download:
viewtopic.php?f=28&t=240
--
Looks as "Add to favourites"-button does not work with the Ajax-Buy_button together. If installed the Add-to_favs-Link adds product to cart instead of wishlist. Successfully added to cartmodal pops up an product wents to cart...
EDIT:
works, if in includes/modules/header_tags/ht_ajax_buttons.php line 89 changes selector from
Code: Select all
<script>$(document).ready(function() { $('form[name="cart_quantity"]').bind('submit',function(e) { . . .
to:
Code: Select all
<script>$(document).ready(function() { $('button.btn-buy').bind('click',function(e) { . . .
Re: s07e01 - Wishlist / Faves
Posted: Sun Jan 10, 2021 7:20 pm
by burt
1.0.7.11
Bear in mind that your 107.11 might have customised changes (ie core code changes), but for a brand new installation of 107.11 you need TWO minor changes;
In login.php, find (about L36):
Code: Select all
$_SESSION['customer_id'] = $login_customer_id;
Add After:
Code: Select all
$OSCOM_Hooks->call('login', 'postLogin');
In logoff.php, find (about L25):
Add After:
Code: Select all
$OSCOM_Hooks->call('logoff', 'resetStart');
Save both files and overwrite. Upload all, following instructions.
It -seemed- to work for me in a brand new installation of 107.11 as I intended it to work. Report back?
You might like to try on your test site before doing the same on live site!!!
Re: s07e01 - Wishlist / Faves
Posted: Sun Jan 10, 2021 7:20 pm
by burt
For anyone else reading, the more "older" versions you go, the more you move away from 107.12 (which is what the wishlist was written on), so the changes may not be as easy as you see above!!!
Re: s07e01 - Wishlist / Faves
Posted: Sun Jan 10, 2021 9:28 pm
by Omar_one
I just edit admin page from another add-on to this add-on.
but it will just show for who's registered as customer
wishlist.JPG
Re: s07e01 - Wishlist / Faves
Posted: Sun Jan 10, 2021 11:15 pm
by ecartz
burt wrote: ↑Sun Jan 10, 2021 7:20 pm
In login.php, find (about L36):
Code: Select all
$_SESSION['customer_id'] = $login_customer_id;
Add After:
Code: Select all
$OSCOM_Hooks->call('login', 'postLogin');
Surely you'd want to move it, not add it. Since it's already there (around line 31). Otherwise you're doing all the postLogin steps twice.
Re: s07e01 - Wishlist / Faves
Posted: Mon Jan 11, 2021 8:46 am
by 14Steve14
burt wrote: ↑Sun Jan 10, 2021 7:20 pm
1.0.7.11
Bear in mind that your 107.11 might have customised changes (ie core code changes), but for a brand new installation of 107.11 you need TWO minor changes;
In login.php, find (about L36):
Code: Select all
$_SESSION['customer_id'] = $login_customer_id;
Add After:
Code: Select all
$OSCOM_Hooks->call('login', 'postLogin');
In logoff.php, find (about L25):
Add After:
Code: Select all
$OSCOM_Hooks->call('logoff', 'resetStart');
Save both files and overwrite. Upload all, following instructions.
It -seemed- to work for me in a brand new installation of 107.11 as I intended it to work. Report back?
You might like to try on your test site before doing the same on live site!!!
Cheers Gary. Will take a look later and try. Its only a temporary fix until the other addons/modules are ready.
I am a bit worried about ecartz answer further down the thread though, even if I dont understand it.
Re: s07e01 - Wishlist / Faves
Posted: Mon Jan 11, 2021 11:16 am
by burt
In this case, do as I posted.
We're not worried about having a double step and it means that anything relying on the earlier call will still use it and the one thing that relies on this call will use it.
Again, to be sure; do as I posted and it should work well.
When you eventually update to 107.12 or later, everything will still work as you have changed nothing in the addon.
Re: s07e01 - Wishlist / Faves
Posted: Mon Jan 11, 2021 11:31 am
by burt
Denzel wrote: ↑Sun Jan 10, 2021 7:13 pm
Looks as "Add to favourites"-button does not work with the Ajax-Buy_button together. If installed the Add-to_favs-Link adds product to cart instead of wishlist. Successfully added to cartmodal pops up an product wents to cart...
EDIT:
works, if in includes/modules/header_tags/ht_ajax_buttons.php line 89 changes selector from
Code: Select all
<script>$(document).ready(function() { $('form[name="cart_quantity"]').bind('submit',function(e) { . . .
to:
Code: Select all
<script>$(document).ready(function() { $('button.btn-buy').bind('click',function(e) { . . .
TY, however this solution doesn't seem good... Reason: the ajax cart functionality
needs to be on the submit of the form not on the click of the button. The system breaks if you put it on the click of the button, superficially it looks like it works, but I know it won't be working properly.
The wishlist functionality also needs to be on submit of the form; therefore until I get time to have a look/play I would say to use either the ajax buttons OR the wishlist, not both.
Re: s07e01 - Wishlist / Faves
Posted: Sun Mar 14, 2021 6:50 am
by lecarlb
Has anyone gotten this to work on version 1.0.7.18?
It seems as if the Navbar and PI modules are causing blank pages.
Here's the code from the template file on line 3 causing trouble:
Code: Select all
$heart_text = $_SESSION['wishlist']->display_text((int)$product_info['products_id']);
Re: s07e01 - Wishlist / Faves
Posted: Sun Mar 14, 2021 11:02 am
by burt
This was built at v1.0.7.12, therefore it would need updating if a later version breaks it.
I am in the process of updating all the Supporters Codes, but when that would be complete is unknown as there are so many.
I have howevr just installed this on v1.0.8.0 for a quick test, and everything appears to work fine...