X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   'Add to Cart' Alert Message (https://forum.x-cart.com/showthread.php?t=56998)

JWait 05-12-2011 02:30 PM

Re: 'Add to Cart' Alert Message
 
Quote:

Originally Posted by bitofeverything
Works great. I added "return false" for the continue shopping link so the page does not refresh.


Can you be more specific? Thanks

JWait 05-17-2011 08:28 AM

Re: 'Add to Cart' Alert Message
 
Quote:

Originally Posted by welly

I have now worked out that if you have featured products for a category (which in my case appear at the top of the page - not sure if this is standard), then the alert doesn't work. Actually, the alert box works if you add the featured product to your cart, but nothing in the standard product list will bring up the alert.

Remove the featured product(s), the alert works. Add a featured product to a different page, alerts on that page stop working.


I'm having the same problem. I wonder if adding something like "$main eq "featured" to the code "{if $main eq "product" || $main eq "search" || $main eq "products" || $main eq "catalog"}" would have any effect.

It seems to work fine on the product page, but there are problems in the "categories" and "featured products" areas.

Also, the links ("checkout", "continue shopping, etc.) at the bottom of the popup seem to need a little padding at the bottom, they are right against the bottom of the frame. Where would I adjust this?

Also, some else mentioned adding "return false" for the continue shopping link so the page does not refresh and go to the home page. Where and how would this be done?

Thanks!

UHS 05-23-2011 11:41 AM

Re: 'Add to Cart' Alert Message
 
Is this mod no longer available? The demo links no longer work for me. Anyone have any screenshots or demo I can take a look at?

JWait 05-23-2011 01:50 PM

Re: 'Add to Cart' Alert Message
 
Quote:

Originally Posted by UHS
Is this mod no longer available? The demo links no longer work for me. Anyone have any screenshots or demo I can take a look at?

check post #12

JWait 05-23-2011 02:05 PM

Re: 'Add to Cart' Alert Message
 
1 Attachment(s)
OK.. I made some changes and now it works sweeeeet!

Added $main eq "featured" to the list of "pages" to fix the problem of it working sometimes and sometimes not, and modified the instructions. The attached file is for version 4.4.x (tested on 4.4.3).

welly 05-23-2011 03:48 PM

Re: 'Add to Cart' Alert Message
 
Hi JWait,

Having installed your version on (4.4.2) I find I still have the same problems as before.

The alert doesn't work on the manufacturers pages even if I add a test for $main eq "manufacturer_products" in the page list. The add to cart button just hangs on the 'added' label, even though the item is indeed added.

It also doesn't work on category pages where there is a featured item at the top of the page. It works fine for those featured products, but not on the category products themselves. I get the same hanging on the add to cart button, and no alert (except on the featured products at the top).

Do you have any thoughts on why this might be happening, or how to overcome it?

Changing the return from true to false is great. Thanks for clearing that up.

Cheers

Welly

JWait 05-24-2011 09:15 AM

Re: 'Add to Cart' Alert Message
 
I just did a test and "$main = catalog" everywhere except for the actual product page and on the manufacturer's page (where "$main = manufacturer_products" . I think the main problem is in the "if $main eq", like maybe it should be checking for something else instead of $main.... "if product is available" maybe. Its not my mod so I really don't know.

cflsystems 05-25-2011 03:03 AM

Re: 'Add to Cart' Alert Message
 
For the list of products pages not working - if you have same product listed as category product and featured product on the same page that may be the reason for the mod not working; it gets more then one reference to same product and doesn't know which one to use

JWait 05-25-2011 08:00 AM

Re: 'Add to Cart' Alert Message
 
Quote:

Originally Posted by cflsystems
For the list of products pages not working - if you have same product listed as category product and featured product on the same page that may be the reason for the mod not working; it gets more then one reference to same product and doesn't know which one to use


It only seems to affect the pages that have both "featured" and "normal" products, regardless of whether the same product is there twice, at least as far as I can tell, I don't have any like that at the moment.

Strangely, I added the mod discussed here http://forum.x-cart.com/showthread.php?t=56298 and it works for those products as well, even though they are on the home page along with "featured" products, but it doesn't work with the "featured" products there. This leads me to believe there is something about the featured products that it doesn't like.

welly 06-02-2011 01:33 PM

Re: 'Add to Cart' Alert Message
 
I think I have figured out why the alert doesn't work on the manufacturer pages.

I assumed that adding the condition '$main eq "manufacturer_products"' to the list of conditions in the skin/common_files/customer/service_css.tpl file would be enough, but obviously it wasn't.

I've been looking at this again today, and it seems that similar conditions also exist in skin/common_files/modules/Cart_Alert/cart_alert.tpl, and therefore if you add the manufacturer_products condition to service_css.tpl then you must also add it to cart_alert.tpl. Otherwise, the add to cart process calls a function that never gets defined, which in turn stops the inventory from updating as it should.

There are 2 condition statements in cart_alert.tpl, and manufacturer_products needs to be added to the second one.

Alas, it doesn't help the problem with pages that have featured products at the top, but it is an improvement nonetheless.

Welly


All times are GMT -8. The time now is 07:38 PM.

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