- Posts: 68
- Thank you received: 2
custim (item) image field not visible on front-end
11 years 7 months ago #190236
by squareweb
custim (item) image field not visible on front-end was created by squareweb
-- 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
-- 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.
11 years 7 months ago #190248
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic custim (item) image field not visible on front-end
Hi,
Please provide a screenshot of your custom field configuration (and also a link to your website, so we can see and understand...)
Regards,
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.
Please Log in or Create an account to join the conversation.
11 years 7 months ago #190326
by squareweb
Replied by squareweb on topic custim (item) image field not visible on front-end
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
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.
11 years 7 months ago #190332
by nicolas
Replied by nicolas on topic custim (item) image field not visible on front-end
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.
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.
11 years 7 months ago #190463
by squareweb
Replied by squareweb on topic custim (item) image field not visible on front-end
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
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
Please Log in or Create an account to join the conversation.
11 years 7 months ago #190469
by nicolas
Replied by nicolas on topic custim (item) image field not visible on front-end
Hi,
In that case, you want to edit the file "cart" of the view "checkout" via the menu Display>Views and change the code:
to something like that:
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.
In that case, you want to edit the file "cart" of the view "checkout" via the menu Display>Views and change the code:
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.'"/>';
}
?>
Code:
<img src="http://mywebsite.com/my_custom_images_folder/<?php echo $row->image_name; ?>" height="50px"/>
The following user(s) said Thank You: squareweb
Please Log in or Create an account to join the conversation.
11 years 7 months ago #190550
by squareweb
Replied by squareweb on topic custim (item) image field not visible on front-end
Super!!!
This works indeed Nicolas.
Thanks a zillion.
Mark
This works indeed Nicolas.
Thanks a zillion.
Mark
Please Log in or Create an account to join the conversation.
Time to create page: 0.175 seconds