VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Rufina on July 08, 2020, 15:37:59 PM

Title: Customfield cart attribute not displayed in cart module
Post by: Rufina on July 08, 2020, 15:37:59 PM
Hello.

I am developing a website using Joomla 3.9.15 and VM 3.6.10

I have such a bug with a custom field. If in a certain product we assign a custom field which is a cart attribute and than in FE we come into the product details page of this product and if we have cart module on this page with products list so there is no this custom field displayed with exactly this product in the list of products. Though the same type custom fields are displayed with the other products of the products list in the cart module. So the custom field is not displayed with the product in cart module only if we stay on the product details page of exactly this product.

This is a screenshot with the bug if we are on the product details page of the product Zipper Pullover
https://drive.google.com/file/d/1sGewo49nIWs_rw3nFpX0JyBBy279RsC-/view?usp=sharing (https://drive.google.com/file/d/1sGewo49nIWs_rw3nFpX0JyBBy279RsC-/view?usp=sharing)

And without the bug (if we are on some other page)
https://drive.google.com/file/d/1lck_RlaZ7Y59jn_bZtBEwIqcTWbEpAvt/view?usp=sharing (https://drive.google.com/file/d/1lck_RlaZ7Y59jn_bZtBEwIqcTWbEpAvt/view?usp=sharing)
Title: Re: Customfield cart attribute not displayed in cart module
Post by: jenkinhill on July 08, 2020, 16:35:29 PM
Can you check this using the current VirtueMart version?   http://dev.virtuemart.net/attachments/download/1268/com_virtuemart.3.8.4.10335_package_or_extract.zip

Test first on a backup copy of your site.

And please do not crosspost.
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Rufina on July 09, 2020, 01:55:52 AM
I will try, thank you!
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Rufina on July 14, 2020, 10:50:16 AM
Quote from: jenkinhill on July 08, 2020, 16:35:29 PM
Can you check this using the current VirtueMart version?   http://dev.virtuemart.net/attachments/download/1268/com_virtuemart.3.8.4.10335_package_or_extract.zip

Test first on a backup copy of your site.

And please do not crosspost.

Hello. I have tried on this version 3.8.4 as you recommended and the problem is the same:
Customfield display on the home page, screenshot http://joxi.ru/8An0pNESz6kaWm
And Customfield is not displayed on the product details page, screenshot http://joxi.ru/GrqevBji4vqjEr
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Jörgen on July 14, 2020, 11:59:15 AM
What location are you placing your customfield?
try addtocart
show settings for customfield

Jörgen
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Rufina on July 14, 2020, 12:16:27 PM
Hi.

It is addtocart.

Settings
http://joxi.ru/52aQvegSEpq1N2
http://joxi.ru/8An0pNESz6kOGm
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Wedal on July 15, 2020, 12:56:28 PM
Such a problem exists.

Steps for reproduce:
1) Go to page http://demo.virtuemart.net/zipper-pullover-detail
2) Add the product with parameters to cart (in this case, the parameters will be visible in the cart module)
3) Refresh the page (F5) (parameters are not visible in the cart module)
Title: Re: Customfield cart attribute not displayed in cart module
Post by: pinochico on July 15, 2020, 20:05:31 PM
Hmm, thanks for info.

1. Module Cart is changed by ajax if you add to cart - this is ok
2. If you use F5 (refresh) then use for cart module - module template

Then is no bug by features which is mybe missing (my client don't want this features)-

If you need this option, you can override module template. That is all.
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Wedal on July 16, 2020, 08:49:12 AM
Not so easy. For other product pages, the parameters of this product are displayed correctly in the cart module. The problem only occurs for the product page that was added to the cart with parameters.
I've explored this issue. Changing the module layout doesn't solve it. It goes much deeper, into the prepareAjaxData method, and further, it seems, into customfields.
Title: Re: Customfield cart attribute not displayed in cart module
Post by: pinochico on July 17, 2020, 01:17:06 AM
it's simple - as I said once:

If you add to cart on the product page, you call ajax and the display of parameters is using data from ajax - yes you are right and this display is correct.

If you go to another page, you no longer use this ajax and only use the simple display of the module cart layout.
You must use the override to adjust it to display product parameters, it is not standard after installation.

Is there anything else unclear?

You can see on our eshop - we developper custom module cart layout:

https://www.archivbox.cz/archivni-krabice-cz-r074

Module cart is the same for add to cart and after redirect.
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Wedal on July 17, 2020, 15:14:26 PM
I think we look at different things, or I just do not understand your answer completely.

QuoteYou must use the override to adjust it to display product parameters, it is not standard after installation.
This is standard after installation. This works on the demo site. If you add this product to the cart from the product page and then go, for example, to a category, the cart module will show the parameters of the product.

I'm talking about a custom field of type "text", which is an attribute of the cart (affects the cost of the product). You seem to have a field created through a custom plugin or child products. This is a different type of field.

Quotewe developper custom module cart layout
It is possible to create an overridden cart module layout, but the problem is that it does not pass the custom fields by default. This only happens on the product page. On other pages, the value is passed. This is not a cart module problem.
Title: Re: Customfield cart attribute not displayed in cart module
Post by: pinochico on July 17, 2020, 15:52:03 PM
Which URL on demo you use = where is ok?
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Wedal on July 17, 2020, 16:04:33 PM
QuoteWhich URL on demo you use = where is ok?

e.g. http://demo.virtuemart.net/skirt-knock-rock-detail
and any other that is not a productdetails page of the product (problematic) added to the cart.
Title: Re: Customfield cart attribute not displayed in cart module
Post by: pinochico on July 17, 2020, 16:29:11 PM
> I'm talking about a custom field of type "text", which is an attribute of the cart (affects the cost of the product)

Ok, and exist any product with this CF on demo?
I think, the URL http://demo.virtuemart.net/skirt-knock-rock-detail is not this typ of product, because this product is correct on product detail and category (I mean correct == module cart is ok)
Title: Re: Customfield cart attribute not displayed in cart module
Post by: Wedal on July 20, 2020, 11:55:28 AM
Please see example:
(https://wedal.ru/examples/Y0Doqqi7L3.gif)