Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"New Product" Insert image


Ema85

Recommended Posts

mmmmm I've found this code in admin/categories.php

<td class="main"><?php
echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
tep_draw_file_field('products_image') . '<br>' . 
tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
$pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); 
?></td>

 

I have thought to add this string:

<td class="main"><?php
echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
tep_draw_file_field('products_image') . [b]' or URL' . tep_draw_input_field('products_image') . [/b]'<br>' . 
tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
$pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); 
?></td>

This change could damages something? If for error I fill this two form at the same time (file e url input)?

Link to comment
Share on other sites

i am interested in achieving the samething,

if u enter the url, then what will happen when the images is called, will it not call the url text from the images directory ?

 

i ahve no code experiance ata ll, if you get that sorted i will be very interested in doing it too

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

images folder is defined in configure.php and admin/configure.php, maybe something can be done there ?

on my issue it seems it might be easier to concentrate on writing a script that will download all the images to a folder and then corespond these locations in easypopulate

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

original code

// Output a form filefield
 function tep_draw_file_field($name, $required = false) {

   $field = tep_draw_input_field($name, '', '', $required, 'file');

   return $field;
 }

////

this will work?

// Output a form filefield
 function tep_draw_file_field($name, $required = false) {

   [b]if(substr($name, 0, 8)=='http://') $type='text';
else $type='file';[/b]

   $field = tep_draw_input_field($name, '', '', $required, [b]$type[/b]);

   return $field;
 }

////

Link to comment
Share on other sites

not that i would know anything bout coding, but i think the answer is in the includes/functions/html_output.php, we need the tep_image to be able to read and distinguish both URL and file name, then it might be the simple matter of giving 2 options in the product image section, either file or url.

 

as to how to do that , i have no clue, was hoping someone else might

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...