MODIFICATION: Add image to each content/page HELP NEEDED

cscart 2.2.4



I am trying to add an uploadable image in each content/page using the cscart functions like in banners/payments/products etc. This feature will give to cscart more flexibility and can function like a simple blog/cms. Page/Content can have a thumbnail and many listing will be possible.







1 skins/basic/admin/views/pages/update.tpl (Around Line 44)

Added after the page description field:


<br />
<div class="form-field"><br />
  <label>{$lang.image}:</label><br />
   <div class="float-left"><br />
	{include file="common_templates/attach_images.tpl" image_name="page_image" image_key=$page_data.page_id image_object_type="page" image_pair=$page_data.icon no_detailed=true hide_titles=true}<br />
   </div><br />
</div><br />

```<br />
<br />
[color=#008000][b]IS WORKING FINE[/b][/color] - THe upload widget is displaying under page description field<br />
<br />
<br />
<br />
[b]2 controller/admin/pages.php[/b] (Around line 202)<br />
	```php
$page_data['icon'] = fn_get_image_pairs($page_id, 'page', 'M', true, true, DESCR_SL);
```<br />
<br />
<br />
Added in function fn_update_page<br />
```php
fn_attach_image_pairs('page_image', 'page', $page_id, $lang_code);
```<br />
<br />
<br />
Someting wrong is going on and the image is not uploading on the server.<br />
All other images in products,banners,payments is working fine.<br />
<br />
<br />
<br />
Thanks for any help/hint<br />
Thodoris

i have th same problem



Cs-Cart v3.0.5

[size=3]hi,[/size]

[size=3]On one addon i'll make i use the controllers [color=#000000]attach_images.tpl on the backend template?[/color][/size]

[color=#000000][size=3]I make change on the call due to my directory as :[/size][/color]



fn_attach_image_pairs('fans_main', 'fans', $fans_id, $lang_code);



[color=#000000][size=3]Is the anyone [/size][/color]have some more information or documentation about this controller ??

I begin to trace and reverse the controllers but before to finish this may be some one could give me directly the solutions

More over I don't understand because the global request of the backend form

transfering seems coorect and parse vars?

Is there any restriction from object_type or something else I miss?

Tks for answer and please apologize for the english

best regards

hi,

So I check all this process before :

verify that you have correctly [color=#282828][font=arial, verdana, tahoma, sans-serif]enctype=“multipart/form-data” on your update.tpl[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]At least for me it puts correctly the image on db but not loading i in [/font][/color][color=#000000][size=2]attach_images.tpl[/size][/color]

[color=#000000][size=2]so I'll go to ask questions to support ? I think we have to make a thumbnail before

hope it could help you.[/size][/color]

[color=#000000][size=2]Best regards[/size][/color]

[color=#000000][size=2]François [/size][/color][color=#282828][font=arial, verdana, tahoma, sans-serif] [/font][/color]