custim (item) image field not visible on front-end

  • Posts: 68
  • Thank you received: 2
10 years 6 months ago #190236

-- HikaShop version -- : latest business
-- Joomla version -- : latest
-- PHP version -- : 5.3
-- Browser(s) name and version -- : safari
-- Error-message(debug-mod must be tuned on) -- : na

Hi,

When I add a custom image field (item) it is not visible on front-end (on checkout page). I switched on "front-end" and added category.

I also added a text-field, which is visible as expected.

Do I miss something on the image field usage, is there a path-syntax or something?

Thanks in advance.

Mark

Please Log in or Create an account to join the conversation.

  • Posts: 26265
  • Thank you received: 4044
  • MODERATOR
10 years 6 months ago #190248

Hi,

Please provide a screenshot of your custom field configuration (and also a link to your website, so we can see and understand...)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 2
10 years 6 months ago #190326

Thanks Jerome,

Ik see that the image field is for upload. I do not Need that. I would Like to show an unique product image on checkout page. I like to set imagepath with javascript. Is there a fieldttype for this?

Thanks again.

Mark

Please Log in or Create an account to join the conversation.

  • Posts: 84233
  • Thank you received: 13677
  • MODERATOR
10 years 6 months ago #190332

Hi,

I'm sorry but I don't understand what you're saying.

If you want to add an image of a product during the checkout that's already the case by default as HikaShop will display the main image of the product during the checkout.
If you want to add a field where customers can upload their own image, then an image custom field is the solution as Jerome pointed out.
If you want somthing else, please explain exactly what you want.

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 2
10 years 6 months ago #190463

Hi Nicolas,

I'l clearify:

I've built a product-configurator. This configurator creates unique products. The product-image should be unique also.
I've managed to create the unique productimages and save them on disk. Each image-fle has a unique ID as name.
I've created a custom field (image_name) in item-table which contains the unique image-name.

The only thing i need to do is to show this unique image as the product-image (thumb) on the checkout-page.

See my screen print of the checkout page which contains the image_name field which should be used to show this image.

Can you advice me which steps to take?

Thanks again.

Mark

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 84233
  • Thank you received: 13677
  • MODERATOR
10 years 6 months ago #190469

Hi,

In that case, you want to edit the file "cart" of the view "checkout" via the menu Display>Views and change the code:

<?php
												$image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
												$img = $this->image->getThumbnail(@$image->file_path, array('width' => $width, 'height' => $height), $image_options);
												if($img->success) {
													echo '<img class="hikashop_product_checkout_cart_image" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->url.'"/>';
												}
												?>
to something like that:
<img src="http://mywebsite.com/my_custom_images_folder/<?php echo $row->image_name; ?>" height="50px"/>
This supposes that your images are in the folder my_custom_images_folder of your website and that the filename of the image is in the custom item field with the column name image_name and that you want to display the image with a height of 50px.

The following user(s) said Thank You: squareweb

Please Log in or Create an account to join the conversation.

  • Posts: 68
  • Thank you received: 2
10 years 6 months ago #190550

Super!!!

This works indeed Nicolas.

Thanks a zillion.

Mark

Please Log in or Create an account to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum