| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Add array to Smarty Template Engine ? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I am doing a Free Gift mod that was posted on this forum. I'm stuck at this part:
Quote:
How in the world do I add an array to the engine?? TIA
__________________
X-Cart version 4.0.18 |
|||||||
#2
|
|||||||
|
|||||||
![]() I'm sorry.
![]() ![]()
__________________
X-Cart version 4.0.18 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Code:
If $activeFreeGifts and $offerFreeGifts is in fact an array, just use a {section} loop over the array and irretate over it, just look at any of the code in products.tpl and you'll see what im refering to. ![]() |
|||||||||
#4
|
|||||||
|
|||||||
![]() Thank you Boomer!! I'm sorry for being so clueless though...but where the heck will I stick these arrays at?? It just says to send it to the smarty template engine.
![]()
__________________
X-Cart version 4.0.18 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
The lines of code you mentioned assigns the arrays to the templates. Therefor you can use a {section} loop over the arrays now. ![]() |
|||||||||
#6
|
|||||||
|
|||||||
![]() Please don't shoot me...I really know nothing about this stuff.
Here is the mod I'm doing: http://forum.x-cart.com/viewtopic.php?t=18380&highlight=free+gift+mod Anyway, do I just put: Quote:
Also, what file do I put these arrays in? I'm so sorry for the dumb questions.
__________________
X-Cart version 4.0.18 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() You may be better off posting this questions within the originating posted custom mods thread
![]() As it seems you just need to follow the steps closely, if its not working post on the thread as the developer of the mod may be able to shed more light than me or any other. ![]() hope this helps. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|