multiple pulldown label names in editor?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 24, 2012   (RSS)

Re: [g_williams] multiple pulldown label names in editor?

By gregThomas - September 21, 2012

Hi,

Are both the product name and category stored in the same table? If they are you might be able to list them by selecting Get options from MySQL query from the list options and then using a SELECT statement similar to the one below:

SELECT num, CONCAT(product_category, " - ", product_name)
FROM `<?php echo $TABLE_PREFIX ?>product_table`


You will need to change the variables so that they match what you have used in your tables.

This won't work if the table is storing the product category using its num field. But I can suggest something else if that is what is being used.

Thanks!

Greg
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] multiple pulldown label names in editor?

By (Deleted User) - September 24, 2012

Hi Greg, that works great.
Both product name and category shows in drop down.

Is there away to change the value from num to product name? I am trying to make SEO URL friendly titles.

I did try changing to SELECT product_name?

Re: [g_williams] multiple pulldown label names in editor?

By gregThomas - September 24, 2012

Hi,

I've done a quick test and you should be able to use the following to make the stored value the product_name:
SELECT product_name, CONCAT(product_category, " - ", product_name)
FROM `<?php echo $TABLE_PREFIX ?>product_table`


Let me know if this doesn't work for you.

Thanks

Greg
Greg Thomas







PHP Programmer - interactivetools.com