Page 1 of 2
Product Attributes Not Working
Posted: 18 Oct 2023, 18:09
by landed
I only managed to get dropdowns working for product attributes. I want people to be able to add flight information to their bookings. I did not get any solution for this yet. I can't know all the possible flights and times and dates. My previous system I was able to run a date picker here for the flight information date and then a text field. It is possible with just a text field of course but prone to typos.
Anyway what am I doing wrong?
https://bestantigua.com/shop/transfers/ ... y-transfer
Image of product
Images of admin
Re: Product Attributes Not Working
Posted: 18 Oct 2023, 18:25
by landed
Ok I now added a child item and it looks better, however I get a button for the label, the button doesn't do anything. So yes perhaps I can override the style. But want to know if there is an easier way?
I would prefer to edit the layout for this specific attribute, remove the btn class and remove the (+$0.00) then it would help a lot.
Re: Product Attributes Not Working
Posted: 18 Oct 2023, 18:42
by Nidzo
Phoca Cart options > Display >
Remove Select Option
Re: Product Attributes Not Working
Posted: 18 Oct 2023, 19:05
by landed
Doesnt seem to have an effect for me.
Re: Product Attributes Not Working
Posted: 18 Oct 2023, 23:36
by Jan
Hi, it seems like there is not removed the button class on your site.
1) create an option with title "Flight Information"
2) open this file on your server:
components/com_phocacart/layouts/attribute_options_text.php
and on line cca 70 remove following code:
so the code will be set from:
Code: Select all
echo '<div class="'.$d['s']['c']['col.xs12.sm6.md6'].'"><label class="' . $d['s']['c']['btn'] . ' phTextAttributeInput ' . $active . '" style="background-color: ' . strip_tags($v2->color) . '">' . htmlspecialchars($v2->title) . $suffix . $d['required']['span'] . '</label></div>';
to:
Code: Select all
echo '<div class="'.$d['s']['c']['col.xs12.sm6.md6'].'"><label class="'. ' phTextAttributeInput ' . $active . '" style="background-color: ' . strip_tags($v2->color) . '">' . htmlspecialchars($v2->title) . $suffix . $d['required']['span'] . '</label></div>';
Let me know if this work for you.
Jan
Re: Product Attributes Not Working
Posted: 24 Oct 2023, 12:28
by landed
Didn't get round to it but looks like 4.0.10 has now got these fixes. Will be upgrading at some point shortly and hope to report back.
Re: Product Attributes Not Working
Posted: 25 Oct 2023, 00:00
by Jan
Hi, yes, but there were one more change in 4.0.10, try to download the 4.0.10 again and reinstall with the same version.
Jan
Re: Product Attributes Not Working
Posted: 25 Oct 2023, 16:39
by Nidzo
I have similiar problem on one of my site. In last versions of Phoca Cart atributes selection disapear.
The last version that works is 4.0.8Beta3.
I deleted overrides, checked with developer tools. Joomla debug and error reports doesn't show nothing.
What is different after version 4.0.8Beta3 that can cause atributes selection to disapear?
EDIT: Attributes were unpublished for unknown reason
Riding on v5.0.0Beta2.zip
Re: Product Attributes Not Working
Posted: 25 Oct 2023, 16:42
by Jan
Hi, try to download the version 4.0.10 now:
https://github.com/PhocaCz/PhocaCart/re ... 4.0.10.zip
and reinstall again. There were some methods which were marked as working in Joomla 4 and Joomla 5 but do not work in Joomla 4.
Please, download it now and reinstall and let me know if it works.
Jan
Re: Product Attributes Not Working
Posted: 25 Oct 2023, 16:47
by Nidzo
I reinstalled stable version 4.0.10 you posted . Like I said, I found that Attributes were unpublished after update. Now published attributes stays published. Well done as always Jan!