Search code examples
phpjoomla1.5virtuemart

VirtueMart item information dropdown customization


On my flypage, I have a dropdown list showing item information.
I want to customize the dropdown box, but I cant find the file I need to update.
So far I have pin it down to a variable called $drop_down in
/components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_drop.tpl.php

Can any one tell me where I can find the code relating to this?


Solution

  • Try the file: /administrator/components/com_virtuemart/classes/ps_product_attribute.php

    There is a line of code which reads:

    function list_attribute_drop( $product_id, $cls_suffix ) {
    

    From there, the line $tpl->set( "drop_down", $html ) ; is located about 99 lines down from the function line. Also, the following lines appear:

    } else {
            $html = "<input type=\"hidden\" name=\"product_id\" value=\"$product_id\" />\n" ;
            $html .= "<input type=\"hidden\" name=\"prod_id[]\" value=\"$product_id\" />\n" ;
            $tpl->set( "drop_down", $html ) ;
        }
        $html = $tpl->fetch( 'product_details/includes/addtocart_drop.tpl.php' ) ;
        return array( $html , "drop" ) ;
    

    The following functions also include similar lines:

    function list_attribute_drop_multi( $product_id, $cls_suffix ) {
    function list_attribute_list( $product_id, $display_use_parent, $child_link, $display_type, $cls_sfuffix, $child_ids, $dw, $aw, $display_header, $product_list_type, $product_list ) {
    

    I wish I could give you exact line numbers, but I've done so much customization on my code that my lines are all out of whack. Hope this helps.