MODX Community

Creating a products page

I’m trying to build an products page which will be listing cars
what would be the best method to use , im some what overwhelmed by PDOresources and Migx i think i have gasped the fundamentals but need further assistance,

my aim is to build a car page which will list all the makes and then when you click into the make it will show all the models under that make. (for example select BMW -> X5 3.0d Msport )
then once selected the model it will display information on that model which am I correct in assuming I would use TV to show the options for the cars ?

ive currently got my resources set up as above , i have managed to use pdoresources to lists all the parents i.e (audi, BMW etc… ) on the cars page , but when i click Audi the url just goes to myexample.co.uk/audi should it not be myexample.co.uk/cars/audi ?

Am i approaching this the wrong way ?
as in Wordpress i would create a custom post type (cars) and than assign categories to the post type (makes and models) than would create custom fields (colours , specs , etc…)

not sure, what your question has todo with MIGX, but to get the url, how you want it, set the system setting use_alias_path to yes

1 Like

thank you for the suggestion that worked great .

sorry for the confusion, With regards to Migx and MigxDB i am having difficulty getting it to register a package or TV , in fact once installed none of the options are working the page just hangs.
I have read through previous material regarding similar issues and have changed permission on the file to 755 but still facing the same issue,

i am running 2.7.3-pl , PHP 7.3 on a shared hosting
any input would be appreciated

Just checked the console and i am getting the following error

Failed to load resource: the server responded with a status of 500 ()
modx.jsgrps-min.js:1 Uncaught TypeError: this.mask.addClass is not a function
    at S.onShow (modx.jsgrps-min.js:1)
    at S.afterShow (ext-all.js:21)
    at S.show (ext-all.js:21)
    at Object.show (ext-all.js:21)
    at MODx.onAjaxException (modx.js?v=0d870c49:122)
    at h.Event.fire (ext-all.js:21)
    at Ext.data.Connection.fireEvent (ext-all.js:21)
    at Ext.data.Connection.handleFailure (ext-all.js:21)
    at f (ext-base.js:21)
    at m (ext-base.js:21)

DevTools failed to load SourceMap: Could not load content for https:/myexampledomain.co.uk/ manager/assets/modext/modx.jsgrps-min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

what are you trying to do with MIGX?
what are the steps to reproduce your issue?

At first i tried using Migxdb to create custom tables to handle my products page ,
so i installed it via the extras tab ,

on installation when prompted I assigned the location under components > Extras tab
then i went into the migx window

with Migx i want to create grouped TV’s for each car template , for colour, engine , picture etc…
than when i try to add a TV to Migx i get the following

and for the final tab Setup/Upgrade - none of the buttons work i can click them but nothing happens

Quick Update,

Managed to get migx working - done a fresh install of modx and extras (was an empty site anyways as i am getting to grips with modx).

@bruno17 so getting on to the migx question, i am happy using resources and pdotools to build the car product pages along with TV’s to list options, But i wanted to know how to add multiple images in a tv using Migx ? i have seen tutorials showing how to make galleries , but all i want to do is output multiple img tags within div tags than use Js to build a slider

many thanks

Create a new template variable called migxImages. In the tab “Input Options” set the “Input Type” to migx.
Insert this code into the field “Form Tabs:”

[{"caption":"Images", "fields":[{"field":"image","caption":"Image","inputTVtype":"image"}]}]

and this code into the field “Grid Columns:”:

[{"header": "Image", "width": "50", "sortable": "false", "dataIndex": "image","renderer": "this.renderImage"}]

Assign the template variable to your template.

When you create a new resource with this template, you should now be able to add images in the tab “Template Variables”.

To output your images, make a call to getImageList in your template.

[[getImageList? &tvname=`migxImages` &tpl=`@CODE:<div><img src="[[+image]]"></div>`]]

For more complex stuff use the “MIGX Management” (from the menu) to create MIGX-Configs and connect them to template variables with the field “Configurations:” (instead of using the fields “Form Tabs:” and “Grid Columns:”).

1 Like

thank you that was spot on!
migx is seems a very powerful extra (and I’ve only scratched the surface )
kudos to the creator