Upload pdf one time - How to

  • Posts: 461
  • Thank you received: 36
7 years 2 months ago #277223

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.5
-- PHP version -- : 7.1.8
-- Browser(s) name and version -- : Chrome 60

Hi guys,
I have this scenario: All Registered Users can buy, only one time, a "free" Product where they have to upload a pdf, when the order is confirmed they are added to the "Checked" usergroup forever. So:

0 - I create a Product in my Store setting "RESTRICTIONS AND DIMENSIONS > Access level" to Registered. It will be visible only to Registered group;
1 - I want limit the purchase of the Product only to 1 in all User life, Can Limit product quantity feature be the right solution ?
2 - I don't set prices to the product, so the product is considered as Free;
3 - With Custom fields I create a new "Required" pdf upload "File" item / order field (may be order field would be better because I will find this information on the order details and/or the orders listing on the back end). Please,
- What do you think about item / order ? Which is it better solution in your opinion ?
- What is the difference from FIle and Ajax File ?
- The Custom Fields documentations page seem to be a little bit dated, so I'm confused. Please, How to limit the upload file to pdf, set the max upload file size, and set the directory where to save it ?
4 - Order "Created". How to set only for this Free Product Orders to stop on "Created", and pending the manually "Confirmed" status ?
5 - I can read and check the pdf file, and than confirm the Order. So the order status from "Created" will be "Confirmed" and, as the point 6 will be completed, to "Shipped".
- Wanting assign to a Special User the work to check pdf and confirm order, Please, Do you have any suggestions ?
- How "Custom fields > DISPLAY > Front-end" feature works ?
- Can I create an "Email Order status notification" just for this product when its status is changed from "Created" to "Confirmed" ?
6 - Setting in "Products > CUSTOM FIELDS > Usergroup after purchase to "Checked" group, when the Order is been Confirmed the User will be added to the "Checked" group forever. Order "Shipped".

Many Thanks for support :)

Last edit: 7 years 2 months ago by joomleb.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
7 years 2 months ago #277228

Hi,

1. Yes, it's the limit feature you want to use for that.

3. If you want it on the orders listing in the backend, then it's indeed "order" you need.
Ajax file is nicer than the normal "file" type. It can also handle big files by uploading them bits by bits instead of all at once. But if you need only small PDF files to be uploaded, then it doesn't matter.
You can limit the upload to only PDF files with the "Allowed files" setting of the HikaShop configuration. There, you'll also find the "Upload secure folder" setting where the files will be uploaded.

4. If you don't want free orders to be automatically confirmed, you can deactivate the HikaShop validate free orders plugin via the Joomla plugins manager.

5. You can give a backend access to that user. With the ACL settings of Joomla, you can authorize him to access only HikaShop, and with the "access level" tab of HikaShop, you can give him access to only the order display/edition interface of HikaShop.
The display settings of the custom fields won't help you there.
If you want to create a custom order status notification for that product for a specific status change, it's possible. However, that will require a developer to customize the order status notification email to look at the products of the order and its status in $data->cart in the preload/html versions of the email.

6. Yes, the user group after purchase setting will add that user group to the customer user account after the order is confirmed.

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

  • Posts: 461
  • Thank you received: 36
7 years 2 months ago #277269

Hi Nicolas,
many thanks for answers and suggestions. Just some clarifications, Please:

3 - How to limit the pdf max upload file MB size ?

4 - "If you don't want free orders to be automatically confirmed, you can deactivate the HikaShop validate free orders plugin via the Joomla plugins manager" = This means that all the free orders will need to be manually confirmed, right ?
Practically I need to visualize the pdf file, if is good the purchase process is completed and the User added to the "Checked" usergroup.
May be, Do you have any suggestions to obtain the same result in another way ?

5 - "If you want to create a custom order status notification for that product for a specific status change" = Do you have any suggestions ?:
A - How to assign an Email to a specific product ?
B - Is there a way to duplicate the Email/s as base where make the modifications before to assign it to a specific product ?
C - When an Email is assigned to a specific product it exclude the standard Email notification ?
D - Is there a way to limit (for some products like this one), the purchase process only to 1 product in the cart ? I mean, when a user buy this product, can only buy that product on the store. Cannot add other products to the cart.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
7 years 2 months ago #277314

Hi,

3. The limit comes from your php.ini. So you need to edit it there. You might have to contact your hosting company if you don't have directly access to it.

4. I don't see the problem with that. Once the order is created with the file, you'll get a notification, you'll be able to easily visualize the file with a link in the email and you'll be able edit edit the order with another link in the email, so just check the file and if correct, edit the order and change the status from "created" to "confirmed" and the user group will be added to the user automatically by the hikashop group plugin thanks to the "user group after purchase" setting of the product.
So it will be as streamlined as it can be.

5. All your points here will require custom coding to be added to the email as there are no options for that. The data needed to do these things is available in the email code so it requires some processing there. It's possible but not with options, only with custom coding.
I would recommend contacting a professional if you're not a developer yourself.

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

  • Posts: 461
  • Thank you received: 36
7 years 2 months ago #277330

Hi Nicolas,

3 - I think you mean the "upload_max_filesize" value. Well, it's really something not "usable" beacause:
- some Components need a value really too big for a simple file (like Akeeba Backup require a value of 10M);
- for a jpg we can fix it to 100 KB without any "issue", while to have a pdf document we would have to permit at least 1 MB
Really, a File uploader should have a way to set that each time we use the field, I think is a "must" to prevent misuse of users.
Is it anything complicated to obtain ?
Please, before to move this as "Feature Request", Could you give us all instructions on "where and how" (files and how do you want it) to evaluate it with a developer (always with the think, when it is ready, to give it to HikaShop team) ?!?

4 - Nicolas, any problem with that, only the fact that this means that all the free orders will need to be manually confirmed. The store will have a lot of Free Products, so I'm looking for a way to have a manual confirmation only for that product.
Would be not a good thing a way to disable the "validate free orders plugin" into the Product ? (A product disabling related)

5 - Thanks, I'm going to move this into Feature Requests forum and will take a look with developer and let you update on it :)

Last edit: 7 years 2 months ago by joomleb.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #277336

Hello,

3 - www.hikashop.com/support/documentation/5...ashop-changelog.html
HikaShop 3.0.1

We improved the AJAX upload system in order to better handle the upload of big files on servers with a small max post size PHP setting.

The lib have the feature but the AJAX upload file do not have setting for that.
And the where is "simple", it's the HikaShop field class (for the ajax file custom field) and the HikaShop uploader type (for the uploader system).

4 - You asked :

How to set only for this Free Product Orders to stop on "Created", and pending the manually "Confirmed" status ?

We replied and you wrote :

This means that all the free orders will need to be manually confirmed, right ?

Thing that I don't understand because it's what you originally asked for.

You want to confirmed all free order and not confirmed some free orders in the same time ?
I'm sure that you know that you can't have both since there is no setting for that and that you're request is too specific.

I need to highlight the fact that if you do not indicate at the beginning that information regarding the fact that you have free orders in your website ; for sure we can't give you the appropriate answer since we do not have the knowledge.
So please be very precise and synthetic in your questions.
Otherwise I'm afraid that it could ask for a lot of messages in order to understand what you're asking for and give you the answer that we could give you at the very beginning.

Now we have that new information ; we can tell you that's not possible unless you do some custom development to do that "job" for you.


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: 461
  • Thank you received: 36
7 years 2 months ago #277506

Hi Jerome,
thanks for reply. About:

3 - Please, to add the "upload_max_filesize", Do you think would be better work on "Ajax file" or the normal "file" type ?


4 - I'm used to invest more time writing ordered posts, using few colours and bold letters trying to do that people can understand better and quickly what I mean.
I'm also used to try to improve myself, so I would like to know where I would not explain. On the first post of this thread I worte:

I have this scenario: All Registered Users can buy, only one time, a "free" Product where they have to upload a pdf, when the order is confirmed they are added to the "Checked" usergroup forever.

a "free" Product = Singular

4 - Order "Created". How to set only for this Free Product Orders to stop on "Created", and pending the manually "Confirmed" status ?

only for this Free Product = Singular
...Orders = Plural, each order can be created from users for that Free Product.


Anyway, without any problem, thanking Nicolas, I simply took his suggestion pointing out that in my case it was useless. Before wondering if there was any other suggestion and later asking a technical opinion before to move it on "Feature Request" forum:

4 - Nicolas, any problem with that, only the fact that this means that all the free orders will need to be manually confirmed. The store will have a lot of Free Products, so I'm looking for a way to have a manual confirmation only for that product.
Would be not a good thing a way to disable the "validate free orders plugin" into the Product ? (A product disabling related)

Last edit: 7 years 2 months ago by joomleb.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
7 years 2 months ago #277507

Hi,

3. You'll want to use the normal file upload.

4. That would require customizing the validate free order plugin. And you say that the customers will have only one product in their cart, but HikaShop being a cart system, customers can have several products in the cart some times, even if you try hard for them not to.
So you still need to handle what happens when a customer has that product and other free products in the cart and finish the checkout. Do you want the order to be confirmed or not ? And that will need to be handled in the custom plugin.
Honestly, the capability to be able to have orders confirmed or not automatically based on a per product basis seems really to be a specific user case so that's not something we would like to add by default in HikaShop. So like Jerome pointed at, I would recommend developing a custom plugin (basing yourself off of the validate free orders plugin.
If you need someone to help you with that, you can contact our partners:
www.hikashop.com/home/our-partners.html

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

  • Posts: 461
  • Thank you received: 36
7 years 2 months ago #277612

Hi Nicolas,

3 - Thanks

4 - I know the list :) Thanks, and "you say that the customers will have only one product in their cart, but HikaShop being a cart system, customers can have several products in the cart some time": you are right. This thing can be managed only when we are sure 1 Product per Cart.
So, We are thinking on two possible solutions:

First solution A custom plugin that works on the "Product", )where in this case I can set "Product: "free upload PDF" > Quantity per order: 1" just to avoid a user to "buy" several in the same time) where when product price is not entered it ask us if disable the "validate free orders plugin", rememebring that without a Limit on Cart (with other products in the Cart" the disabling will not run.

Second solution A custom plugin that works on the "Limit" or improve the Limit feature:
I add a "Limit" like: Period: Cart / Type: Quantity / Value: 1 / Product: free upload PDF"
(And maybe in this case adding a second Limit like: Period: Forever / Type: Quantity / Value: 1 / Product: free upload PDF").
Here in the Limit creation, before the Access Level selection for example, we would add the option to disable the "validate free orders plugin"

Please, How "Cart" works ? Selecting the Product:
A - "the quantity of the "free upload PDF" Product in the cart", but I can add other products in the Cart
or B - the total quantity of the Products into the Cart and the Limit will be applied only when the Selected Product is added to the Cart

Please, What is the best way in your opinion ?

Last edit: 7 years 2 months ago by joomleb.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
7 years 2 months ago #277645

Hi,

If you set a limit to be based on the main category of your shop and all its sub categories, with a max quantity of 1, I think that you'll be able to force the customers to have only one product per cart, no matter what they do.
If you want the limit rule to be enforced only on some (one) product(s), you can just modify the limit to not be on all the products, but only a category, or only a specific product. That way, people will be able to add other products to the cart but for that(these) product(s), they'll only be able to add one of it(them) to the cart.

I think that using the limit feature is indeed the simplest to enforce that rule.
However, that still require modifying the validate free order plugin to apply only in some cases based on the content in the cart.

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

  • Posts: 461
  • Thank you received: 36
7 years 2 months ago #277669

nicolas wrote: If you set a limit to be based on the main category of your shop and all its sub categories, with a max quantity of 1, I think that you'll be able to force the customers to have only one product per cart, no matter what they do.

Practically, Do you mean to Assign the Limit to the Category Root, right ?

So, Limit - Cart is working as in my A example. The only way would be to force User to buy 1 item per time in the entire Store (a bad solution).
In my opinion "Cart" should work as in B example: "the total quantity of the Products into the Cart and the Limit will be applied only when the Selected Product is added to the Cart"
Because,:
1 - for each Product we have yet the possibility to set "Quantity per order" and limit maximum quantity to 1 for example, (and at least the same "Quantity per order" limit could be added as feature into Category. Anyway Product by Product is a Category :) ).
2 - with "System > Configuration > Main > Cart: Maximum number of items in the cart" we canyet obtain a Cart "Root" Category limitation
Don't youthink ?

In Limit creation right now, don't having a way to manage separately Cart and Period time like for example:

Cart Type: Quantity
Cart Value: 1

Period: Forever (daily, weekly, monthly etc.)
Type: Quantity
Value: 1

Can I add and apply two Limits ? Like:
Period: Cart - Type: Quantity - Value: 1 - Category: Root (Will force all customers to have only one product per cart)
Period: Forever - Type: Quantity - Value: 1 - Product: "free upload PDF" (Will force all customers to be able to "buy" only one time one Product forever)

I think that using the limit feature is indeed the simplest to enforce that rule.
However, that still require modifying the validate free order plugin to apply only in some cases based on the content in the cart.

Thanks, we put this investigation on our roadmap :) ...

Last edit: 7 years 2 months ago by joomleb.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 2 months ago #277670

Hi,

Yes you can create several limits which will work in the same time in HikaShop.

Note : Thanks to not edit your message a long time after post it, that mess up our work organisation, if you have to edit it do it just after post it or create a new message.
Thank you for your attention.

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.
Last edit: 7 years 2 months ago by Philip.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum