Product Attributes Not Working

Phoca Cart - complex e-commerce extension
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 121
Joined: 15 Sep 2023, 10:51

Product Attributes Not Working

Post 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

Image

Images of admin

Image
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 121
Joined: 15 Sep 2023, 10:51

Re: Product Attributes Not Working

Post 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.

Image
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 387
Joined: 07 Nov 2018, 14:55

Re: Product Attributes Not Working

Post by Nidzo »

Phoca Cart options > Display >
Remove Select Option
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 121
Joined: 15 Sep 2023, 10:51

Re: Product Attributes Not Working

Post by landed »

Image
Doesnt seem to have an effect for me.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48398
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Product Attributes Not Working

Post 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:

Code: Select all

. $d['s']['c']['btn']
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
If you find Phoca extensions useful, please support the project
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 121
Joined: 15 Sep 2023, 10:51

Re: Product Attributes Not Working

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48398
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Product Attributes Not Working

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 387
Joined: 07 Nov 2018, 14:55

Re: Product Attributes Not Working

Post 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 :D

Riding on v5.0.0Beta2.zip 😊🏇

Image
Last edited by Nidzo on 25 Oct 2023, 16:44, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48398
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Product Attributes Not Working

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 387
Joined: 07 Nov 2018, 14:55

Re: Product Attributes Not Working

Post 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!
Post Reply