logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Tuesday, February 23, 2021 9:40:50 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
We are working on a site where they show the product upsells in a tab on the product page instead of a page after something is added to the cart. I have created several different layouts for the productitemdisplay because they require the display to be different in different places and the one for the product accessories has problems with the add to cart link. If I put the button at one location in the code, it redirects to the accessory product page instead of adding to the cart. If I put it in another location, it adds to the cart fine. Here is my code- the first add to cart button redirects to the accessory product, but the second one adds to cart.
Do you have any ideas why?
Code:
_ProductItemDisplayAccessories.cshtml.txt (4kb) downloaded 2 time(s).
2021-02-23_10-38-44.png (44kb) downloaded 0 time(s).

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

mazhar  
#2 Posted : Wednesday, February 24, 2021 12:45:27 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
If the product you are adding via add to cart has upsell attached then it will redirect to the accessories page otherwise it will send to the basket page.
judy at Web2Market  
#3 Posted : Wednesday, February 24, 2021 5:36:59 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
That isn't the issue. The product I am adding is an upsell product, located at the bottom of the main product page. I have commented out the code that redirects to the accessory page when the main product is added anyway. The first add to cart link redirects to that accessory product's product page. The second add to cart link adds to the basket, but the client doesn't want it in that location- they want it in the location of the first button.
Thanks for your help.
shaharyartiwana25816656  
#4 Posted : Wednesday, February 24, 2021 6:04:35 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I copied paste your _productItemDisplay html in my local copy and tried to reproduce the issue but I am unable to.

Are there any other steps that I should follow to reproduce the issue?

Also is there any customizations being done in _AddToCartLink.cshtml view file?
judy at Web2Market  
#5 Posted : Wednesday, February 24, 2021 6:53:43 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I figured out what the issue was, but don't know why since I'm not a CSS guru.
If I took the class="product-permalink" out of the product url, the button works. There must have been some overlapping because of the styles.
Weird.
Thanks
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.