Attachserial Display picture for a purchased item

  • Posts: 79
  • Thank you received: 0
  • Hikashop Business
9 years 2 hours ago #199808

-- url of the page with the problem -- : www.bapteme.air.tousenvol.com
-- HikaShop version -- : 2.4.0
-- HikaSerial version -- : 1.9.1
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.6

Hello

I would like to add a custom image on a generated Gift card depending on an option item has been ordered or not.

Actually, if the customer has purchased an item, i would like to display an extra image on the gift card he will receive by email.

In 'Attach serial ' Hikaserial plugin i set a field as follow :



But i actually do not understand where " 0.image.1 " points to.
When i set the field 'option produit / num " as "0.image.1" it displays a picture on the gift card when the option item has been bought, but the picture is not the one i expected. ( at the moment it shows a different category picture )

How could i find out what to set in "x.image.x" in order to add the proper picture for my optionnal item ?

Many thanks,

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #199832

Hi,

You're using "Option produit" which indicate that the requested format is "num.name".
So "0" is the number which select the option in the list of the product options (in that case, it's the first one because we are using an array with start with 0).
The "0" will give you a product item ; like if you were using the type "Product..."

"image.1" is the name ; it indicate that you want to display an image and you want to select the second image of the element (same thing, it's an array with start with 0).

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: 79
  • Thank you received: 0
  • Hikashop Business
8 years 11 months ago #200011

I can't get the expected image displayed when an option has been bought by a customer.

I still do not see well how X.imageY works ...
Is the first number 'X' represents the product row line in the products list ?

In my Hikashop product list the option I want to display the image is in row number 3 if we start counting from 0

Can you provide me an example to understand how it works ?
This is not clear for me.

Many thanks,

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200024

Hi,

The X is to select the product option ; but the product options are not displayed in the product listing like other products, they are displayed with the product they are attached (you need to have the setting to link the product option with his parent product).

I can't give you a sample without any context ; without knowing your configuration or otherwise the sample will mean nothing more than no sense content.

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: 79
  • Thank you received: 0
  • Hikashop Business
8 years 11 months ago #200095

In my project, i have several products in a parent category.
I've created a separed category for and add the optionnal product into it.



Then, i've assigned the option, here it is a "video film" that customer choose or not with a flight tour.
Here is a capture of "20 minutes flight tour" product .
The option has been assigned to it.

A this stage i do not see what "X and "Y" could be.
Many thanks

Attachments:
Last edit: 8 years 11 months ago by lcoulon.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200100

Hi,

You just have one option, so the best will be to use

0.image
in order to display the main product image of the "video de votre vol filmé en HD"

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: 846
  • Thank you received: 92
8 years 11 months ago #200104

I read this post and find the question usefull. I think thinking Gift is the same as thinking attach Serial so speak on attach serial rather to Gift but i think the answer ll be the same .

1) When we buy a product attach to a attach serial we can see in the "ticket" information relative to product ( product1) like the image ( product1a image) attach to a product ( product1) . Can we see in ticket for product1 the image2a of a product2 when product2 is an option product of product1 ? See the capture screen here for understand. I think no since for attach serial we need a attach a serial to a product and product 2 don't have a serial . Does the product2a image of product2 can be use in ticket of product1 ticket near product1a image ?

2) I think gift card generate "ticket" base on category and can be think like a attach serial ? I think we need to create for all categories a product that have the name of categories like for example :
category
----title = bapteme de l aire de 20 minutes
product2
----title = bapteme de l aire de 20 minutes
----category = bapteme de l aire de 20 minutes
product1
---title= product1
---option = product2
---serial = oui actif
I need to study it before be affirmative and rewrite my question related to the original question gift card .



Here the look of the ticket for fly with the one selected option call film






3) attachserial parameters for option product .
@hksteam :
with the context / data ( product 1 product2) shown in the previous captures screens can you give the value for the input field relative to option to be able to view image product2a in the ticket ?

@hksteam
Does 0 is the reference to the the first item of options of product1 => product2 ?

@hksteam :
if i choose for format image , Since my data is already an image , can i define the type of my image ? what is the use of the empty field under the selected field image ?
which value is accepted : mime => image/png ? or only extension file png ?







@lcoulon I hope i understand what you want achieve and don't write wrong thing !! ?
Regard's

Attachments:
Last edit: 8 years 11 months ago by lionel75.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200106

Hi,

It's a good thing you want to help but for my brain ; there is too much and I just can't.

A "product option" is a product ; so the fields are coming from the "product" table.
An "order product option" is an item ; so the fields are coming from the table "order_product".

If you want to get the image ; you have to read that info from the "product", not the "item".
And the way to read the image from a product is to use the tag "image".

I got nothing more to say that I already did.

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: 79
  • Thank you received: 0
  • Hikashop Business
8 years 11 months ago #200129

I think i got it.

Because i have only one option set in my products, then X becomes 0.

If i'm not wrong :
image.0 would be the first image assigned for that option.
image.1 would be the second image.

I get expected result if i set in attachserial pluging 0.image.0
but the first image is not the one i want to use, in my case i would like to display the second one :



However, if i set 0.image.1, then the result displayed is outstanding.
Instead of displaying the second image ( small camera picture seen above ) there is a totaly different image displayed ( that comes from another category image )

Did i miss something again ?

Attachments:

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

  • Posts: 846
  • Thank you received: 92
8 years 11 months ago #200146

i configure attach serial with 0.image ( see whole capture screen )
i try to buy product1 and option item product2 .
when i read the confirmed mail with the attachment i have this !!
I have in the email 2 attachments ( product1 ticket and product 2 ticket )
Why product2 image is not in product1 ticket image ?


1) atache serial configuration for product 1
product2 is selected when buy product1
product2 is an option attach to product1



2) mail with attachment after buy has been confirmed ( 2 tickets instead one !!)


Regard's

Attachments:
Last edit: 8 years 11 months ago by lionel75.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200153

Hi,

@lcoulon

Regarding the code of the plugin "attach serial", it load the images for the product option and if the product is a variant, it will also load the images of the parent product.
The order of the images should place the variant images before his parent images but I don't see why it could load images from a totally different thing because there is a filter on the "file_type" to only load product images.

@lionel75

More I read you, less I understand.

The result you got is totally logical regarding your configuration. The coordinates of the second images are where it is shown.
And the second ticket you got is because your product option also provide a serial for the order and the plugin "attach serial" is made to generate one image per serial.
So I do not see any issue.

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: 846
  • Thank you received: 92
8 years 11 months ago #200197

@jerome : the position is not my problem but rather how many attachserial (= ticket ) is generate . I really think i don't understand hikashop logic for attach serial . My logic is even if product 2 has attach serial define ( plugin ) and set in product area( attahc serial ), if i select product2 alone directly in FrontEnd ( not as an product option ) serial should work . If i select product2 in frontend as an option of product1 then product2 serial don't have to play a role in ticket for product1 since it ll be the attach serial for product1 that ll manage the product2 image on the ticket create for product1 . But it seem i totally wrong . This question and post are great to learn more ....

In a way if e-commerce web site want that a product can be use alone OR with option/attachserial , then we must create two instance of product ( call them product2 and product 3 ) even if the both are the same product . From icoulon demo site i could buy a fly alone and then wanted to be film ( receive a ticket fly and then buy a film ticket) or buy at once fly and film as an option ( one ticket with the same image ) . I test and it is ok , i learn a lot .. HKS is a really great ... i hope icoulon ll understand how hks work ( no issu only mis understood of how it work ) !!





Regard's

Attachments:
Last edit: 8 years 11 months ago by lionel75.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200198

Hi,

The goal of the plugin is to generate one image per serial (for specific packs).

The configuration system is highly flexible and it allow you to retrieve various information about the "product" attached to the serial.
But you can also access to the options of the product, to the prices, the entries, the order, the user, the addresses of the users, the serial itself...

The logic is for sure different than the logical in HikaShop.
It could looks weird but I can assure you it is pure logic. The base is the serial and you can grab a lot of information around it.

If you want to perform other tasks ; I will more recommend you to duplicate the plugin in order to have your own plugin with your custom rules.

Regarding your configuration.
"Product1" have a serial - so the plugin will generate a image.
"Product2" also have a serial ; in the same pack of "Product1" - so the plugin will also generate an image for that serial.

The "Product option" with the data "0.image" right display the image at the coordinates "X: 100 / Y: 55".
If you want to display the product option image at the right of the main product image ; you should use different coordinates like "X: 220 / Y: 180"

If you don't want two images, you should not assign a pack with the "Product2" or you should assign a pack which will not generate an image with your "attach serial" configuration.

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.
The following user(s) said Thank You: lionel75

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

  • Posts: 846
  • Thank you received: 92
8 years 11 months ago #200218

Hi
For test this post ; best is to use check/bank transfert payment to not have to configure or register to a bank service account like paylpal service or others see here .


For place data ( image text) on a ticket see here .


for hikaserial see official documentation

for attachment serial see official documentation

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200219

Hi,

For tests ; I still recommend to use the product download file.
The "attach serial" configuration give you the text that you should use for a product file.
Thanks to that, you can perform a test order and in the backend, change the order status and use the files to see dynamically the content of the image. You just have to download it through the backend and refresh it as many time you need to.

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: 5
  • Thank you received: 0
8 years 7 months ago #213415

This is what I get as an emasil after purchasing an item from my cart.

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 7 months ago #213416

Hi,

I don't see any link with the current thread.
Please open a new one for your issue.

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.

Moderators: Obsidev
Time to create page: 0.129 seconds
Powered by Kunena Forum