Jump to content

Not able to retrieve/generate product variant attributes


Recommended Posts

I'm having problems with retrieving attributes for Variants. 

This hook seems to not triggering for me: 

$this->addHook("/find-padloper_product_attributes/", $this, 'hookFindPadloperProductAttributesOptions');

When trying to find attributes it returns a 404.

I'm using multilingual fields. 

 

  • Like 1
Link to comment
Share on other sites

Posted (edited)

Hi @Spinbox,

Please confirm if your ProcessWire is running off a sub-directory.

I have tested on a ML site where Dutch is the main language and English the 'other' language and the hook works fine. What language are you searching in?  Maybe it doesn't matter but just want to be sure.

Thanks.

Edited by kongondo
Link to comment
Share on other sites

Hi @kongondo, no I am not running of a sub-directory.

I haven't changed anything, so I assume it uses the default language (in my case Dutch).

I'm not sure it has anything to do with language. Isn't it just looking for the default language values?

Link to comment
Share on other sites

Hi @Spinbox,

Thanks for the login details. You have a 5 errors that are showing during the Ajax call. These are coming from your templates and func files. I think they are interfering with the response. I'll fix this on your site and test again.

Link to comment
Share on other sites

Nothing wrong with ready.php

I think this is what is happening: Padloper is using virtual URL hooks. It means it needs to handle the 404s in the backend for the requested URL. On your site, something is preventing this from happening meaning ProcessWire returns 404s for those virtual URLs. I don't know what that 'thing' is on your site ...yet😀.

  • Like 1
Link to comment
Share on other sites

Thank you @kongondo,

You got me on the right path and I have found the issue. My homepage template has url segments enabled. Once I disable this, the url works.

Not sure if this contributes to the problem but I use TemplateEngineFactory.

To keep url segments I used a regex to allow anything but paths that start with find-padloper in the template settings.

regex:^(?!find-padloper).*$

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...