| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Parse smarty tags in extra fields | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Can anyone advise how I might be able to make extra fields parse smarty tags??
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() Ooh, I don't think that is going to be easy. Extra fields are just that, extra fields stored in the DB. I think you may be better off explaining what you want to do, maybe there is an easier way?
Just posting to subscribe, I'm also curious why you want to do this. ![]() BTW: just visited your site for the first time. Are you the inventor of the tqualizer shirts? Pretty freakin cool idea. Amazing to be featured on Ellen.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() I was thinking of storing a list of compatible products in an extra field, so that it would be easily update-able and then automatically applied across all the products.
The shirts - not the inventor, but have been there since the very beginning. ![]()
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() Well your site is cool. You are doing a great job.
I think the extra field could certainly be used to store the compatible products, maybe a comma-seperated list of product ids. What I still don't understand, is why the need for smarty in the field. (thats the part that I was going to try and re-think for you) What I would do, is just use the field to store the data you need, and then work with that data in the templates or php. TBH, I rarely use extra fields. If this list needs to be the same on all product pages, a language variable would serve the same purpose right?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() This is actually for the rebuild of our gadget site that is going live soon, so using the language variable in the extra field (which we mostly use for listing product features) would only be applied to some products and not globally across all products.
Basically I need to come up with a way to list what kind of devices Product X, Y and Z are compatible with, knowing that Product X may not be compatible with all the products that Product Y and Z are. The other thing I need to take into consideration is that the list of devices is constantly being updated as new models come out. What happened before was that we hard coded list of text, but they got outdated because of the pace of technology and it was really cumbersome to maintain it across all the products. So, I've envisioned this module in my mind that would maintain a list of devices (that was easily updateable) and then each device could be added to the compatibility list for each product.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() This is a good question. Let me give you an example using an extra field for technologies, awards, static text, etc. Then this extra field to be used as content for a new tab in product page. If an extra field has the same value (technology) for many products, a language label could solve the problem. Editing this label means to change in all product pages with no efforts.
So, I am interested in this change of using language labels or variables (XC or defined) in extra fields content.
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() Try this
1. The extra field name is "tech" 2. The language variables names are "technology", "tech", "technical" 3. You enter just that text for appropriate products - tech, technology, technical or leave empty 4. When showing extra fields loop through them and if servoce_name=tech show {$lng.`$field.value`} Now this is not tested so it may not work You can also just say if service_name=tech if filed.value=tech show THIS elseif field.value=technology show THAT etc...
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||||
|
|||||||||
![]() Thanks Steve, this is a good tip.
What about using more than one language variable with an extra field? Let's say we have products with an extra field called Technology formed by joining 1, 2, ... 6 language variables. One way is giving the value of tech1, tech2, tech3 and asociate language variable for every of them. Other ideas?
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() We should find a better one. Let's say for changing a phrase/word in a tech we have to change all techXX variables which is a hard way, time consuming. Also, we create a lot of variables instead of few.
Quote:
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|