X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 5 (https://forum.x-cart.com/forumdisplay.php?f=64)
-   -   Adjusting Variants Table View Add-On (https://forum.x-cart.com/showthread.php?t=76396)

megretson 07-09-2018 10:05 AM

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.

megretson 07-10-2018 05:31 AM

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.

tony_sologubov 07-11-2018 05:05 AM

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.


megretson 07-12-2018 08:18 AM

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

tony_sologubov 07-13-2018 07:02 AM

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?



All times are GMT -8. The time now is 02:42 AM.

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