Zen Cart Logo
Forums / All Other Contributions/Addons / Save For Later Support Thread

Save For Later Support Thread

Views: 64,707

Results 141 to 160 of 226
1 May 2015, 6:45 PM
#141
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Save For Later Support Thread

Ok I have installed the mod and loving it ... I have the buttons to save in product info display and the cart. The only problem I can see here is how can I access what is saved in my cart without having to add a further product?

If your cart is empty but you have saved items I cannot see a way of displaying those saved items unless I add another to the cart .. then I get all the products in the cart and saved list where I can move them around.

Is it not possible to have a link where I can click on (say) "Saved Items" to get to the checkout?

1 May 2015, 7:19 PM
#142
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

DigiBooks:

Ok I have installed the mod and loving it ... I have the buttons to save in product info display and the cart. The only problem I can see here is how can I access what is saved in my cart without having to add a further product?

If your cart is empty but you have saved items I cannot see a way of displaying those saved items unless I add another to the cart

That's a really good question. The short answer is that you'd have to update the shopping cart template to do this. I'll post instructions when I get a minute to update it.

1 May 2015, 9:37 PM
#143
digibooks avatar

digibooks

Zen Follower

Join Date:
May 2014
Location:
UK
Posts:
317
Plugin Contributions:
0

Re: Save For Later Support Thread

swguy:

That's a really good question. The short answer is that you'd have to update the shopping cart template to do this. I'll post instructions when I get a minute to update it.

Ok I have found a way to patch this:

  1. In includes/languages/english/YOUR TEMPLATE/header.php

add: define('HEADER_TITLE_CART_SAVED', 'Saved Products');

  1. In includes/templates/YOUR TEMPLATE/common/tpl_header.php

find: <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

then add after:

<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_SAVED; ?></a></li>

Clicking on this link when logged in will take you to your shopping cart which may be empty or will display saved products.

  1. Finally in includes/languages/english/shopping_cart.php

change:

define('TEXT_CART_EMPTY', 'Your download cart is empty.');

with

define('TEXT_CART_EMPTY', 'Your cart is empty.<br/><br />You have no saved products');

3 Jul 2016, 11:15 PM
#144
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

Save for Later has been updated for Zen Cart 1.5.5.

1 Dec 2016, 1:18 PM
#145
gsb2007 avatar

gsb2007

New Zenner

Join Date:
Mar 2007
Posts:
8
Plugin Contributions:
0

Re: Save For Later Support Thread

Hi

Do you have a link to any example websites where Save for Later is installed please?

1 Dec 2016, 1:21 PM
#146
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

I haven't installed it on any of my demo sites. You can see screenshots on the help page on my site: http://www.thatsoftwareguy.com/zencart_saveforlater.html

3 Jan 2017, 4:43 PM
#147
csgodeimos avatar

csgodeimos

Zen Follower

Join Date:
May 2016
Posts:
191
Plugin Contributions:
0

Re: Save For Later Support Thread

swguy:

This mod is aligned with Zen Cart 1.3.8; it has not been tested with (and is not recommended for) older versions.

If you like and profit from this mod (or indeed any of my contributions), donations are encouraged; PayPal to help at thatsoftwareguy dot com.

This is totally unrelated to this particular thread but I know you're the probably the one to ask!
Is there currently a module that allows a customer to be notified when it's time to reorder a product?

For example, customer buys product 1337, 31 days later the customer is notified that it's time to reorder product 1337.

3 Jan 2017, 6:08 PM
#148
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

Not AFAIK, but the best way to ask this question is on a new thread.

3 Jan 2017, 6:27 PM
#149
csgodeimos avatar

csgodeimos

Zen Follower

Join Date:
May 2016
Posts:
191
Plugin Contributions:
0

Re: Save For Later Support Thread

swguy:

Not AFAIK, but the best way to ask this question is on a new thread.

Tried that before the holidays but no reply sadly :(

3 Mar 2017, 7:33 AM
#150
erica62 avatar

erica62

New Zenner

Join Date:
Feb 2014
Posts:
42
Plugin Contributions:
0

Re: Save For Later Support Thread

Hi,

On the product page, is there any way to make the save for later input button a text link?

Thanks,

Eric

3 Mar 2017, 10:30 AM
#151
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

It's not a link - it's a submit button.

21 Sep 2017, 12:29 PM
#152
rayzermatic avatar

rayzermatic

New Zenner

Join Date:
Sep 2011
Posts:
11
Plugin Contributions:
0

Re: Save For Later Support Thread

I just installed the plugin and I have items that require attributes to be set.

On some of these items, the price is adjusted based on the attribute selected by just adding to the base price, but in other cases the price is determined by the attribute and the total will be Zero until the attribute is set.

ZenCart normally will not allow you to go any further and not save the item to the cart in this invalid condition without these attributes.

"Save For Later" will go ahead and save these items in its table in a invalid condition. Is there a way to alter the code so "Save For Later" will not save an item, unless the item is in a valid state?

Thanks

21 Sep 2017, 12:56 PM
#153
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

You have to prevent the item from being added to your shopping cart in the first place. If it's in the cart, it can be saved for later. But once restored to the cart from save for later, the restrictions you are mentioning would be applied.

20 Mar 2018, 1:20 PM
#154
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Save For Later Support Thread

Hi Scott,

I've noticed that SFL button from the product page doesn't save the product if an item is out of stock. Is it possible to make it add the item to the Saved for Later list even when stock is 0?
I tested this on a vanilla 1.5.5f install with no other mods installed.

Thanks

20 Mar 2018, 1:37 PM
#155
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

You'd have to change the behavior of the shopping cart class to do this.

20 Mar 2018, 1:47 PM
#156
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Save For Later Support Thread

So SFL is following the ZC core rule that you can't add an out of stock item to the cart?

I tried setting Check Stock Level to false in admin as I thought that would make a difference, but it didn't. In fact, a product still displayed as Sold Out, so not entirely sure of the purpose of that setting!

Would the required changes be within

function actionAddProduct($goto, $parameters) {

of includes/classes/shopping_cart.php ?

20 Mar 2018, 1:50 PM
#157
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

Correct.

20 Mar 2018, 1:55 PM
#158
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Save For Later Support Thread

Ok, I'll look in that function.
It might be an idea for you to update your code to NOT display the SFL button on products where the stock is zero.
I wasn't even aware that it didn't work until someone pointed it out to me.
I saw the button, and assumed it was functional regardless of stock.

7 May 2018, 12:10 PM
#159
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Save For Later Support Thread

I have an issues with this mod.
If you use group pricing, when an item is moved into save for later, it doesn't display the correct price.
As an example, I have a product where products_price is 0.00, and products_group_a_price is 50.54. When the item is in the cart it correctly displays at £50.54, but when moved to SFL, it displays it as £0.00.

So it would seem that sfl_functions isn't aware of what group a logged in user is set to. Given that the sfl_functions file is pretty much a clone of pages/shopping_cart/header.php, I'm surprised this data isn't being passed through.

Is there any chance of a fix for this?

7 May 2018, 12:39 PM
#160
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Save For Later Support Thread

No worries, I looked at the shopping cart class to see how this was being managed, and made some changes to includes/functions/extra_functions/sfl_functions.php to resolve this issue.

The changes are all in function get_sfl_products()

replace the original function with this one

function get_sfl_products() {
global $db;

if($_SESSION['customer_id']) {
  $customer_group_query = "SELECT gp.group_name
                            FROM " . TABLE_CUSTOMERS . " cu
                            LEFT JOIN " . TABLE_GROUP_PRICING . " gp ON cu.customers_group_pricing=gp.group_id
                            WHERE cu.customers_id = " . $_SESSION['customer_id'];
  if($customer_group = $db->Execute($customer_group_query)) {
    $customers_group=$customer_group->fields['group_name'];
  }
}


$contents = build_contents(); 
 
while (list($products_id, ) = each($contents)) {
  $products_query = "select p.products_id, p.master_categories_id, p.products_status, pd.products_name, p.products_model, p.products_image,
                              p.products_price, p.products_weight, p.products_tax_class_id,
							  p.products_group_a_price, p.products_group_b_price,
                              p.products_group_c_price, p.products_group_d_price,
                              p.products_quantity_order_min, p.products_quantity_order_units,
                              p.product_is_free, p.products_priced_by_attribute,
                              p.products_discount_type, p.products_discount_type_from
                       from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                       where p.products_id = '" . (int)$products_id . "'
                       and pd.products_id = p.products_id
                       and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";

  if ($products = $db->Execute($products_query)) {

    $prid = $products->fields['products_id'];
	$products_price = $products->fields['products_price'];
    //fix here
    /*
    $special_price = zen_get_products_special_price($prid);
    if ($special_price) {
    $products_price = $special_price;
    }
    */
    $special_price = zen_get_products_special_price($prid);
    if ($special_price and $products->fields['products_priced_by_attribute'] == 0) {
      $products_price = $special_price;
    } else {
      $special_price = 0;
    }

	if($customers_group and $special_price == 0) {
      if($customers_group == GROUP_PRICE_PER_ITEM1 && $products->fields['products_group_a_price'] != 0) {
        $products_price = $products->fields['products_group_a_price'];
      } elseif($customers_group == GROUP_PRICE_PER_ITEM2 && $products->fields['products_group_b_price'] != 0) {
        $products_price = $products->fields['products_group_b_price'];
      } elseif($customers_group == GROUP_PRICE_PER_ITEM3 && $products->fields['products_group_c_price'] != 0) {
        $products_price = $products->fields['products_group_c_price'];
      } elseif($customers_group == GROUP_PRICE_PER_ITEM4 && $products->fields['products_group_d_price'] != 0) {
        $products_price = $products->fields['products_group_d_price'];
      }
    }

    if (zen_get_products_price_is_free($products->fields['products_id'])) {
      // no charge
      $products_price = 0;
    }

    // adjust price for discounts when priced by attribute
    if ($products->fields['products_priced_by_attribute'] == '1' and zen_has_product_attributes($products->fields['products_id'], 'false')) {
      // reset for priced by attributes
      //            $products_price = $products->fields['products_price'];
      if ($special_price) {
        $products_price = $special_price;
      } else {
        $products_price = $products->fields['products_price'];
      }
    } else {
      // discount qty pricing
      if ($products->fields['products_discount_type'] != '0') {
        $products_price = zen_get_products_discount_price_qty($products->fields['products_id'], $contents[$products_id]['qty']);
      }
    }

    //clr 030714 update $products_array to include attribute value_text. This is needed for text attributes.

    // convert quantity to proper decimals
    if (QUANTITY_DECIMALS != 0) {
      //          $new_qty = round($new_qty, QUANTITY_DECIMALS);

      $fix_qty = $contents[$products_id]['qty'];
      switch (true) {
        case (!strstr($fix_qty, '.')):
        $new_qty = $fix_qty;
        break;
        default:
        $new_qty = preg_replace('/[0]+$/','',$contents[$products_id]['qty']);
        break;
      }
    } else {
      $new_qty = $contents[$products_id]['qty'];
    }
    $check_unit_decimals = zen_get_products_quantity_order_units((int)$products->fields['products_id']);
    if (strstr($check_unit_decimals, '.')) {
      $new_qty = round($new_qty, QUANTITY_DECIMALS);
    } else {
      $new_qty = round($new_qty, 0);
    }

    if ($new_qty == (int)$new_qty) {
      $new_qty = (int)$new_qty;
    }

    $products_array[] = array('id' => $products_id,
                              'category' => $products->fields['master_categories_id'],
                              'name' => $products->fields['products_name'],
                              'model' => $products->fields['products_model'],
                              'image' => $products->fields['products_image'],
                              'price' => ($products->fields['product_is_free'] =='1' ? 0 : $products_price),
    //                                    'quantity' => $contents[$products_id]['qty'],
                              'quantity' => $new_qty,
                              // 'weight' => $products->fields['products_weight'] + $attributes_weight($products_id),
                              // fix here
                              'final_price' => ($products_price + attributes_price($products_id, $contents)),
                              'onetime_charges' => (attributes_price_onetime_charges($products_id, $new_qty, $contents)),
                              'tax_class_id' => $products->fields['products_tax_class_id'],
                              'attributes' => (isset($contents[$products_id]['attributes']) ? $contents[$products_id]['attributes'] : ''),
                              'attributes_values' => (isset($contents[$products_id]['attributes_values']) ? $contents[$products_id]['attributes_values'] : ''),
                              'products_priced_by_attribute' => $products->fields['products_priced_by_attribute'],
                              'product_is_free' => $products->fields['product_is_free'],
                              'products_discount_type' => $products->fields['products_discount_type'],
                              'products_discount_type_from' => $products->fields['products_discount_type_from']);
  }
}
return $products_array;

}