<% begin %>
<%= render "layouts/header" %>
<%= render "layouts/sidebar" %>
Add Products
<%= render "layouts/breadcrumbs" %>
<%= form_tag({:action=>'create'} ,:multipart=>true,:id=>'myForms' ) do %>
<%if @AddProduct && @AddProduct.pd_category%> <%else%> <%end%>
<%if @AddProduct && @AddProduct.pd_subcategory%> <%else%> <%end%>
<% if @AddProduct%> <%else%> <%end%>
<% if @DelProducImage.present? %> <% @DelProducImage.each_with_index do |newimg, index| %> <% if newimg.pmi_image.to_s.present? chekpath = "#{Rails.root}/public/images/product/multi_image/#{newimg.pmi_filepath}/#{newimg.pmi_image}" if File.file?(chekpath) myimages = "#{root_url}images/product/multi_image/#{newimg.pmi_filepath}/#{newimg.pmi_image}" end end %>
Thumbnail <%= newimg.id %> <% if newimg.pmi_imgside.to_s.present? %>
<%=newimg.pmi_imgside%> <% else %> <% end %>
<% end %> <% else %> <% if @AddProduct chekpath = "#{Rails.root}/public/images/product/#{@AddProduct.pd_img}" if File.file?(chekpath) myimages = "#{root_url}images/product/#{@AddProduct.pd_img}" end end %>
Thumbnail 1
<% end %>
<%= render 'add_product/basic_information' %>
<%end%>

<% no_image_url = "#{root_url}images/no-image.jpg" %>
<% if @prodmultimage && @prodmultimage.length >0 @prodmultimage.each do |newimg| myimages = "../assets/img/course/course1.jpg" if newimg.pi_attachment.to_s.present? chekpath = "#{Rails.root}/public/images/product-other-images/#{newimg.pi_filepath}/#{newimg.pi_attachment}" if File.file?(chekpath) myimages = "#{root_url}images/product-other-images/#{newimg.pi_filepath}/#{newimg.pi_attachment}" end end %>
 
<% end else %>

No Product images found.

<% end %>
<%=render'layouts/quick_view_product'%> <% message = "" rescue ActiveRecord::RecordNotFound => e # Handle the specific exception when the record is not found message = "Record not found "##{e.message} isFlags = false rescue ActiveRecord::StatementInvalid => e # Handle SQL syntax errors or invalid queries message = "Unknown error" ##{e.message} isFlags = false rescue StandardError => e # Handle any other errors message = "An error occurred " ##{e.message} isFlags = false end %> <%=message%>