Witam
Mam problem z wyciągnięciem konkretnych danych ze zmiennej w smaty i wysłania go mailem.
Posiadam szablon shoper
Otóż w poniższym kodzie chciałbym wybrać jedna zmienną "{$product.product->product_name}" i wysłać zawartość mailem przez php
lub zapisać do bazy mysql niech ktoś mi podpowie jak do tego się zabraćquestionmark.gif

z góry dziękuje za podpowiedzi

  1. <h3>{$smarty.const.YOUR_ORDER}</h3>
  2. <table class="table" cellpadding="0" cellspacing="0">
  3. <thead>
  4. <tr>
  5. <th>{$smarty.const.PICTURE}</th>
  6. <th>{$smarty.const.BASKET_PROD_NAME}</th>
  7. <th>{$smarty.const.BASKET_PROD_PRICE}</th>
  8. <th>{$smarty.const.BASKET_VALUE}</th>
  9. <th>{$smarty.const.BASKET_PROD_QUANTITY}</th>
  10. <th>{$smarty.const.BASKET_DELL}</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. {foreach item='product' name=prod from=$basket_products}
  15. <tr {if $smarty.foreach.prod.index is odd}class="odd"{/if}>
  16. <td>
  17. {if $product.product->unic_name}
  18. <img alt="{$product.product->product_name}" src="image_func.php?img=gfx/{$product.product->unic_name}.jpg&amp;maxwidth={$smarty.const.CONF_FOTO_WIDTH_PODD}" />
  19. {else}
  20. &nbsp;
  21. {/if}
  22. </td>
  23. <td>
  24. <a href="{$link->getProductLink($product.product->product_name, $product.product->product_id)}" title="{$product.product->product_name}">
  25. <strong>{$product.product->product_name}</strong>
  26. </a><br />
  27. {$product.options}
  28. </td>
  29. <td>{$product.price|convertPrice}</td>
  30. <td>{$product.converted_price*$product.quantity|string_format:"%.2f"}</td>
  31. <td>
  32. <input name="quantity[{$smarty.foreach.prod.index}][quantity]" type="text" value="{$product.quantity}" size="3" onkeyup="if(event.keyCode==13) this.form.submit();" onblur="this.form.submit();"/>
  33. <input name="quantity[{$smarty.foreach.prod.index}][hash]" type="hidden" value="{$product.hash}" />
  34. <input name="quantity[{$smarty.foreach.prod.index}][product_id]" type="hidden" value="{$product.product->product_id}" />
  35. </td>
  36. <td class="to-center">
  37. <a href="#" onclick="deleteProduct('{$product.product->product_id}','{$product.hash}');return false;" title="{$smarty.const.DELETE_FROM_BASKET}"><img src="{$skinyDir}/{$smarty.const.CONF_SKIN_DEFAULT}/gfx/trash.png" alt="{$smarty.const.DELETE_FROM_BASKET}" /></a>
  38. </td>
  39. </tr>
  40. {foreachelse}
  41.  
  42. <tr>
  43. <td class="kosz" colspan="5">
  44. {$smarty.const.YOUR_BASKET_IS_EMPTY}
  45. </td>
  46. </tr>
  47. {/foreach}
  48. </tbody>
  49. </table>
  50.  
  51. </form>


W takim razie jak nikt nie odpisuje to postaram sie inaczej opisac moj problem ze smartem
Otóż chciałbym wyświetlić zmienną ta co jest w smarty w pliku innym, nowo stworzonym *.php
aby poźniej wykorzystać go do wysyłania maila lub wpisać do bazy mysql.

czy wie ktos jak to zrobic??

dzieki z góry za podpowiedzi