logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
cmdigital  
#1 Posted : Monday, September 30, 2019 1:33:27 PM(UTC)
cmdigital

Rank: Newbie

Groups: Registered
Joined: 5/15/2019(UTC)
Posts: 6
United Kingdom

My website has multiple layers of categories so I'm trying to create a 2nd field in the Category section to upload a Banner image for each category (The 1st image is being used in the list of all categories)

I've added a section in the Admin_CategoryDetail.cshtml by simply copying the code for the original image field and updating the GetXMlProperty from imageurl to imageurl2 and updating the id="fileupload" to id="fileupload2" and name="files[]" to name="files1[]

The image is being uploaded but it simply overwrites the original image.

Can anyone point me in the right direction?

Thanks

leedavi  
#2 Posted : Monday, September 30, 2019 4:19:44 PM(UTC)
leedavi

Rank: Administration

Groups: Registered, Administrators
Joined: 11/6/2016(UTC)
Posts: 323
United Kingdom
Location: France

Was thanked: 28 time(s) in 28 post(s)
The fileupload uses a field caled "imguploadlist" to keep track of the files to be upload. Have a look at "admin_category.js" to see what it does.

It's using the "fileuploadadd" event on the ajax. I think you'll need to add the filename to this list to make it process server side. It's been many years since I looked at that, so I can not remember of the full process of the top of my head.
cmdigital  
#3 Posted : Friday, October 4, 2019 12:28:34 PM(UTC)
cmdigital

Rank: Newbie

Groups: Registered
Joined: 5/15/2019(UTC)
Posts: 6
United Kingdom

Thanks for this suggestion. We had already looked at the admin_category.js but had another look at it with regard to "fileuploadadd" Still couldn't get it to work.

We looked at the images and could see that the image was being uploaded but obviously we are still missing a step to get the server to recognise a new image field.

We decided we didn't want to hack any further and luckily we realised that we weren't using the category description field. We therefore, uploaded the image to the server, wrote the image reference into the description field and changed the template to reference "categorydesc" and this worked perfectly.

Not an ideal solution as its not as user-friendly for the client but it works.

Thanks
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.044 seconds.