Jump to content

melhaa

Members
  • Content count

    113
  • Joined

  • Last visited

Posts posted by melhaa


  1. Has anyone made it so that admin can say that width is 100px but height is proporsjonal to the actual image size?

     

    The default image in oscommerce has this.

     

    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {

    if ($image_size = @getimagesize($src)) {

    if (empty($width) && tep_not_null($height)) {

    $ratio = $height / $image_size[1];

    $width = $image_size[0] * $ratio;

    } elseif (tep_not_null($width) && empty($height)) {

    $ratio = $width / $image_size[0];

    $height = $image_size[1] * $ratio;

    } elseif (empty($width) && empty($height)) {

    $width = $image_size[0];

    $height = $image_size[1];

    }

    } elseif (IMAGE_REQUIRED == 'false') {

    return false;

    }

    }


  2. Hi

    Got some help to get the firebug to work.

    Here is the get

     

    pageAction	new_product
    products_id	423
    sdAdminID	3854260f1befbc0b8b12fa6181acbf9a
    taxRate	25

     

    And the Response

    <div id="topBar"><table width="100%" cellpadding="0" cellspacing="0">
    
    <tr>
    
    	<td>	
    
    	</td>
    
    	<td align="right">
    
    				<div  style="padding:5px 3px 5px 0px">
    
    			<select name="template_drop" id="template_drop" style="margin-bottom:3px"><option value="0" SELECTED
    
    >-- Valg --</option></select>					 
    
    				<input type="image" src="attributeManager/images/icon_load.png" onClick="return customTemplatePrompt
    
    ('loadTemplate');" border="0" title="Bruk det valgte templatet" />
    
    				 
    
    				<input type="image" src="attributeManager/images/icon_save.png" onClick="return customPrompt('saveTemplate'
    
    );" border="0" title="Lagre det eksisterende templatet" />
    
    				 
    
    				<input type="image" src="attributeManager/images/icon_rename.png" onClick="return customTemplatePrompt
    
    ('renameTemplate');" border="0" title="Gi det valgte templatet nytt navn." />
    
    				 
    
    				<input type="image" src="attributeManager/images/icon_delete.png" onClick="return customTemplatePrompt
    
    ('deleteTemplate');" border="0" title="Slett det valgte templatet." />
    
    				 
    
    		</div>
    
    					</td>
    
    </tr>
    
    </table>
    
    </div><div id="attributeManagerAll"><div id="currentAttributes">	<table width="100%" border="0" cellspacing
    
    ="0" cellpadding="3">	
    
    	<tr class="header">
    
    		<td width="50" align="center">
    
    			<input type="image" src="attributeManager/images/icon_plus.gif" onClick="return amShowHideAllOptionValues
    
    ([1,3],true);" border="0" />
    
    			 
    
    			<input type="image" src="attributeManager/images/icon_minus.gif" onClick="return amShowHideAllOptionValues
    
    ([1,3],false);" border="0" />
    
    		</td>
    
    		<td>
    
    			Produkt Alternativer<span style="font-size: 11px; color: red;">  Trykk på + tegnet for
    
    å se alle attributtene</span>
    
    		</td>
    
    
    
    		<td align="right">
    
    			<span style="margin-right:40px"></span>
    
    		</td>
    
    	</tr>
    
    
    
    			<tr class="option">
    
    			<td align="center">
    
    			<input type="image" border="0" id="show_hide_1" src="attributeManager/images/icon_plus.gif" onClick
    
    ="return amShowHideOptionsValues(1);" />
    
    
    
    			</td>
    
    			<td>
    
    				Farge (1)				</td>
    
    
    
    			<td align="right">
    
    				<select name="new_option_value_1" style="margin:3px 0px 3px 0px;" id="new_option_value_1"><option
    
    value="4">R?d</option><option value="5">Sort</option></select>						<input type="image" src="attributeManager
    
    /images/icon_add.png" value="Add" border="0" onClick="return amAddOptionValueToProduct('1');" title="Legger
    
    til attributtet fra nedtrekksmenyen til Farge alternativet. " />
    
    					<input type="image" title="Lag et nytt attributt som ikke eksisterer i nedtrekksmenyen til Farge
    
    ." border="0" src="attributeManager/images/icon_add_new.png" onClick="return customPrompt('amAddNewOptionValueToProduct'
    
    ,'option_id:1|option_name:Farge');" />
    
    					<input type="image" border="0" onClick="return customPrompt('amRemoveOptionFromProduct','option_id
    
    :1|option_name:Farge');" src="attributeManager/images/icon_delete.png" title="Sletter produktalternativet
    
    Farge og de 1 attributtene som tilhører dette alternativet." />
    
    			</td>
    
    		</tr>
    
    
    
    
    
    		<tr class="optionValue" id="trOptionsValues_1" style="display:none" >
    
    			<td align="center">
    
    				<img src="attributeManager/images/icon_arrow.gif" />
    
    			</td>
    
    			<td>
    
    				Bl				</td>
    
    			<td align="right">
    
    			    <span style="font-size:9px; color:black;"> prefix     pris m/mva
    
        pris u/mva    rekkefølge      
    
    ;                 
    
    ; </span><br>
    
    				<span style="margin-right:41px;">
    
    					<select name="prefix" id="prefix_2" style="margin:3px 0px 3px 0px;" onChange="return amUpdate('1'
    
    ,'2');"><option value=""></option><option value="%2B" SELECTED>+</option><option value="-">-</option
    
    ></select>						<input type="text" name="price_gross_2"  style="margin:3px 0px 3px 0px;" id="price_gross_2"
    
    size="7" onKeyUp="amUpdNet('2')" onChange="return amUpdate('1','2');"> <input type="text" name="price_2"
    
    value="40.0000"  style="margin:3px 0px 3px 0px;" id="price_2" size="7" onKeyUp="amUpdGross('2')" onChange
    
    ="return amUpdate('1','2');">						<input type="text" name="sortOrder_2" value="0"  style="margin:3px
    
    0px 3px 0px;" id="sortOrder_2" size="7" onChange="return amUpdate('1','2');">					</span>
    
    				<input type="image" border="0" onClick="return customPrompt('amRemoveOptionValueFromProduct','option_id
    
    :1|option_value_id:2|option_value_name:Bl');" src="attributeManager/images/icon_delete.png" title="Sletter
    
    attributtet Bl fra produktalternativet Farge." />
    
    								</td>
    
    		</tr>
    
    			<tr class="option">
    
    			<td align="center">
    
    			<input type="image" border="0" id="show_hide_3" src="attributeManager/images/icon_plus.gif" onClick
    
    ="return amShowHideOptionsValues(3);" />
    
    
    
    			</td>
    
    			<td>
    
    				Test (1)				</td>
    
    
    
    			<td align="right">
    
    				<select name="new_option_value_3" style="margin:3px 0px 3px 0px;" id="new_option_value_3"><option
    
    value="0">----</option></select>						<input type="image" src="attributeManager/images/icon_add.png"
    
    value="Add" border="0" onClick="return amAddOptionValueToProduct('3');" title="Legger til attributtet
    
    fra nedtrekksmenyen til Test alternativet. " />
    
    					<input type="image" title="Lag et nytt attributt som ikke eksisterer i nedtrekksmenyen til Test
    
    ." border="0" src="attributeManager/images/icon_add_new.png" onClick="return customPrompt('amAddNewOptionValueToProduct'
    
    ,'option_id:3|option_name:Test');" />
    
    					<input type="image" border="0" onClick="return customPrompt('amRemoveOptionFromProduct','option_id
    
    :3|option_name:Test');" src="attributeManager/images/icon_delete.png" title="Sletter produktalternativet
    
    Test og de 1 attributtene som tilhører dette alternativet." />
    
    			</td>
    
    		</tr>
    
    
    
    
    
    		<tr class="optionValue" id="trOptionsValues_3" style="display:none" >
    
    			<td align="center">
    
    				<img src="attributeManager/images/icon_arrow.gif" />
    
    			</td>
    
    			<td>
    
    				dyr				</td>
    
    			<td align="right">
    
    			    <span style="font-size:9px; color:black;"> prefix     pris m/mva
    
        pris u/mva    rekkefølge      
    
    ;                 
    
    ; </span><br>
    
    				<span style="margin-right:41px;">
    
    					<select name="prefix" id="prefix_8" style="margin:3px 0px 3px 0px;" onChange="return amUpdate('3'
    
    ,'8');"><option value="" SELECTED></option><option value="%2B">+</option><option value="-">-</option
    
    ></select>						<input type="text" name="price_gross_8"  style="margin:3px 0px 3px 0px;" id="price_gross_8"
    
    size="7" onKeyUp="amUpdNet('8')" onChange="return amUpdate('3','8');"> <input type="text" name="price_8"
    
    value="0.0000"  style="margin:3px 0px 3px 0px;" id="price_8" size="7" onKeyUp="amUpdGross('8')" onChange
    
    ="return amUpdate('3','8');">						<input type="text" name="sortOrder_8" value="0"  style="margin:3px
    
    0px 3px 0px;" id="sortOrder_8" size="7" onChange="return amUpdate('3','8');">					</span>
    
    				<input type="image" border="0" onClick="return customPrompt('amRemoveOptionValueFromProduct','option_id
    
    :3|option_value_id:8|option_value_name:dyr');" src="attributeManager/images/icon_delete.png" title="Sletter
    
    attributtet dyr fra produktalternativet Test." />
    
    								</td>
    
    		</tr>
    
    	</table>
    
    </div><div id="newAttribute">	<table border="0"  cellpadding="3">
    
    	<tr>
    
    		<td colspan="5"><span style="font-size:13px; color:black; font-weight:bold;">Lag et nytt produktalternativ
    
    </span></td>
    
    	</tr>
    
    	<tr>
    
    		<td align="right" valign="top">
    
    			Produktalternativ: <select name="optionDropDown" id="optionDropDown" onChange="return amUpdateNewOptionValue
    
    (this.value);"><option value="0">St?rrelse</option><option value="2" SELECTED>Størrelse</option></select
    
    >				<div class="optionValueAddDelete">
    
    				 
    
    				<input border="0"  type="image" src="attributeManager/images/icon_add_new.png" onClick="return customPrompt
    
    ('amAddOption');" title="Lag et nytt produktalternativ." />
    
    
    
    			</div>
    
    		</td>
    
    		<td align="right" valign="top">
    
    			Attributt: <select name="optionValueDropDown" id="optionValueDropDown"><option value="7">large</option
    
    ><option value="9">medium</option><option value="6">small</option></select>				<div class="optionValueAddDelete"
    
    >
    
    				 
    
    				<input border="0" type="image" src="attributeManager/images/icon_add_new.png" onClick="return customPrompt
    
    ('amAddOptionValue');" title="Lag et nytt attributt." />
    
    			</div>
    
    		</td>
    
    
    
    		<td valign="top">
    
    			<input type="image" src="attributeManager/images/icon_add.png" value="Add" onClick="return amAddAttributeToProduct
    
    ();" title="Legger til attributtet til produktet." border="0"  />
    
    		</td>
    
    	</tr>
    
    </table>
    
    </div></div>


  3. Hi

    Sorry.

     

    What happens is that when I write the price (gross or net) it calculate the other perfect. Then I save and the correct price(inklusive tax) is shown in the shops dropdown menu for attributes.

    But when I go back into edit on the product and look at the price, the inklusive tax field is empty and the ex tax field show the price ex tax(as it should).

     

    My question is then how to get the field to show the price when I go back in to edit.

    I had a look at my code, and it is exact as you wrote in your last post.

     

    Hope my explenation was better this time.


  4. Hi

    Sorry for explaining myself poorly, as you probably understand english is not my first language.

     

    I have both banktransfer and cod installed.

    With cod I only write use the title text, so all info I need is printed, but with

    banktransfer I have some text that is defined in admin(what bank, account number, etc) that is not displayed, only the title is displayed, but as I said before, it's not a problem.


  5. Hi

    just installed the send email after updating, works perfectly.

    YOU'RE THE MAN ralph2

     

    But I didn't understand the payment thing, I have several different to choose from, but it still sends the information, exept for the text in banktransfer, but thats not important.

     

    Love it.

     

    Thanks for exellent help.....


  6. Hi

    Change the function below in admin/includes/modules/newsletters/newsletter_products.php

     

    to:

    $choose_products_string = '<script language="javascript"><!--

    function mover(move) {

    if (move == \'remove\') {

    for (x=0; x<(document.newsletter.elements[\'products[]\'].length); x++) {

    if (document.newsletter.elements[\'products[]\'].options[x].selected) {

    with(document.newsletter.elements[\'chosen[]\']) {

    options[options.length] = new Option(document.newsletter.elements[\'products[]\'].options[x].text,document.newsletter.elements[\'products[]\'].options[x].value);

    }

    document.newsletter.elements[\'products[]\'].options[x] = null;

    x = -1;

    }

    }

    }

    if (move == \'add\') {

    for (x=0; x<(document.newsletter.elements[\'chosen[]\'].length); x++) {

    if (document.newsletter.elements[\'chosen[]\'].options[x].selected) {

    with(document.newsletter.elements[\'products[]\']) {

    options[options.length] = new Option(document.newsletter.elements[\'chosen[]\'].options[x].text,document.newsletter.elements[\'chosen[]\'].options[x].value);

    }

    document.newsletter.elements[\'chosen[]\'].options[x] = null;

    x = -1;

    }

    }

    }

    return true;

    }

     

    function selectAll(FormName, SelectBox) {

    temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";

    Source = eval(temp);

     

    for (x=0; x<(Source.length); x++) {

    Source.options[x].selected = "true";

    }

    }

    //--></script>';


  7. Hi

    I have converted to php5 and mysql 5 but have this problem.

     

    Catchable fatal error: Object of class newsletter_products could not be converted to string in ..../admin/includes/functions/html_output.php on line 300

     

    This is the tep_draw_pull_down_menu function.

     

    Anyone know how to fix this, I really don't want to loose this great contribution.


  8. Hi

    I have installed the "Product attribute sort order support" version, and found a way to get the fields to update when changed.

     

    open attributeManager/javascript/attributeManager

     

    find:

    function amUpdate(optionId, optionValueId) {

    amSendRequest('amAction=update&option_id='+optionId+'&option_value_id='+optionValueId+'&price='+getDropDownValue('price_'+optionValueId)+'&prefix='+getDropDownValue('prefix_'+optionValueId)+'&sortOrder='+getDropDownValue('sortOrder_'+optionValueId),'',false);

    getElement('price_'+optionValueId).blur();

     

    after add:

    getElement('sortOrder_'+optionValueId).blur();

     

    Save and upload.

     

    Hope this helps.

×