Common settings examples

Quick links

To help navigate the common settings page, you can click the links below to quickly access the settings you need.

The add-on is ready to connect to your MySQL database or SQL Server.

CMS

WordPress with custom fields

Connect DB column names --> Indesign Tags (case sensitive):
post_title --> title
post_content --> text
#IMAGE --> image
post_excerpt --> caption
city --> city
author --> author
(* Remember remove right spaces in IDs).

SQL for posts list:
SQL Statement:
select ID,post_title from wp_posts where post_status = 'publish' order by post_date DESC LIMIT 100
Column title: post_title
Column Id: ID

SQL for one single post:
SQL Statement:
select post_title,post_content,c1.meta_value as 'author',c2.meta_value as 'city'
from wp_posts
left join wp_postmeta c1 on c1.post_id= ID and c1.meta_key = 'Author'
left join wp_postmeta c2 on c2.post_id= ID and c2.meta_key = 'City'
where ID=#ID
Column content: post_content
Javascript to clear text:
WordpressClear();
g_text_out = g_text_in;

SQL for image and caption of one single post:
SQL Statement:
select * from wp_postmeta, wp_posts where post_id = #ID and meta_key = '_thumbnail_id' and ID = meta_value
Column image ID: guid
Column image caption: post_excerpt
Javascript to create URL to image:
g_str_url_image = g_id_image;



E-COMMERCE

WooCommerce

Connect DB column names --> Indesign Tags (case sensitive):
post_title --> title
post_content --> text
#IMAGE --> image
str_price --> price
(* Remember remove right spaces in IDs).

SQL for posts list:
SQL Statement:
select ID,post_title from wp_posts where post_status = 'publish' and post_type = 'product' order by post_date DESC
Column title: post_title
Column Id: ID

SQL for one single post:
SQL Statement:
select post_title,post_content, CONCAT(FORMAT(m1.meta_value, 2),' €') as str_price from wp_posts,wp_postmeta m1 where ID=#ID and m1.post_id = ID and m1.meta_key = '_regular_price'
Column content: post_content
Javascript to clear text:
WordpressClear();
g_text_out = g_text_in;

SQL for image and caption of one single post:
SQL Statement:
select * from wp_postmeta, wp_posts where post_id = #ID and meta_key = '_thumbnail_id' and ID = meta_value
Column image ID: guid
Column image caption:
Javascript to create URL to image:
g_str_url_image = g_id_image;

Prestashop

Connect DB column names --> Indesign Tags (case sensitive):
post_title --> title
post_content --> text
#IMAGE --> image
str_price --> price
(* Remember remove right spaces in IDs).

SQL for posts list:
SQL Statement:
SELECT p.id_product as 'id_product', pl.name as 'name' FROM psizi_product p
LEFT JOIN psizi_product_lang pl ON p.id_product = pl.id_product and pl.id_lang = 1
Column title: name
Column Id: id_product

SQL for one single post:
SQL Statement:
SELECT pl.name as title,CONCAT(FORMAT(p.price, 2),'€') as str_price,pl.description
FROM psizi_product p
LEFT JOIN psizi_product_lang pl ON p.id_product = pl.id_product and pl.id_lang = 1
where p.id_product=#ID
Column content: description
Javascript to clear text:
WordpressClear();
g_text_out = g_text_in;

SQL for image and caption of one single post:
SQL Statement:
select concat('https://www.yourdomain.com/', im.id_image, '-large_default/', pp.reference,'.jpg') as image_url
from psizi_product pp
join psizi_image im on (im.id_product = pp.id_product)
where pp.id_product = #ID and im.cover = 1
Column image ID: image_url
Column image caption:
Javascript to create URL to image:
g_str_url_image = g_id_image;