View Single Post
  #3  
Old 03-27-2018, 04:26 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Secondary Images for product

Quote:
Originally Posted by vigneshkutty
I google it and find one developer guide, but it not help much for me

This guide is for an older version of X-Cart.

Since the 5.3.3.0 version X-Cart renders the Edit Product page with the help of \XLite\View\FormModel\Product\Info class instead of \XLite\View\Model\Product.
Also, it uses the \XLite\Model\DTO\Product\Info class to transfer the data between the product-related database entities and the view class.

Quote:
Originally Posted by vigneshkutty
i tried below three files but i am not able to create Secondary Images for product
/XLite/Model/Product.php
/XLite/Model/DTO/Product/Info.php
XLite/View/FormModel/Product/Info.php

Yes, these are the classes to decorate from your custom module.
Plus you also need a new model class that will handle the images themselves.

Quote:
Originally Posted by vigneshkutty
Kindly advice me i missing anything or Kindly give me any developer guide for above version

Unfortunately, there is no updated article on adding secondary images in X-Cart v5.3.3.x

I would check how the existing \XLite\View\FormModel\Product\Info and \XLite\Model\DTO\Product\Info classes add the image uploader field and process uploaded images.

Quote:
Originally Posted by vigneshkutty
i find my secondary image will stored in temporary_files table

I guess it is because you didn't create your custom image model class extended from \XLite\Model\Base\Image.

Quote:
Originally Posted by vigneshkutty
Error (code: 0): Class "Doctrine\ORM\UnitOfWork" is not a valid entity or mapped super class

Unfortunately, I can't say what causes this error in your case.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote