s07e01 - Wishlist / Faves QUESTIONS/SUPPORT

Open to all! Ask other shopowners for help.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: s07e01 - Wishlist / Faves

Post by ecartz »

radhavallabh wrote: Mon May 31, 2021 10:48 am We need to replace which lines with this code dear could you please elaborate...

Code: Select all

      self::load_lang();
with

Code: Select all

class_exists('\cm_w_product_listing');

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: s07e01 - Wishlist / Faves

Post by radhavallabh »

ecartz wrote: Mon May 31, 2021 12:30 pm
radhavallabh wrote: Mon May 31, 2021 10:48 am We need to replace which lines with this code dear could you please elaborate...

Code: Select all

      self::load_lang();
with

Code: Select all

class_exists('\cm_w_product_listing');
I have made below changes dear can you please check as my add to wishlist button is giving a jquery error.
Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
do_cart

h
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: s07e01 - Wishlist / Faves

Post by ecartz »

What are the contents of the thing that you are JSON parsing? You also might try switching from Firefox to Chrome, as Chrome may give a more informative error message.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: s07e01 - Wishlist / Faves

Post by radhavallabh »

ecartz wrote: Mon May 31, 2021 1:12 pm What are the contents of the thing that you are JSON parsing? You also might try switching from Firefox to Chrome, as Chrome may give a more informative error message.
I try to add a product to Wishlist In chrome this is the error
Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Object.<anonymous> (product_info.php?products_id=4466:536)
at c (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at l (jquery.min.js:2)
at XMLHttpRequest.<anonymous> (jquery.min.js:2)
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Solution to use AJAX with WISHLIST

Post by loop »

Hi All
i change the ajax plugin so it works also with wishlist (i also have in the code a javascript to change the badge number in the navigation which i have, you can leave that away if you don't need it)
As i changed a lot in the plugin files i don't know if i'm allowed to post the full script. let me know if interested and how i should share it (only changes are not possible, because there is a lot new in it)
regards
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Solution to use AJAX with WISHLIST

Post by radhavallabh »

loop wrote: Wed Jun 02, 2021 10:06 am Hi All
i change the ajax plugin so it works also with wishlist (i also have in the code a javascript to change the badge number in the navigation which i have, you can leave that away if you don't need it)
As i changed a lot in the plugin files i don't know if i'm allowed to post the full script. let me know if interested and how i should share it (only changes are not possible, because there is a lot new in it)
regards
Hi dear can you please share the changes to be done?
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: s07e01 - Wishlist / Faves

Post by radhavallabh »

Hi all;
I am trying to update the language file to new Phoenix pattern of const= instead of define but below line is throwing error-

Code: Select all

 const WISHLIST_PRODUCT_ADDED = '%s has been added to your <a class="alert-link" href="'. $Linker->build("wishlist.php") . '">Favourites</a>...';
 
Please can you guide on what should be the solution??
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: s07e01 - Wishlist / Faves

Post by ecartz »

radhavallabh wrote: Mon Nov 22, 2021 7:09 am Please can you guide on what should be the solution??
You either need to leave it as a define or update the thing that references it to insert the link. The thing that references it would be in a different file or files. So if you're just updating the language files, the simple solution is to leave it a define for now.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s07e01 - Wishlist / Faves

Post by burt »

You can have either;

ajax cart

or;

wishlist

working in a shop, not both.
If someone wants to sponsor a solution, one of the Certified Developers would no doubt jump on it.
I tried and failed to find a solution.

Note that these addons were written months (if not years) apart, so should not be seen as harmonious.
I am not here to build for you.
I am here to build with you. Let's help each other.
zeeshop
Member
Posts: 71
Joined: Sun Jan 10, 2021 11:30 pm
Phoenix Version:
Has thanked: 15 times
Been thanked: 2 times

Re: s07e01 - Wishlist / Faves

Post by zeeshop »

Hi,
@ecartz
Before installing this module, just like to check if this is now fixed to work with Ajax cart module enabled, as the issued raised in previous posts.

Thanks


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply