|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
efab Smarty n00b
Joined: 04 Mar 2019 Posts: 1
|
Posted: Mon Mar 04, 2019 8:48 pm Post subject: SQL in smarty for data feed |
|
|
Hey there,
We're using JTL and its default export functionality for data feeds.
For our google shopping campaigns, we would like to adjust our default title.
We already created a custom field and I already caught the fields in our database, this is the SQL query:
select a.cArtNr as SKU, b.cName as Title_Default, f.cWertVarchar as Title_Google_Shopping
from tArtikel a
left join tArtikelBeschreibung b on a.kArtikel = b.kArtikel
left join tArtikelAttribut c on a.kArtikel = c.kArtikel
left join tAttribut d on c.kAttribut = d.kAttribut
left join tAttributSprache e on d.kAttribut = e.kAttribut
left join tArtikelAttributSprache f on c.kArtikelAttribut = f.kArtikelAttribut
/*google shopping title*/
where e.kAttribut = 1182 and f.cWertVarchar != '' and f.cWertVarchar is not null
NOW, how to translate this query into smarty?
Never worked before with smarty.
I hope you can help me.
Cheers
Christoph |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Mar 07, 2019 9:13 am Post subject: |
|
|
You don't "translate SQL to Smarty".
You prepare data in your PHP code, as you need them, and THEN pass them to Smarty. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|