<% begin %>
<%= render "layouts/header" %>
<%= render "layouts/sidebar" %>
Catalogue Products
<%= render "layouts/breadcrumbs" %>
<% if flash[:error] %>
× <%= flash[:error] %>
<% end %> <%= form_tag({action: 'create'}, multipart: :true, id: :myForms) do %> <% if mybuyerlogox.present? && mycomplogo.present? %> <% elsif mybuyerlogox.present? %> <% elsif mycomplogo.present? %> <% else %> <% end %>
<% catlogid = '' if @CreateCatalog catlogid = @CreateCatalog.id %> Catalogue Name : <%=@CreateCatalog.catlog_name.to_s.upcase%>(<% if @CatlogList && @CatlogList.length >0 %><%=@CatlogList.length%><% else %>0<% end %> Products) <% end %>
<% if @CatlogList && @CatlogList.length >0 %> <% end %>
<% if @CatlogList && @CatlogList.length >0 %> <% end %>
<% if catlogid.to_i >0 %> <% end %>
<% end %> <% if @CatlogList && @CatlogList.length >0 %>
<% end %> <% i = 1 if @CatlogList && @CatlogList.length >0 @CatlogList.each do |product| %> <% gender = "" material = "" currency = '' myunits = '' materialobj=get_basic_information(product.cp_compcode,product.cp_productid) if materialobj material=materialobj.pd_bsc_material productcost = materialobj.pd_bsc_prd_cost currency = materialobj.pd_bsc_currency gender = materialobj.pd_bsc_gender uonjs = get_unit_measurement(product.cp_compcode,materialobj.pd_internal_unit) if uonjs myunits = uonjs.pu_shortname end end %> <% ischeckFlags = true image_url = "../assets/img/course/course1.jpg" prodobjs = get_product_listed(product.cp_compcode,product.cp_productid) if prodobjs productpd_category = prodobjs.pd_category productpd_subcategory = prodobjs.pd_subcategory end %> <% selectimg = '' filepath = "" multiimgobj = get_signle_selected_images(product.cp_compcode,product.cp_productid) if multiimgobj selectimg = multiimgobj.pmi_image filepath = multiimgobj.pmi_filepath end frntmultiimgobj = get_front_signle_selected_images(product.cp_compcode,product.cp_productid) if frntmultiimgobj frntselectimg = frntmultiimgobj.pmi_image frntfilepath = frntmultiimgobj.pmi_filepath end backmultiimgobj = get_back_signle_selected_images(product.cp_compcode,product.cp_productid) if backmultiimgobj backselectimg = backmultiimgobj.pmi_image backfilepath = backmultiimgobj.pmi_filepath end ischeckFlags = true image_url = "#{root_url}assets/img/course/course1.jpg" if selectimg.to_s.present? chekpath = "#{Rails.root}/public/images/product/multi_image/#{filepath}/#{selectimg}" if File.file?(chekpath) ischeckFlags = false image_url = "#{root_url}images/product/multi_image/#{filepath}/#{selectimg}" end end frnt_image_url = "#{root_url}assets/img/course/course1.jpg" if frntselectimg.to_s.present? chekpath = "#{Rails.root}/public/images/product/multi_image/#{frntfilepath}/#{frntselectimg}" if File.file?(chekpath) ischeckFlags = false frnt_image_url = "#{root_url}images/product/multi_image/#{frntfilepath}/#{frntselectimg}" end end back_image_url = "#{root_url}assets/img/course/course1.jpg" if backselectimg.to_s.present? chekpath = "#{Rails.root}/public/images/product/multi_image/#{backfilepath}/#{backselectimg}" if File.file?(chekpath) ischeckFlags = false back_image_url = "#{root_url}images/product/multi_image/#{backfilepath}/#{backselectimg}" end end %> <% i +=1 end else %> <% end %>
S.No Image Product Category Sub-Category Gender Description Action
<%= i %> <%=product.cp_productid%> <%=productpd_category.upcase%> <%=productpd_subcategory.upcase%> <% if gender == 'OTH'%> OTHER <% else %> <%=gender.upcase%> <%end%> <%=material%>
No record(s) found.
<%=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%>