The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 1121 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
price list plugin, need help
#1
Hi all !

I wish to create a plugin to create/edit and display list price as a table.

You can see what I manualy done here : http://cyclehome.artisan-online.fr/tarifs

My list price will be like that :
Quote:Title -------------------- Price
--------First category--------
-First item ------- First Price
-Sec item ------- Sec Price
------Second category------
-First item ------- First Price
-Sec item ------- Sec Price
I'm very bad with multidimensional array use and I need your help to know how to do.

I've begin code (probably the function to write each item in xml file, I'm using echo function but just to watch the result with a temporary variable) but it is surely false :
Code:
<?php
$title = 'Prestations';
$empty = '&nbsp;';
$title_price = 'Prix (€)';
$subtitle = array("sub 1", "sub 2", "sub 3");
$item = array(); <=== Don't know how to fix value for each item with $subtitle

echo '<table>';
echo '<colgroup>';
echo '<col class="colonne-title" /><col class="colonne-empty" /><col class="colonne-price" /></colgroup>';
echo '<tbody><tr><td><h3>'.$title.'</h3></td>';
echo '<td><h3>'.$empty.'</h3></td>';
echo '<td><h3>'.$title_price.'</h3></td></tr>';

foreach ($subtitle as $num_sub){
    echo '<tr><td><h4>'.$subtitle[$num_sub].'</h4></td>';
    echo '<td>'.$empty.'</td><td>'.$empty'</td></tr>';
    foreach ($item as $num_item){    
        echo '<tr><td>'.$item[$num_sub][$num_item].'</td><td>'.$empty.'</td><td>'.$item_price[$num_sub][$num_item].'</td></tr>';
    }
}
echo '</tbody></table>';
?>

Next time I will need help to create the user interface to add/delete subtitle and item.

Thanks for your help
Reply




Users browsing this thread: 1 Guest(s)