News:

Support the VirtueMart project and become a member

Main Menu

Problem creating new manufacturers

Started by Argos, April 28, 2012, 22:25:10 PM

Previous topic - Next topic

Argos

Hello All
I'm trying to setup a new store.

I have installed the demo data to help me understand the system better.

I have changed the demo manufacturer and it worked fine, but when i add new manufacturer I noticed that the "Storing location/type" under Images is set to COM_VIRTUEMART_FORM_MEDIA_SET_MANUFACTURERS instead of the images folder "images/stories/virtuemart/manufacturer/" or "manufacturer" as it is in the demo manufacturer.

I cannot change the image of any new manufacturer.

Any thoughts ?

Joomla 2.5.1, VM 2.0.4 (i can't upgrade to 2.0.6 for some reason. getting errors and messes up my installation)

Argos

pushing up...
Nobody noticed that issue on their installations ?

finbarr69


finbarr69

Digging to see where that is coming from, I find in file administrator/components/com_virtuemart/helpers/mediahandler.php

   line 1152 :
    <td><fieldset class="checkboxes">'.JText::_('COM_VIRTUEMART_FORM_MEDIA_SET_'.strtoupper($this->file_type)).'</fieldset></td></tr>';

I don't know yet where $this->file_type is getting passed in, but it would appear to be set to manufacturers instead of manufacturer and this causes COM_VIRTUEMART_FORM_MEDIA_SET_MANUFACTURERS to display instead of the word manufacturer

As a temporary measure (a hack), I've added these lines :

   1148 if(!empty($this->file_type)){
   1149 if (strtoupper($this->file_type) == "MANUFACTURERS") {
   1150         $this->file_type = "manufacturer";
   1151 }

   1152      $html .= '<tr>
   1153          <td class="labelcell">'.JText::_('COM_VIRTUEMART_FILES_FORM_LOCATION').'</td>
   1154         <td><fieldset class="checkboxes">'.JText::_('COM_VIRTUEMART_FORM_MEDIA_SET_'.strtoupper($this->file_type)).'</fieldset></td></tr>';

This permitted me to add a manufacturer (with an image).

There must be a config file or db entry somewhere that has that extra s on manufacturer somewhere, but that word is so common in the code, I don't know where that might be yet.  If anyone can point to it I'd be grateful.  Surprised only one other person has seen this, but maybe nobody else uses manufacturers?

Brian