s07e01 - Wishlist / Faves QUESTIONS/SUPPORT

Open to all! Ask other shopowners for help.
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: s07e01 - Wishlist / Faves

Post 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):

Code: Select all

$_SESSION['cart']->reset();
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!!!
Many thanks @burt Gary. With your modification this worked like a charm. Thanks very much.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: s07e01 - Wishlist / Faves

Post by 14Steve14 »

Just noticed that when an item is out of stock, the wishlist button on the products page is not active. This means that people cannot save an out of stock items to their wishlist. Does this seem right as when a product is out of stock it may be a good time to actually add it to a wishlist to remind a customer that they need to buy something.

I am also using one of Garys addons to make the add to cart button on the product page to be inactive when the product is out of stock. Could this somehow be affecting the wishlist button.

Could someone that is using this on an unmodified store confirm that the wishlist button is active when a product is out of stock please.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: s07e01 - Wishlist / Faves

Post by heatherbell »

14Steve14 wrote: Fri May 14, 2021 10:52 amCould someone that is using this on an unmodified store confirm that the wishlist button is active when a product is out of stock please.
https://template.me.uk/PRO/test/product ... ducts_id=8
Omar_one
Senior Contributor
Posts: 676
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: s07e01 - Wishlist / Faves

Post by Omar_one »

Nigel wrote: Sun Apr 04, 2021 11:34 pm it still doesn't add it to the wishlist.
same here.. and there is no error
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Re: s07e01 - Wishlist / Faves

Post by loop »

i just bought the addon and i have version 1.0.8.1 and everything looks good, only whenn i add to wishlist it goes directly in the cart and not in the wishlist. on tha addon it's written should work for 1.0.8.0 so i thought 1.0.8.1 should also work probably...?

after editing: tep_draw_button() as Burt suggested, it does not add in the cart, but also not in the wishlist (and gives no error)

EDIT:
i found out, that the action does not trigger. After clicking on the add wishlist, browser goes to
/product_info.php?products_id=50271&action=wishlist_add
but the includes/action/wishlist_add.php does not trigger (i did a echo and die(); there to test)

does anybody has a solution for the add to cart instead of wishlist?
thanks in advance!
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: s07e01 - Wishlist / Faves

Post by 14Steve14 »

loop wrote: Fri May 21, 2021 3:49 pm does anybody has a solution for the add to cart instead of wishlist?
thanks in advance!
Revert your site back to 1.0.8.0 and it should work. Failing that you may have to contact one of the certified developers to get it working for you,
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Re: s07e01 - Wishlist / Faves

Post by loop »

i can't downgrade, as i need a feature of 1.0.8.1 ...i try to findout ...whats going on...
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Re: s07e01 - Wishlist / Faves

Post by loop »

i think i found it out, how to work with 1.0.8.1, i'm not 100% sure and still testing, but after editing, i can add it to wishlist and remove it from wishlist....

If anyone intrested:
in the includes/actions folder are the wishlist actions.

if you change the lines from wishlist_add.php

Code: Select all

  class osC_Actions_wishlist_add {

    public static function execute() {
      global $messageStack, $parameters;

      self::load_lang();
to

Code: Select all

namespace Phoenix\Actions;

  class wishlist_add {

    public static function execute() {
      global $messageStack, $parameters;

      self::load_lang();
and on the bottom add a "\" to language
like this:

Code: Select all

require_once \language::map_to_translation('modules/content/wishlist/cm_w_product_listing.php');
it works..hope it helps

i'm wondering if i have to rewrite the code from the wishlist actions the same way as for example in add_product.php or if it's not needed.
for example in add_product.php it's:

Code: Select all

\Href::redirect(\Guarantor::ensure_global('Linker')
        ->build($GLOBALS['goto'])
        ->retain_parameters($GLOBALS['parameters']));
and in wishlist its:

Code: Select all

 tep_redirect(tep_href_link('wishlist.php'));
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 »

loop wrote: Sat May 22, 2021 6:21 am i'm wondering if i have to rewrite the code from the wishlist actions the same way as for example in add_product.php
Eventually, but it shouldn't be necessary in the 1.0.8.* series. Whereas changing the namespace is necessary now.

I would drop the load_lang method altogether and replace it with

Code: Select all

class_exists('\cm_w_product_listing');
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: Sat May 22, 2021 9:23 am
loop wrote: Sat May 22, 2021 6:21 am i'm wondering if i have to rewrite the code from the wishlist actions the same way as for example in add_product.php
Eventually, but it shouldn't be necessary in the 1.0.8.* series. Whereas changing the namespace is necessary now.

I would drop the load_lang method altogether and replace it with

Code: Select all

class_exists('\cm_w_product_listing');
We need to replace which lines with this code dear could you please elaborate...


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