| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Extra Fields?? | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() What is the deal with Extra Fields?
The idea that I had when I initally heard of extra field was that you could use them to make extra fields that are not covered in the base line setup of xcart.. But how in the world do you use these things? I made an extra field. Specs: now what tag do I use to have that extra field show up in the product.tpl file? {param00} nope {Spec:Extrafield} nope the manual brushes over this topic and only tells you how to add them the product entry page.. and if I get into the modules/ExtraFields/product.tpl it does not make any sense... Also any html data I enter into an Extra Fields field is cleared upon submitting. How do I keep this from happening? help! thank you jon spooner |
|||||||
#2
|
|||||||
|
|||||||
![]() Use {$products[product].param00} in products.tpl
Just make sure it is within the {section} {/section} tags.
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#3
|
|||||||
|
|||||||
![]() thank you Emerson!
a follow up question: the section tags are for looping no? So why would the {$products[product].param00} need to be in the midst of a loop? I just want the data from param00 to be pulled when relating the the product ID. Shoudl I make a section loop with the product id as the cariable and only loop it one time? anyone else have thoughts on the html clipping? thanks again |
|||||||
#4
|
|||||||
|
|||||||
![]() That I don't know...
Looking into it tho ![]()
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
The reason a section loop is required is $products is an array tha thas to be walk-throughed in order to return values. {section name=product loop=$products} means... loop over $products aray, with an index name of "product". Hence why {$products[product].param00} is used in a loop... {$array[index].value} ![]() |
|||||||||
#6
|
|||||||
|
|||||||
![]() I have this code and it is not pulling out my data...
Code:
so does $products contain all of the data related to a $productid held in an array? |
|||||||
#7
|
|||||||
|
|||||||
![]() which file exactly did you put that into?
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#8
|
|||||||
|
|||||||
![]() it is in customer/main/product.tpl
here is the head of product.tpl up to the tag instance Code:
an example page resides here: http://www.sharpsusa.com/store/customer/product.php?productid=16133 if the code was working under the image would be a text entry (param00) thanks for the help on this.. |
|||||||
#9
|
|||||||||
|
|||||||||
![]() product.php won't have a $products array, since this variable/array doesn't exist, you'll need to copy some code from products.php into product.php and pass along the results to smarty.
|
|||||||||
#10
|
|||||||
|
|||||||
![]() ![]() (in lieu of a totally lost emoticon) I just don't get it.. I tried copying the $products array code from products.php and sticking it into product.php and then alerting smarty to its existence $smarty->assign("products",$products); but no luck ![]() well since this is not really as easy as I thought I am just going to build HTML pages with add to cart links and just work on customizing the cart. Thanks for the help though, Emerson and BOOMER. I really appreciate it. thanks again Jon Spooner |
|||||||
|
|||
X-Cart forums © 2001-2020
|