| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
put content of Extra Field into the <head> ? | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm building a site in 4.4.4 and I have to use an audio player on each product page that is HTML5 compliant (with flash fallback).
Considering 42% of my customers use an iPad or iPhone to read my marketing emails (stat thanks to mailchimp!) - only having a flash/swf dependent audio player will be stupid. SO many great audio players, but not very many are HTML5 compliant, and can embed an audio player for iPad or iPhone (without popping up the quicktime player, which I do not want!) I found jPlayer jplayer.org/ - and that seems to do the trick, but it wants the /path/to/audio/content to be placed in a script in the <head> Is this even possible with x-cart? I thought extra fields had to go into the <body>, yes? Has anyone every put an extra field into the <head> section? How? Examples? Thanks, J PS -- if anyone has a better solution for an audio player??? -- I need an audio player that is: iPad/iPhone compliant (to embed) and has a flash fallback for non-HTML5 browsers. .ogg or .m4a or .mp3 for audio, and each product will have Extra Fields with the path to the audio files. Surely this is a wheel that doesn't have to be invented? Thanks. PPS -- looks like jPlayer CAN have the player <script> in the page <body> -- so that means Extra Fields will work here... it';s gonna be a late night! ![]()
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Everything assigned to smarty from the php scripts is available immediatelly in the template(s) being called after the execution of that php script so yes you can access the extra fields info in the head section of home.tpl just like you will access it in the body section.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#3
|
|||||||
|
|||||||
![]() Quote:
Really? Cool. For some reason I thought the Extra Fields module content was not available to home.tpl, and only to product.tpl (now product_details.tpl) I'll try this now. Thx J
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Well that's a different story. Extar fields may not be available on some pages for example they are not on static pages but they are available on product details page and I think now even on products list pages by default, you'll be ok
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
|
|||||||||
|
#6
|
|||||||
|
|||||||
![]() Thanks for the explanation. Makes total sense.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#7
|
|||||||
|
|||||||
![]() I read this thread, and i am stunned, since i tried everything to get extra fiels in other pages than product pages. I need it in Product_list but it wont show up the way it shows up in product pages.
Maybe i am doing something wrong? |
|||||||
#8
|
|||||||
|
|||||||
![]() You will need to get the variables brought in by products.php
Try this (untested, but it should work): in products.php BEFORE Code:
Code:
ONLY work on backups.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#9
|
|||||||
|
|||||||
![]() Hi Carpediem....
I put ur code into it, didnt work ![]() |
|||||||
#10
|
|||||||
|
|||||||
![]() Maybe little explanation WHY?
I need it cuz i am using extra fields just to have a possibility to automise a product price per unit. example: i sell a box with 24 jars, set a prices for that, than want to display the UNIT price also. In the product page it works perfect with this code: Code:
In the extra field i put the amount of units in the box, then a little math: price divided bij amount of units. outcome = $perstuk. |
|||||||
|
|||
X-Cart forums © 2001-2020
|