Joomla.it Forum

Componenti per Joomla! => Gestione e-commerce => : organista 11 May 2006, 21:11:29

: Pulsante aggiungi al carrello
: organista 11 May 2006, 21:11:29
scusate cosa devo modificare per affiancare la quantità al pulsante aggiungi, piuttosto che uno sopra l'altro?

ciao  grazie
: Re: Pulsante aggiungi al carrello
: GiorgioBlu 12 May 2006, 12:37:45
Devi modificare i file che si trovano in questa cartella
\administrator\components\com_virtuemart\html\templates

Trova quell specifico che stai utilizzando (impostato in admin), creane una copia (di backup) e modificane il layout tramite un programma qualisasi di editing  html (es. Dreamweawer).

: Re: Pulsante aggiungi al carrello
: organista 12 May 2006, 12:42:50
dunque ho già modificato il mio template browse_1 a mio piacimento ,però il riferimento {form_addtocart} non me lo cambia.
: Re: Pulsante aggiungi al carrello
: GiorgioBlu 12 May 2006, 12:46:31
Prova a vedere qui:
\administrator\components\com_virtuemart\html\shop.browse.php

Poi facci sapere e mostraci, magari, il riultato ;)


....

Confermo. Il file è quello alla linea
386      /*** Add-to-Cart Button ***/
: Re: Pulsante aggiungi al carrello
: GiorgioBlu 12 May 2006, 12:56:22
Okkio al Layout originale che è costruito a blocchi...


[allegato eliminato da un amministratore]
: Re: Pulsante aggiungi al carrello
: organista 12 May 2006, 17:53:24
ok allora prima modifica il browse_1php
:

<div style="width:100%;padding: 0px 3px 3px 3px;">
    <div style="float:left;width:20%;">
        <script type="text/javascript">//<![CDATA[
        document.write('<a href="javascript:void window.open(\'{image_url}product/{product_full_image}\', \'win2\', \'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width={full_image_width},height={full_image_height},directories=no,location=no\');">');
        document.write('<img src="{product_thumb_image}" {image_height} {image_width} border="0" title="{product_name}" alt="{product_name}" /></a>' );
        //]]></script>
        <noscript>
            <a href="{image_url}product/{product_full_image}" target="_blank" title="{product_name}">
            <img src="{product_thumb_image}" {image_height} {image_width} border="0" title="{product_name}" alt="{product_name}" />
            </a>
        </noscript>
       
    </div>
    <div>
        <h3><a style="font-size: 16px; font-weight: bold;" title="{product_name}" href="{product_flypage}">
            {product_name}</a>
        </h3>
    </div>

    <div style="float:left;width:80%;">
            {product_s_desc}&nbsp;
            <a href="{product_flypage}" title="{product_details...}">{product_details...}...</a>&nbsp;
            <br style="clear:both" />
            <a style="font-size: 14px;"</a><FONT color=red>{product_price}&nbsp;
            <br style="clear:both" />           
            {form_addtocart}
            <br style="clear:both" />       
            {product_rating}
     </div>       
               
</div>

poi.....
modifica il shop-browse.php in questo modo

:

/*** Add-to-Cart Button ***/
if (USE_AS_CATALOGUE != '1' && $product_price != "" && !stristr( $product_price, $VM_LANG->_PHPSHOP_PRODUCT_CALL )) {
$form_addtocart = "<form action=\"". $mm_action_url ."index.php\" method=\"post\" name=\"addtocart\" id=\"addtocart".$i."\">\n
                <p><label for=\"quantity_".$i."\">".$VM_LANG->_PHPSHOP_CART_QUANTITY.":</label>&nbsp;<input id=\"quantity_".$i."\" class=\"inputbox\" type=\"text\" size=\"3\" name=\"quantity\" value=\"1\" />&nbsp;<input type=\"submit\" style=\"text-align:center;background-position:bottom left;width:160px;height:35px;cursor:pointer;border:none;font-weight:bold;font-family:inherit;background: url('". IMAGEURL ."ps_image/".PSHOP_ADD_TO_CART_STYLE ."') no-repeat left center transparent;vertical-align: middle;overflow:hidden;\" value=\"".$VM_LANG->_PHPSHOP_CART_ADD_TO ."\" title=\"".$VM_LANG->_PHPSHOP_CART_ADD_TO."\" /></p>
                <input type=\"hidden\" name=\"category_id\" value=\"". @$_REQUEST['category_id'] ."\" />\n
                <input type=\"hidden\" name=\"product_id\" value=\"". $db_browse->f("product_id") ."\" />\n
                <input type=\"hidden\" name=\"page\" value=\"shop.cart\" />\n
                <input type=\"hidden\" name=\"func\" value=\"cartadd\" />\n
                <input type=\"hidden\" name=\"Itemid\" value=\"$Itemid\" />\n
                <input type=\"hidden\" name=\"option\" value=\"com_virtuemart\" />\n
              </form>\n";
}
: Re: Pulsante aggiungi al carrello
: organista 12 May 2006, 17:57:01
scusa per il copia incolla,

copiati su un file di testo i codici così magari si capisce meglio,

a me funziona bene.