Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Change Attribute in Cart not working

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 08-06-2014, 02:24 PM
 
pgailinas pgailinas is offline
 

Member
  
Join Date: Jul 2014
Posts: 13
 

Default Change Attribute in Cart not working

When in the shopping cart, I select to "Change attributes" of a product and a window pops up which lets me select a different attribute from a dropdown. When I select "Change", I get a message as follows:

"Product with selected attribute value(s) is not available or out of stock. Please select other."
__________________
XC 5.1.4
Reply With Quote
  #2  
Old 08-08-2014, 05:06 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Change Attribute in Cart not working

Hi!

Do I understand you correctly the product with chosen attributes on cart page is actually in stock? If so, could you please send me the snapshot of attributes configuration for the problem product?

Thank you.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 08-14-2014, 02:29 PM
 
pgailinas pgailinas is offline
 

Member
  
Join Date: Jul 2014
Posts: 13
 

Default Re: Change Attribute in Cart not working

Problem occurs for any product I have configured to have variants.

The functionality seems to work fine when I am on a Product Details page. On that page, I can select different variants and the SKU and color changes appropriately. I can add the product variant to the cart fine. I can then go to the cart and, if I want, check out fine. However, when I go to the cart and select "Change attributes", a pop-up appears where I can select the new attribute from a drop-down. So far, so good. Now, the problem occurs when I select the CHANGE button to apply the variant change. At that time, I get an error message "Product with selected attribute value(s) is not available or out of stock. Please select other."

As described above, product is in stock and can be selected fine on the Product Details page. Issue seems to occur on the Cart page.
__________________
XC 5.1.4
Reply With Quote
  #4  
Old 08-18-2014, 05:40 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Change Attribute in Cart not working

Hi!

Can you please send me a link to the product that has this problem? You can pm it, if necessary.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #5  
Old 08-21-2014, 12:27 PM
 
pgailinas pgailinas is offline
 

Member
  
Join Date: Jul 2014
Posts: 13
 

Default Re: Change Attribute in Cart not working

PM sent with login info.
__________________
XC 5.1.4
Reply With Quote
  #6  
Old 08-22-2014, 04:15 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Change Attribute in Cart not working

Hi Phil!

I managed to replicate the problem and it is caused by the bug. I have already reported it to the team and it will be fixed in next versions.

Meanwhile, you can apply a workaround fix. Change the classes/XLite/Module/XC/ProductVariants/Controller/Customer/ChangeAttributeValues.php file and replace there the following line:

PHP Code:
if ($variant && $variant->getAmount()) { 

with the next one:
PHP Code:
if ($variant && $variant->getAvailableAmount()) { 

After you rebuild the cache the problem will be fixed.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #7  
Old 08-22-2014, 05:49 AM
 
pgailinas pgailinas is offline
 

Member
  
Join Date: Jul 2014
Posts: 13
 

Default Re: Change Attribute in Cart not working

Thank you Tony, your fixed took care of that bug.
__________________
XC 5.1.4
Reply With Quote
  #8  
Old 08-25-2014, 04:49 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Change Attribute in Cart not working

Happy to hear that!

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:45 AM.

   

 
X-Cart forums © 2001-2020