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

Adjusting Variants Table View Add-On

 
Reply
   X-Cart forums > X-Cart 5 > Third Party Add-Ons for X-Cart 5
 
Thread Tools Search this Thread
  #1  
Old 07-09-2018, 10:05 AM
 
megretson megretson is offline
 

Newbie
  
Join Date: Jul 2018
Posts: 7
 

Default Adjusting Variants Table View Add-On

Hello All!

I am brand new to X-Cart, and am using version 5.3.5.4. I have installed the "Variants Table View" Add-On, which is mostly used for wholesale products. I would like to create a page which replicates, essentially, how this page is set up: https://store.makerbot.com/filament/pla-large/ Such that within the products variant table, there is an option to add each variant to the cart individually at the end of that variant's row.

I have managed to add a separate column in the table and place widget('\\XLite\\View\\Product\\Details\\Customer\ \AddButton', product=this.product) into each row. Predictably, however, this adds all variants into the cart, rather than just the variant of that row. How would I specify that the "Add to Cart" button on each row should add only that row's variant, and in the quantity specified by widget('\\XLite\\Module\\QSL\\VariantsTableView\\V iew\\ProductVariant\\QuantityBox'

Thanks for the help, and please let me know if the question doesn't make sense and I'll provide additional clarification.
__________________
Thank you!
Reply With Quote
  #2  
Old 07-10-2018, 05:31 AM
 
megretson megretson is offline
 

Newbie
  
Join Date: Jul 2018
Posts: 7
 

Red face Adjusting Variants Table View Add-On

Hi All!

I am using X-Cart version 5.3.5.4. I am attempting to change the look of the variants table add-on, so that in the last column of the table, each variant has an add to cart button. It should look sort of like this website: https://store.makerbot.com/filament/pla-large/

I've managed to add a generic "Add to Cart" button into this last column, but it adds every variant into the cart, rather than just the variant and quantity for that row. Please let me know if there is any additional information I can provide or is needed to answer this question.
__________________
Thank you!
Reply With Quote
  #3  
Old 07-11-2018, 05:05 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: Adjusting Variants Table View Add-On

Hi @megretson,

Welcome to X-Cart forums and thank you for your question!

There is no way to add 'Add to cart' button to each row by using one of existing widgets. The reason is that default 'Add to cart' button uses 'attribute_values' inputs to know what product attributes are submitted, while 'Add to cart' button of the module always submits all possible variants and then removes items with 0 quantity, which you do not have.

A good way to approach this problem is to enable submitting 'attribute_values' while hitting 'Add to cart' button and everything should start working.

Meanwhile, I will pass the feedback to the developer. Maybe they will add this feature for future releases.

Tony

Quote:
Originally Posted by megretson
Hi All!

I am using X-Cart version 5.3.5.4. I am attempting to change the look of the variants table add-on, so that in the last column of the table, each variant has an add to cart button. It should look sort of like this website: https://store.makerbot.com/filament/pla-large/

I've managed to add a generic "Add to Cart" button into this last column, but it adds every variant into the cart, rather than just the variant and quantity for that row. Please let me know if there is any additional information I can provide or is needed to answer this question.
__________________
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
  #4  
Old 07-12-2018, 08:18 AM
 
megretson megretson is offline
 

Newbie
  
Join Date: Jul 2018
Posts: 7
 

Default Re: Adjusting Variants Table View Add-On

Hi Tony,

Thanks for the reply! I'm not sure I understand your response. Where should I enable submitting attribute values?

Thank you!
Meg
__________________
Thank you!
Reply With Quote
  #5  
Old 07-13-2018, 07:02 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

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

Default Re: Adjusting Variants Table View Add-On

Hi Meg,

When you submit a form via HTTP, server can access variables from <input> elements, right?
So, X-Cart determines what product attributes are submitted based on in 'attribute_values' input elements submitted and you need to add those 'attribute_values' elements to the variants form.

You can do that by editing templates.

However, I feel that the easiest way to solve this problem would be to order a custom task. Moreover, the module's developer told me it is not going to cost a fortune.

Tony

Quote:
Originally Posted by megretson
Thanks for the reply! I'm not sure I understand your response. Where should I enable submitting attribute values?
__________________
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 > Third Party Add-Ons for X-Cart 5



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 06:49 PM.

   

 
X-Cart forums © 2001-2020