Gå til innhold

Jente trenger hjelp til Joomla + virtuemart


Anbefalte innlegg

Hei

jeg bruker Joomla! 1.0.11 + VirtueMart 1.0.7 på min siden. der jeg selger litt smykker....og lurer på hvordan kan jeg fjerne antall som vises på varestatus og sette in "på lager" dersom varer er på lager. eller "Ikke på lager"

 

håper noen kan hjlelpe meg.

 

det er et eller annet sted her som trengs å forandre tror jeg?

 

 

$form_addtocart = "";

 

/*** Now fill the template

* Customizing:

* a. Define your own placeholders(e.g. {product_weight} )

* b. Add a line below like this (must be below first str_replace call!):

$product_cell = str_replace( "{product_weight}", $db_browse->f("product_weight"), $product_cell );

* c. put the placeholder {product_weight} somewhere in the template (/html/templates)

<tr><td>Product Weight: {product_weight}</td></tr>

* d. save the template file under a new name (e.g. browse_weight.php )

* e. Assign the browse page "browse_weight" to the categories,

* you want to have using that template file (do that in the category form!)

**/

$product_cell = str_replace( "{product_flypage}", $url, $template );

$product_cell = str_replace( "{product_thumb_image}", $product_thumb_image, $product_cell );

$product_cell = str_replace( "{product_full_image}", $product_full_image, $product_cell );

$product_cell = str_replace( "{full_image_width}", $full_image_width, $product_cell );

$product_cell = str_replace( "{full_image_height}", $full_image_height, $product_cell );

 

if( substr( $product_full_image, 0, 4) == "http" )

$product_cell = str_replace( "{image_url}product/", "", $product_cell );

 

else

$product_cell = str_replace( "{image_url}", IMAGEURL, $product_cell );

 

if( PSHOP_IMG_RESIZE_ENABLE=='1' ) {

$product_cell = str_replace( "{image_width}", "", $product_cell );

$product_cell = str_replace( "{image_height}", "", $product_cell );

}

else {

if( file_exists( str_replace( IMAGEURL, IMAGEPATH, $product_thumb_image))) {

$arr = @getimagesize( str_replace( IMAGEURL, IMAGEPATH, $product_thumb_image) );

$height_greater = $arr[0] < $arr[1];

}

if( @$height_greater === false ) {

$product_cell = str_replace( "{image_width}", "width=\"".PSHOP_IMG_WIDTH."\"", $product_cell );

$product_cell = str_replace( "{image_height}", "", $product_cell );

}

else {

$product_cell = str_replace( "{image_width}", "", $product_cell );

$product_cell = str_replace( "{image_height}", "height=\"".PSHOP_IMG_HEIGHT."\"", $product_cell );

}

}

$product_cell = str_replace( "{product_name}", shopMakeHtmlSafe( $product_name ), $product_cell );

$product_cell = str_replace( "{product_s_desc}", $product_s_desc, $product_cell );

$product_cell = str_replace( "{product_details...}", $product_details, $product_cell );

$product_cell = str_replace( "{product_rating}", $product_rating, $product_cell );

$product_cell = str_replace( "{product_price}", $product_price, $product_cell );

$product_cell = str_replace( "{form_addtocart}", $form_addtocart, $product_cell );

$product_cell = str_replace( "{product_sku}", $db_browse->f("product_sku"), $product_cell );

 

/*** Now echo the filled cell ***/

if( $tmp_row != $row || $row == 0 ) {

if ( $db_browse->num_rows() - ($i) < $products_per_row ) {

$cell_count = $db_browse->num_rows() - ($i);

}

else {

$cell_count = $products_per_row;

}

$row++;

$tmp_row = $row;

}

$colspan = $products_per_row - $cell_count + 1;

if( $cell_count < 1 ) {

$cell_count = 1;

}

if( $use_tables ) {

echo "<td colspan=\"$colspan\" width=\"". intval(round(100/$cell_count)-4) ."%\">";

}

else {

echo "<div style=\"margin-right: 5px; width:". intval(round(100/$cell_count)-4) ."%; float:left;\" id=\"".uniqid( "row_" ) ."\">";

}

 

echo $product_cell;

 

$i++;

/*** START NEXT ROW ? ***/

if ( ($i) % $products_per_row == 0) {

$row++;

/** if yes, close the current row and print out a horizontal bar ***/

if( $use_tables ) {

echo "\n</td></tr><tr>";

}

else {

echo "\n</div><br style=\"clear:both;\" />";

}

}

else {

if( $use_tables ) {

echo "\n</td>";

}

else {

echo "\n</div>";

}

}

} /*** END OF while loop ***/

 

echo '<br style="clear:both;" />';

if( $use_tables ) {

echo '</tr></table>';

}

else {

echo '</div>';

}

?>

Endret av Maria_hansen
Lenke til kommentar
Videoannonse
Annonse

du må redigere modellen din, for så lage to typer som heter "På lager" og "Ikke inne" eller lignende... deretter definere du en variabel i modellen som kan ha de to typene.. også oppretter du de tabellene og redigerer former og templates så dette gjenspeiles utad på siden... det er i korte trekk hva jeg tror du må gjøre ;)

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...