Latest Forum Posts
Home arrow Forum
Design Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Adding extra text field to fly page (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Adding extra text field to fly page

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1761
Graemezee (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Adding extra text field to fly page 3 Years, 9 Months ago  
Hi
I have managed to integrate Both Light box + more images and Child list Mods into one site.
With the help of this form and some post on how to ad tabs to the fly page and make them conditional as per the more images in tabs sample on this site
I have taken the tabs a a stage further and put most of the output of the fly page in conditional tabs.

Description, Reviews, More images, Availability, and Related Products all appear in tabs and all except Description are conditional ie if no content available the tab will no appear.

I have been asked to ad a conditional specification Tab to the out put of the product page.

And wondered if the product type modification would enable the creation of an extra field which i could make appear in a tab. Or am i barking up the wrong tree here.


Graeme
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1764
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 9 Months ago  
I can't see why not.

If you read the full article it does show how to use it.
 
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1766
Graemezee (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 9 Months ago  
Thanks for the reply the Mod worked perfectly I also got it to work on a conditional basis.

thanks again for your sterling work.
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1770
Graemezee (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 8 Months ago  
Hi I Had my conditional solution working because I only need one extra product type throughout the shop:

I added To shop.product_details.php
Code: :

  $spes_tab "(tab=Specification)".$key."<br />"; if ($key "") { $template str_replace"{spes_tab}"$spes_tab$template ); } else { $template str_replace"{spes_tab}"""$template ); }


This just dumps any product type info in to this tab ( Worked a treat with only one product type)

i know i can remove the above from shop.product_details.php and put these into my flypage to get both product types to appear
(tab=Specification){Specificationpecification}
(tab=FAQ){FAQ:FAQ}


My question is there something i can add to this conditional code that would make it specific to the product type
Something like this but i have no `idea how to define {Specificationpecification} in this code
Code: :

  $spes_tab "(tab=Specification)".$key."<br />"; if ($key ={Specification:Specification}> "") { $template str_replace"{spes_tab}"$spes_tab$template ); } else { $template str_replace"{spes_tab}"""$template ); }



Thanks for any help Graeme
Have changed the tab brackets so you can read the code
 
 
Last Edit: 2008/05/17 05:18 By Graemezee.
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1771
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 8 Months ago  
You are testing on the wrong parameter.

the code is

if(is_array($product_type)) {
foreach($product_type as $p_type => $key) {
$template = str_replace( "{".$p_type."}",$key,$template);
}
}

$p_type is the field name and $key the value for that field.

so

if ($key ={Specification: Specification}> "") should be if ($p_type =="Specification: Specification") would test for the actual field.
 
 
Last Edit: 2008/05/17 05:26 By macallf.
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1772
Graemezee (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 8 Months ago  
Thanks for you help I got this to work But at the head of both tabs, before the content I have FAQ:FAQ
and the tabs are no longer conditional they appear in all products with the text FAQ:FAQ

$spes_tab = "(tab=Specification)".$p_type."<br />";
if ($p_type =="Specificationpecification"> "") {
$template = str_replace( "{spes_tab}", $spes_tab, $template );
} else {
$template = str_replace( "{spes_tab}", "", $template );
}


$faq_tab = "(tab=FAQ)".$p_type."<br />";
if ($p_type =="FAQ:FAQ"> "") {
$template = str_replace( "{faq_tab}", $faq_tab, $template );
} else {
$template = str_replace( "{faq_tab}", "", $template );
}

The system works with out the conditional statements I seem to be somewhat out of my depth here

also tried this
$spes_tab = "(tab=Specification)".$key."<br />";
if ($p_type =="Specificationpecification"> "") {
$template = str_replace( "{spes_tab}", $spes_tab, $template );
} else {
$template = str_replace( "{spes_tab}", "", $template );
}


$faq_tab = "(tab=FAQ)".$key."<br />";
if ($p_type =="FAQ:FAQ"> "") {
$template = str_replace( "{faq_tab}", $faq_tab, $template );
} else {
$template = str_replace( "{faq_tab}", "", $template );
}
This just dumped both params in both Tabs without the text FAQ:FAQ

Graeme
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1773
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 8 Months ago  
Why are you using

if ($p_type =="FAQ:FAQ"> "") {

and not just

if ($p_type =="FAQ:FAQ") {

$p_type either is equal to the string "FAQ:FAQ" or it isn't you do not need to test if it is blank!

and

$spes_tab = "(tab=Specification)".$p_type."<br />";

I think should be

$spes_tab = "(tab=Specification){".$p_type."}<br />";

to enclose the e.g. FAQ:FAQ in '{}' resulting in a string

(tab=Specification){FAQ:FAQ}

and not

(tab=Specification)FAQ:FAQ
 
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#1775
Graemezee (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Adding extra text field to fly page 3 Years, 8 Months ago  
Hi Mark Thanks again for your thoughts


if ($p_type =="Specificationpecification"> "") {
Works make the tabs appears
if ($p_type =="Specificationpecification") {
Fails to appear


if ($p_type =="FAQ:FAQ"> "") {
if ($p_type =="FAQ:FAQ") {
Both work


$spes_tab = "(tab=Specification){".$p_type."}<br />";
$faq_tab = "(tab=FAQ){".$p_type."}<br />";

just prints {FAQ:FAQ}

Strange that Both tab contain {FAQ:FAQ} and not {Specificationpecification} in the specification tab

$spes_tab = "(tab=Specification)".$key."<br />";
if ($p_type =="SPECPEC") {
$template = str_replace( "{spes_tab}", $spes_tab, $template );
} else {
$template = str_replace( "{spes_tab}", "", $template );
}

$faq_tab = "(tab=FAQ)".$key."<br />";
if ($p_type =="FAQ:FAQ") {
$template = str_replace( "{faq_tab}", $faq_tab, $template );
} else {
$template = str_replace( "{faq_tab}", "", $template );
}

These two work But in both cases Printed the text from FAQ:FAQ Field Tried shorting the params lable and description to SPECPEC same result

Graeme
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop