Is there a way to obfuscate Wordpress file download URLs - wordpress

Im using ACF to associate a custom file field to WooCommerce on my site. That field will receive the customers invoice PDF once the order is completed. My problem is the files have a sequence numbering, which is helpful to keep so I can quickly identify them in the admin interface, but I don't want my customers to able to guess the numbering and easily open other invoices.
Is there any way to add a small obfuscation so that the URLs don't show any sequence any obvious sequence pattern?

Related

How to attach user comments to order as PDF

In my WooCommerce website, users can enter comments - such as a gift message. I then integrate with a 3rd party warehouse software called MintSoft. My warehouse have told me the only way they can include gift messages is if I attach the message as a printable PDF/DOCX file to the order. I assume if I attach a file to the order in WooCommerce, that will feed down to MintSoft.
So my question is, how can - upon order execution - I generate a PDF/DOCX file based on a 6x4 inch template, populating it with the user comments field from the WooCommerce order, then attach that generated file to the order in WooCommerce?
I have searched for a plugin that does this, but no luck.

How to add a membership cards to my website that can member downloaded

I have a website with Wordpress and I want to add members cards that they can fill their information and can download it from the website, but not sure how to do it I look for a plugin but I did not find.
also, I have 2 data on my website 'Event and Users' could I add them in one excel sheet or no?
I tried to look for a plugin
you need to separate your questions and add more information about your problem.
I'll try to help you:
** members cards **
You can use a form plugin to let the user fill the data (for example: name, surname, birth date, ecc..) that you need to print in the card. I suggest you to use this: https://formidableforms.com
the difficult way: you can intercept the form submission with formidable specific function "https://formidableforms.com/knowledgebase/frm_after_create_entry/" and with the collected data you can create image in the fly with php and imagemagik (or GD or other) https://www.php.net/manual/en/book.imagick.php. This part need that you have a little bit of experience in development. Check next point for a much simpler alternatives
the simple way: With formidable you can create a post (or better custom post) with the collected data without working on code:
https://formidableforms.com/knowledgebase/create-posts/ then you can redirect user to that page.
Invite the user to print that page and setup a specific css for print: https://benfrain.com/create-print-styles-using-css3-media-queries/

Track user's action

In our company I have to extend the functionality of existing Drupal 7 website. Here are the requirements:
The business needs to inform all staff members, on different topics using uploaded to the Drupal site documents. (I already implemented this requirement.)
The business needs to know, which staff members have read a document and which still have not.
They need a report like this:
Document 1 25/50 (25 from 50 staff members still didn't read the file)
Document 2 50/50 (all staff members did read the file), etc.
In order to fulfill the second business requirement, I need a module which can track specific user's activity (in my case click on a link to download a file, which means the file is read). The module(s) have to be able to create a report like the one above.
(All staff members have a drupal account with a specific role.)
Is there any drupal module I can use or maybe a part of it. Or the requirements are too 'custom' and I have to create my own module.
I created almost exactly the feature you need. I would be glad to help you in the process.
I developed indeed a full custom module. And I could tell you that you will need different things:
A custom table in your DB to store the data
A custom entity called "track" or "action" that will be stored in the DB
Implementing the right hooks to create a track when you want to keep a track of a user's action
A custom page or block to display the tracks you stored in your DB with a custom query and appropriated permissions
To achieve all that, I suggest you to take a look at these pieces of documentation:
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_schema/7
https://www.drupal.org/node/878784
https://api.drupal.org/api/drupal/includes!module.inc/group/hooks/7
https://www.drupal.org/node/1343708
http://befused.com/drupal/page-programatically
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_permission/7
Hope it will help.

Is an custom field accesible via URL/Search query etc.?

I'm going to set up a web shop that sells domain names.
Every domain is a single post, and every post contains about 10 custom fields.
My question is, are these custom fields accessible if I don't query them?
For example, you go to a single post (a domain overview in my case) and can you retrieve the values of my custom fields? Otherwise people can retrieve the code, without paying for it. Are those custom fields accessible if I don't query them, or not all of them?
Is it safe to keep the code's where you pay for in a custom field?
Thanks in advance!
You shouldn't be able to, but there's always the possibility of security holes in WP, or even something as simple as a brute force attack on the WP Admin area or your MySQL database.
I would err on the side of caution and keep any critical data in a separate system. Maybe after someone makes a purchase, you could have them log into a separate system to retrieve their activation codes.
Gumroad might be a decent end-to-end fulfillment system for you. Each of your domains would be a separate Gumroad product, and you could paste the shortlink into WordPress as a custom field. More info: https://gumroad.com/

Combining content types into a single PDF in Drupal 6

So, I'm working on a Drupal 6 project that ultimately replaces a big, complex Excel spreadsheet with a workflow as such:
Customer books an appointment via the Bookings API
Employee goes to customer and does a bunch of measurements
Employee enters measurements into either an uploaded Excel spreadsheet or a web-based form
Website generates a PDF with measurement sheet and the output from the Invoice module
Customer receives an email with link to watermarked version of PDF.
Customer pays online and receives link to unwatermarked PDF.
My questions are:
What is the best way to go about Part 3 (Such that the data can be used by Parts 4-6)? CCK fields and a custom content type?
What is the best way to combine content types (I.e., "Measurements" custom content type with "Invoice" content type) into a single PDF?
Bonus Marks: Any way to auto-populate Invoice module content types?
Any help will be muchly appreciated!
You are actyally trying to sell a product with customisable input (comparable to a t-shirt with a custom print, but instead of using a custom picture, you use custom data).
Here is what I did for a comparable project:
Use ubercart: http://www.ubercart.org/
Use the UC Node Checkout extension, this allows you to link a node to an ubercart product and use the information in the node for your customised product: http://drupal.org/project/uc_node_checkout
Here's an excellent walkthrough for UC Node Checkout: http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart
You can use FileField for uploading the Excel file: http://drupal.org/project/filefield
Make sure you use the Transliteration module: http://drupal.org/project/transliteration
The PECL upload progress is also nice to have
You will also need a csv reader, but haven't tried this yet
Finally, to give a link to the file, you can use the Ubercart selling files mechanism: http://www.ubercart.org/docs/user/3345/selling_files
Bonus:
You can use the Automatic node tite module to autoname a node: http://drupal.org/project/auto_nodetitle
For other fields, you can use the token mechanism: http://drupal.org/project/token
I ended up using:
a. Storm for CRM functionality
b. Simple Payments for Storm Invoice payment
c. Print module for PDF output
d. Calendar (+ Views) for appointment booking (Used internally; stage 1 changed to "employee sets up appointment" in Storm Project)
e. CCK + Flexifield for the measurement sheet content type
f. Custom-written module to pass cost values to Storm and automate tasks between Storm/CCK measurement sheet.
Ubercart really is overkill for simple payment applications. Alas, Simple Payments is pretty poorly supported. If only there was a unified payment API or something...

Resources