Project Home
Manuals
Contact Us
Download
Demo
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
AbanteCart v
1.3.4
is released.
Home
Help
Search
Calendar
Login
Register
AbanteCart Community
»
Shopping Cart Operations
»
Support
»
Template Support
»
how do you add more variables for head.tpl?
« previous
next »
Print
Pages: [
1
]
Author
Topic: how do you add more variables for head.tpl? (Read 6088 times)
cbarg2004
Newbie
Posts: 14
Karma: +4/-0
how do you add more variables for head.tpl?
«
on:
March 17, 2014, 01:53:06 AM »
If in storefront/view/default_html5/template/common/head.tpl I enter the line
print_r (get_defined_vars());
I get an array of all defined variables. Now, how can I add extra variables? Where (what file) those variables are defined and populated?
I know the query, I just don't know where to write it.
Thanks
Logged
abantecart
Administrator
Hero Member
Posts: 4359
Karma: +298/-10
Re: how do you add more variables for head.tpl?
«
Reply #1 on:
March 17, 2014, 08:49:06 AM »
i am not clear what variables you look for? Some variable are specific to common, page or block controller
For head, see this controller:
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/common/head.php
Logged
Please
rate your experience
or
leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can
help
cbarg2004
Newbie
Posts: 14
Karma: +4/-0
Re: how do you add more variables for head.tpl?
«
Reply #2 on:
March 17, 2014, 08:33:06 PM »
Basically I need to get the image of the product url within the head tags for Facebook metatags. I just did it opening a connection in the head.tpl but I don't quite like the idea :-/
Logged
eCommerce Core
Administrator
Hero Member
Posts: 1602
Karma: +93/-1
Re: how do you add more variables for head.tpl?
«
Reply #3 on:
March 18, 2014, 04:04:50 PM »
If this data comes from facebook based on direct access to facebook URL, it needs to be in 'tpl' file
Logged
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett
cbarg2004
Newbie
Posts: 14
Karma: +4/-0
Re: how do you add more variables for head.tpl?
«
Reply #4 on:
March 18, 2014, 09:28:23 PM »
No, the image URL corresponding to the article you are viewing is in resources, and the URL is in the database (resource_description.resource_path). I had to do a query, even though I didn't want to :-/ but it's working :-)
Logged
Print
Pages: [
1
]
« previous
next »
AbanteCart Community
»
Shopping Cart Operations
»
Support
»
Template Support
»
how do you add more variables for head.tpl?
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Back