Code

Discussion on Advanced Custom Fields for Prestashop

Discussion on Advanced Custom Fields for Prestashop

Cart 480 sales

Inno-mods supports this item

Supported

68 comments found.

How do I add multiple instances of the same field to a product? For example the ability to add several “episode” entries to the same blu-ray product?

A shame – this is not a usable solution for me. My fault – I just assumed it did because it says you can add “unlimited” custom fields. Thanks for confirming.

well,

you can add unlimited custom fields, the description is precise..

you can not add a repeater of a custom field (or a group of custom fields)..

if you want, you can ask Codecanyon for a refund..

Kindest regards!

No problem, it might come in useful for something one day.

Question: Is there a way to add an <according> typo component!? What I need is to be able to all this as custom field type on each product, and each product will have his own specific <textarea> in those accordions…

Hi!

well, with the module you can define custom fields for products. Each custom field can represent a text or a textarea, or any other of the available fields.

Creating an accordion, is actually a template thing. I mean that you can create an accordion and inside it, you can print a custom field..

Kindest regards!

So how are the custom fields added to the template? Can I use a short-code or something like that?! The theme supports Elementor plugin, and I can easily add accordion from there, but not sure how/what is possible to add a the custom field. Thanks…

well,

custom fields are added to the template through a Prestashop widget code.

If Elementor supports widgets, you should be able to use the widget code and get the result you want.

Kindest regards!

In Prestashop 8.2, PHP 8.1,

every now and then an error like the following occurs,

Fatal error: Uncaught Error: Call to a member function isEnabled() on bool in /var/www/vhosts/XXX/httpdocs/modules/advancedcustomfields/advancedcustomfields.php:4397 Stack trace: #0 /var/www/vhosts/XXX/httpdocs/modules/advancedcustomfields/advancedcustomfields.php(5148): AdvancedCustomFields->saveLocationCustomFields() #1 /var/www/vhosts/XXX/httpdocs/classes/Hook.php(1077): AdvancedCustomFields->hookActionObjectCustomerUpdateAfter() #2 /var/www/vhosts/XXX/httpdocs/classes/Hook.php(418): HookCore::coreCallHook() #3 /var/www/vhosts/XXX/httpdocs/classes/Hook.php(983): HookCore::callHookOn() #4 /var/www/vhosts/XXX/httpdocs/classes/ObjectModel.php(886): HookCore::exec() #5 /var/www/vhosts/XXX/httpdocs/classes/Customer.php(338): ObjectModelCore->update() #6 /var/www/vhosts/XXX/httpdocs/config/config.inc.php(258): CustomerCore->update() #7 /var/www/vhosts/XXX/httpdocs/index.php(27): require(’...’) #8 {main} thrown in /var/www/vhosts/XXX/httpdocs/modules/advancedcustomfields/advancedcustomfields.php on line 4397

Hi!

I checked it up and I found the reason in Prestashop’s github. They have removed a service alias without checking if it is used. (They will fix it in PS 9)

I can not reproduce the error though on my test PS 8.2 with php 8.1.

Based on Prestashop’s github, in order to fix it, we need to replace all three occurences of:

‘prestashop.core.admin.feature_flag.repository’

in the main module file with:

FeatureFlagRepository::class

also, in the beginning of the main module file, after the existing use statements we should also add:

use PrestaShopBundle\Entity\Repository\FeatureFlagRepository;

Please try it on, and if you need more help, please send me a message!

Kindest regards!

fix not working,

I have temporarily do this:

remove the check in your module for v2 product page in backoffice,

and this line – true

$productPageV2 = true;

this is a very serious error in general – because the store started to crash 500.

weird..

it’s the guideline provided in the prestashop’s github issue..

your solution, aka removing the check is fine!

I will try to reproduce the issue on a demo shop a bit longer..

if you want to share your ftp and admin details, I can fix it on your side, as the issue is visible there.

if you decide to share your credentials, do that through the contact form at Inn-mods profile page, as it is private. Comments are public..

Kindest regards!

Is it possible to set a maximum number of characters per input field?

Hi!

sorry, but such an option is not available..

Kindest regards!

Any chance to expect a gallery field ? It would be so great to allow admin add different galleries inside their page backend and then to place via shortcode in frontend where they’re needed.

Regarding categories field no chance to display them (text and images) in product pages (fields displaying info if product belongs to category where infos have been added)

Regarding custom fields plugin Can fields be sorted inside page or categories via drag and drop and not by number cause when added a new field that need to be added in top level (2 or 3 place) it is a headache to change all the field number places No chance to display shortcode without having to enter in each field ?

Thx in advance

Hi!

I am answering the questions one by one.

As you are the first person requesting a gallery field up to now, it was not in the future plans.. but I will add it (the most popular features are implemented).

Category fields should be displayable in the product page. Check the documentation of the module for more info and if you need help, please contact me!

I will also add in the future features the drag and drop reordering. You can expect this one to be implemented!

I can also add the widget code in the custom field lists in the following update!

Kindest regards!

Καλημέρα!

well, I could do that.. :)

but I try to answer the comments and the support requests as fast as possible!

and this usually solves any misconfiguration issues!

although you are working on a Sunday, I still wish you have a great day!

Kindest regards!

Well to be honest I try not to,

but there is a new client who needs Skroutz integration and I want to automate the availability text so as not clients calling for easy stuff.

Today is semi-day off to Maastricht, NL in 2 hours.

Relocated from Drama, GR to BE :)

I also try not to..

but sometimes like today, it is needed!

I hope the relocation to Belgium works out! :)

Be well!

Hello, plugin doesn’t support for changes to all stories (in multistore) in Prestashop 8.1 (new product page).

Hi!

well, the module supports multistore and the new product page of Prestashop in 8.1.

please send me more details about the issue you have, so we can sort it out!

you can send me a private message through the contact from at Inno-mods profile page.

Kindest regards!

I send email with details

Great!

I am answering to you through email!

Kindest regards!

Hello, Is it possible to filter by product custom fields on the category page?

I am referring to the select or checklist fields, obviously a textbox is not going to be filtered

Hi!

no, you can not filter products by custom fields!

you should use Attributes & Features to filter your products!

Kindest regards!

Hello I Have a question i would like to buy your module but first i would like to be sure. Is it possible to do the following with your module

https://zupimages.net/viewer.php?id=23/35/kdml.png [url=https://zupimages.net/viewer.php?id=23/35/kdml.png][img]https://zupimages.net/up/23/35/kdml.png[/img][/url]

and if so,can you zoom in on image ?

sincerely

Hi!

if you want to customise your products, then you should use Prestashop native customisations.

if you just want to display additional info, then you can use the module.

for image zoom you should use another module, like: https://codecanyon.net/item/advanced-product-image-zoom-for-prestashop/23198332

Kindest regards!

Bonjour, le problème c’est que avec prestashop je ne sais pas comment le faire si vous avez une idée je serais ravie.car j’ai déjà essayez avec les attributs mais ce n’est pas ça que je voudrais faire

Cordialement

Hi!

you should use product customisations, not product attributes!

Kindest regards!

Good morning, does this plugin work like Wordpress ACF? Can I add custom fields to any page, including home? Thanks in advance

Hi!

you can add custom fields to products – categories – customers!

you can display those custom fields anywhere you want.

For example you can display a product custom field in product page, but you can also display it in product listings in the home page!

Kindest regards!

OK thank you. But how does the implementation work in my theme?...is it possible to hook them into specific sections of a custom theme on the frontend side?

In order to display the custom field in the frontend, you need to insert the widget code provided in the respective template file in the position you want.

If the widget code for a product field is inserted into the product page, it automatically gets the id of the current product.

If on the other hand the widget code for a product field is inserted into a listing in the home page, then you need to assign the product id to the widget code.

The documentation of the module, has implementation examples for the widget code. It also, has additional examples with conditional logic.

Kindest regards!

hola ouedi agregar numero de telefono verdad?

Hi!

I am not sure what you mean with your question..

you can create a custom field for phone number..

keep in mind that prestashop already includes phone numbers in addresses..

Kindest regards!

hola me gustaria saber si automaticamente se ven reflejado os registros en en back oficce

Hi!

I am not sure what you mean with your question..

Product and Category custom fields are set in the backoffice and are visible in the frontend..

Customer custom fields can be set either in the backoffice (visible in the front) or by the customer in the frontend (visible in the backend).

Kindest regards!

Hello, pre sale question. Is it possibile to automate the import with cronjob from sftp?

Hi!

sorry, but at the moment it isn’t!

Kindest regards!

Hello, i bought the module and tested it. But i have a big problem. I only need to import several customer fields, and i can’t import one field at a time by csv. Is there a way to import all customer fields at the same time?

Hi!

the import functionality is designed so you can import one field at a time! Importing several fields at the same time is not supported!

Kindest regards!

is this module also compatible with ps 1.6 version?

Ηi!

sorry, but no!

Kindest regards!

Thanks for your response.

I try to using the import function but get a 500 server error as soon as I upload the import file. Can you please help and solve this issue?

Hi!

Please send me your admin credentials and the file you try to import, so I can check it out.

Kindest regards!

The issue is solved. You had a limit of 1000 characters in the advancedcustomfields.php when importing. I did change while (($data = fgetcsv($handle, 1000, $separator)) !== FALSE) to while (($data = fgetcsv($handle, 30000, $separator)) !== FALSE) and no more errors. :)

Great! :)

the fix is going to be applied to the next update of the module!

Kindest regards!

Hello ! is there a way for image input to only get/display url of image (in case of background :D ) thanks !

Hi!

you can use the native smarty replace function to remove the img tag.

If you need more help implementing the function, please contact me through the contact form at Inno-mods profile, as I can not add demo code in the comments..

Kindest regards!

Hello, i did it :)

Great! :)

Kindest regards!

Hello, does your module allows filtering with Faceted module ( Filtering product in category page) thanks!

Hi!

Sorry, but no, custom fields can not be used as filters.

Kindest regards!

Hi! I have a question about whether it is possible to set the product field as required?

Hi!

at the moment, only Customer custom fields can be set as required!

Kindest regards!

Hello, can this module be defined as the equivalent of acf field for wordpress? Can I create fields as I like and insert them for example in a custom template created for a specific page?

Thank you

Hi!

I am not sure what you mean when you say “a template with a particular graphic”.

Custom, fields are inserted into the template by using the widget code provided. You can add then into your template files in a any position you want..

You can also use the widget code in other modules that provide shortcode support. For example the “Creative Elements Page Builder”.

Did I answer your question?

Kindest regards!

Ok, thank you. Do you have any documentation where I can see all this? Thank you

Hi again!

the documentation of the module is included in the download zip you get from Codecanyon!

Kindest regards!

Hello :) Thanks for the nice Modul. This makes the work a lot easier.

One question: How can I use the Switch field type in the template?

if ….. ?

Best, André

Hi!

well, if the switch if checked, a “check” icon appears when using the widget code provided. If the switch is unchecked, a “x” icon appears.

You can also use conditional logic, in order to display whatever you want when the switch is on. For example:

{if strpos({widget name=’advancedcustomfields’ hook=’switch’},’done’)} switch checked {/if}

If you need more help, please contact me again!

Kindest regards!

Hi!

Thank you very much for the fast support! It works :D

Is it possible to use ACF in the mail templates as well?

Best, André

You are welcome! :)

Sorry, but you can not use it in the email templates..

Kindest regards!

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey