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 forums.ablecommerce.com. Please use your AbleCommerce username and password to Login. Forums Registration.

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: 121

Thanks: 4 times
Was thanked: 2 time(s) in 2 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. Forums Registration.

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: 78

Thanks: 6 times
Was thanked: 10 time(s) in 9 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: 121

Thanks: 4 times
Was thanked: 2 time(s) in 2 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)
shaharyartiwana25816656

Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 33 time(s) in 33 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: 121

Thanks: 4 times
Was thanked: 2 time(s) in 2 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
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.