Print online page with hika
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
-- HikaShop version -- : 2.3.1
Hi,
I need help with the following issues:
I need to have a page with the following format:
I need to have a dropdown in which all subacategories in one category are displayed.
I need to have another dropdown in which all products from the subcategories selected in first drop down will be visible.
And also I need a drop down in which different sizes for the selected product will be displayed.
What I also need is an image upload module which will be submited next to all data above to shop cart.
My client needs to have an online print module in the application.
Can you help me please ?
Thnaks.
--Flaviu
Please Log in or Create an account to join the conversation.
I am sorry but I don't understand what your are trying to achieve.
Can you please use an image in order to illustrate your request ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
The image in the attachment describes more accurate what I'm trying to obtain.
Regards,
--Flaviu
Please Log in or Create an account to join the conversation.
This will require a heavy customization. I would recommend to contact our partners and request a quote for that and/or post a message on our commercial jobs forum in order to find a developer who could work on that for you.
www.hikashop.com/home/our-partners.html
www.hikashop.com/forum/9-commercial-jobs.html
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
Can you give me at least a reference from where to start ?
My time is kind of limited and I need to solve this ASAP.
Many Thanks,
--Flaviu
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
Your message arrived after I've posted the last comment in this topic.
I have experince in web development so I'm thinking maybe you could give me some hints. Although I have a question on my mind: Will hika's updates affect this implementation ?
Thanks again,
--Flaviu
Please Log in or Create an account to join the conversation.
As the screenshot you gave is quite particular, I guess that the best would start with your own page where you would display these elements (dropdowns, image, button) and when you submit the data, it would add the corresponding products and custom field data to the cart and redirect to the checkout.
For the dropdowns, you would run some MySQL queries on the hikashop_product, hikashop_category and hikashop_product_category tables in order to be able to select what you want in them.
And for the add to cart, here is a link with some code explaining how to do in your own code:
www.hikashop.com/forum/2-general-talk-ab...ct-fields.html#19870
The code would be on your own page on your website. It could be done with a blank component/module, or a form extension allowing custom PHP code in the form. So HikaShop updates won't affect it.
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
I have already started following this approach. It is good for me to know that I've chosen a way to go through the implementation that is validated by you guys. My implemntation goes in entry form which is accsesible through hika->display->views. Does this file go along with hika updates?
Thanks a lot.
Flaviu
Please Log in or Create an account to join the conversation.
If you edit views via the menu Display > Views, so when updating you will keep your changes.
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
Thanks all again for your promptitude.
--Flaviu
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
I've been researching for some time and can't get to an implementation.
First I took to the link that Hika offers when you're editing a product(shown in the product editing phase under hika management interface under joomla back-end). This link works only for one product. So if I want to print an image on the same product, after the first one has been sent to cart, first product will be replaced in the shop cart.
Second I've tried to go with the default method, which hika uses for entering product in the shop cart. I went(by code I am talking here) in the components/com-hikashop/controllers/product.php calling updatecart function. I saw that I can implement a custom field for my custom image but in this moment I do not have a clue how to display this image next to my order(product) in the shop cart(checkout). I've made a research on the database and I saw the custom field added to the item table with reference to user and all other necessary data. I need to add this photo in this custom field when I clik add to cart buttom. At what I'm also looking forward is how to send an email when finish the checkout steps. I need to send an email to the sales department which will handle this print online order(s).
P.S: I'll be updating this topic with my solution(s) also, as soon as I get the heat off of me, in order to give solutions to other colleagues of ours.
Best regards,
--Flaviu.
Please Log in or Create an account to join the conversation.
1. Suppose that you enter in the custom item field the URL of the custom image that you created: mywebsite.com/mycustomimages/custom_18.jpg
And suppose that the column name of the custom item field is "custom_image".
Then, you can edit the file "cart" of the view "checkout" via the menu Display>Views and add such code:
<img src="<?php echo $row->custom_image; ?>" />
somewhere after the line:
<tr class="row<?php echo $k; ?>">
Similar code change are possible in the invoice or the order details page views, the emails, etc.
2. The link I gave earlier www.hikashop.com/forum/2-general-talk-ab...ct-fields.html#19870 explains how to add a custom item field value to the product in the cart via the add to cart HTML link. So just follow my explanations there and you should be able to add the URL of your custom image easily.
3. Regarding the email sending, it really depends what you want.
At first, you talked about sending the email when pressing the add to cart button (so before the checkout).
Now, you're talking about sending the email at the end of the checkout steps (so before being redirected to the payment gateway).
But is that what you really want ?
Don't you want to send the email after the payment notification when the order is confirmed ?
Suppose that it is the last case, you could just edit the email "order status notification" which is sent to the user when the order is confirmed via the menu System>Emails, and add your own call to the mail function in order to send what you want where you want.
An even easier solution would be to just enter the email of your sales department in the "bcc" field of the order status notification email so that they would get a copy of the email which is sent to the customer when the order is confirmed.
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
I'm on the email step now and I can't get custom fields value for the products. I have the product array but the field "is_online_print" is empty all the time. The custom field is in the item table and the value is set as I can see in the database. What I need to do is check for each product on this "flag". If is set to 1 I will add this to a data structure which later will be used for sending a custom email to the sales department. Can you help me with that please ?
Regards,
--Flaviu
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
The custom field "is_online_print" is populated with "1" value in `hikashop_cart_product` for the online print products but in the `hikashop_order_product` table this field is NULL. How can i get this two fields associated in order to get the "1" value in `hikashop_order_product` table, too ?
Maybe on order event !?
Regards,
--Flaviu
Please Log in or Create an account to join the conversation.
The data from the cart_product table is copied to the order_product table during the creation of the order in the function "after_confirm" of the file components/com_hikashop/controllers/checkout.php
So what you're describing shouldn't happen as it is already handled there with the code:
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
I will take a look on that code to see what happens exactly.
Thank you for your time.
Regards,
--Flaviu.
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
I've watched hika's object in checkout file pointed by you. Everithing looks fine...I still don't get the values in order_product table.
Thank you.
--Flaviu
Please Log in or Create an account to join the conversation.
Then, look at the code in the save function of the file administrator/components/com_hikashop/classes/order_product.php
That's where this data is taken and stored in the database.
Please Log in or Create an account to join the conversation.
- flaviu.gaitan
-
Topic Author
- Offline
- PHP.NET
Can you please help me with the following issue ?
I need to display popup after adding the product for online print job.
In a normal product page the popup is displayed after adding a product to cart but in this custom entry page it dosen't.
Thanks,
--Flaviu
Please Log in or Create an account to join the conversation.
In which custom entry page ? How did you create it ? Can you provide a link to it ?
PS: Could you open a new thread when you have a new question ?
Please Log in or Create an account to join the conversation.