X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   X-Cart popup messages (https://forum.x-cart.com/showthread.php?t=58343)

cflsystems 04-30-2012 11:59 AM

Re: X-Cart popup messages
 
Works on 4.5.x as well. 4.5.x uses same default top-right corner messages which are easy to miss

tqualizerman 05-11-2012 10:36 AM

Re: X-Cart popup messages
 
Hi Steve,

Do you know if/how this might work with the Buy Together module from AlteredCart?

cflsystems 05-11-2012 09:55 PM

Re: X-Cart popup messages
 
I never tried it but in XC code is just changes in templates so if you do similar should work probably

Thomasb134 05-13-2012 08:15 AM

Re: X-Cart popup messages
 
We added this mod to our v4.4.5 and it is fantastic. Highly recommended!

I have a some requests for future mod enhancement:

1. In the "May we suggest the following items" popup it would be great if only items that are in stock are suggested. To increase customer satisfaction an out of stock item should be not shown in the popup.

2. Add a fourth item to the suggestion list that says "Show More Suggestions". If the customer clicks it then bring them directly to the related items section of the catalog page (or present a new pop-up with all the related products).

cflsystems 05-13-2012 09:13 AM

Re: X-Cart popup messages
 
Thanks Thomas

#1 - this uses recommends.php which already limits products to in stock only; make sure you have inventory in XC settings on
#2 - it can easily be extended by adding an <a> tag in popup_add_to_cart.tpl to link to the product details page

Thomasb134 05-13-2012 09:59 AM

Re: X-Cart popup messages
 
Thank you for the reply.

Quote:

#1 - this uses recommends.php which already limits products to in stock only; make sure you have inventory in XC settings on
I'm not quite sure what setting you mean. What is the exact name of the setting?

FWIW, we have "Show products which are out of stock" enabled. Disabling this causes customer confusion. The "Disable inventory tracking" setting is NOT checked.

Currently XC is showing out of stock items in the Related Products area. This is not a problem and we prefer it this way. However, we don't want any out of stock items to appear in the pop up window.

XC is also showing out of stock items in the "Customers Also Bought" (recommend) page. This seems to be directly related to the issue.

If it's just a improper XC setting that needs a tweak then that is awesome. I just need a bit more guidance.

cflsystems 05-13-2012 11:16 AM

Re: X-Cart popup messages
 
Yes these 2 settings. They are global and you have them set to show out of stock products. Since the mod doesn't modify any XC files and uses recommends.php directly you get what the file returns. This XC file can be modified of course

You can change

Code:

// 'Added to Cart' message - CFL Systems
if (!empty($active_modules['Recommended_Products']))
    include $xcart_dir . '/recommends.php';
// 'Added to Cart' message - CFL Systems


to

Code:

// 'Added to Cart' message - CFL Systems
if (!empty($active_modules['Recommended_Products'])) {
    $only_instock = true;
    include $xcart_dir . '/recommends.php';
}
// 'Added to Cart' message - CFL Systems


then in recommends.php this

Code:

if (
    $config['General']['unlimited_products'] != 'Y'
    && $config['General']['show_outofstock_products'] != 'Y'
) {


change to
Code:


 
 
 
 
 
 
if (
    ($config['General']['unlimited_products'] !=
'Y'
    &&
$config['General']['show_outofstock_products'] != 'Y')
 
 
    || $only_instock
) {


Not tested though

Thomasb134 05-13-2012 05:14 PM

Re: X-Cart popup messages
 
Thanks for the code. I installed it and I still see the out of stock items in the pop-up.

Just to confirm, I updated the first part to these 5 files:
1. /home.php
2. /products.php
3. /search.php
4. /manufacturers.php
5. /products_map.php

and then updated the second part to /recommends.php

All files were in the xcart root directory.

Did I miss anything?

cflsystems 05-13-2012 06:55 PM

Re: X-Cart popup messages
 
Yes, it should work. You can add in recommends.php just before

$_membershipid = intval($user_account['membershipid']);

this

echo $avail_where;

and see if it outputs anything on the screen. This is just for testing so delete it after you test.

Thomasb134 05-13-2012 07:45 PM

Re: X-Cart popup messages
 
Adding the echo $avail_where shows some extra text on the home page at the top of the page. But I don't see it on the item's catalog page. Does that help point to the problem?

I'm feeling guilty about being off topic. If you would like me to take my issue off-line (can use email instead) then just let me know.


All times are GMT -8. The time now is 12:23 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.