Our client would like to be able to give out a preconfigued URL (URL with GET param, similar to affiliate partner URL) to their customers and for customers who visit the catalog through that URL to be able to see only a subset of products in that catalog.
I have noticed it is possible in ICM 7.10 to create affiliate partner and programs which generate specific URLs and it is also possible to define a catalog view which exclude certain products from the catalog for a targeted group of customers or customer segments but it is not possible to exclude products from the catalog for a partner.
Is there some other out-of-the-box platform functionality which would allow our client to assign a certain catalog view based on the URL which customer has used to visit the catalog or do we need to implement a fully customized solution to achieve this?
Yeah, this is not possible with affiliate links.
You'll need to write some custom code, but it might not be that difficult. The usergroups list (customer segments) that the user belongs to are kept in the session object (T_CurrentUserUserGroupKeys). See WebshopPGIDProvider it puts the user by default in the everyone group. You can write a pipeline that puts the customer in a segment by updating this list so that you can then use the segment for the catalog view. Just remember to do this before the pgid is generated.
Related
Is there any way to update woocommerce product inventory with external web based system, such as warehose system? And send json data yo that system? In fact make interaction between them
WooCommerce has inventory management functionality, and a external system use it via the
REST API.
If you look at a specific product, there's an "Inventory" tab. If "Manage stock" is checked, you can, well, manage the stock, ie. manage the stock quantity, allow backorders, receive emails notifications when stock is low.
This can be done manually, or via the create/update Products or Product variations endpoints. Without modification, to make the calls, this requires your external system to know the WooCommerce product & product variation ID's (for my employer, I built a layer on top of the REST API that works with product SKU's, which are know by our external system).
To make actual calls, you'll need to generate a key & secret in WooCommerce, and use that for authentication. The actual calls are GET/PUT/POST/DELETE requests with a JSON body when needed.
For an actual stock amount update, you'd make the following PUT request to /wp-json/wc/v3/products/\<your product's ID\>, with this JSON body:
{
"stock_quantity": "500"
}
My client has two customer types (enterprises and individuals), he wants to propose different prices regarding the customer type. This customer type should be defined when the customer creates its account. I still haven't found a solution to do this automatically : after account creation depending on whether the customer said he is an enterprise or an individual, I want that the right price is automatically selected. Do you have any idea of how to do this without a manual user role given ?
Before registration, is it possible de display both prices so that the enterprise also knows what it will have to pay if it registered ?
That would be awesome if you have any idea of plugins doing this or how to code this.
Thanks a lot
Have a good day !
I believe you are looking for a what will be called a Wholesale User Plugin. There's a handful of them out there that you could look into. It will allow you to set up multiple user roles with different pricing structures.
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.
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/
Does anyone with DotNetNuke have experience with downloadable content with a shopping cart?
There is a client using CatalooK as their shopping cart. They sell user manuals for a range of car models (one car has multiple user manuals in different languages) but did some test and this is we found so far:
If we have all the downloadable manuals users in the ‘All Users’ role will have access to all the downloadable content by anyone
When a user registers (either from the Login page, or through purchasing a product from the cart), a user account is automatically created for them and are assigned the role as ‘Registered Users’. This solves the problem of having all users access to the content – can just change the permission for the downloadable items to only display for 'Registered User' only
However, anyone can register themselves on the website and automatically be assigned a ‘Registered Users’ role, therefore getting access to the manuals without having paid for them
A step further would be to require the manual adding of user accounts to a new role called ‘Downloads’ which would be the only users within the 'Downloads’ role to have access to the downloadable manuals
Problem here is, if a user purchases 1 downloadable item and they are added to the ‘Downloads’ role, they will also be given access to all of the other downloadable manuals – as they are in the same role
So I guess the workable solution would be to create a new role for every car model to allow people in each car model role access to the downloads – which would also mean manually adding the role of every group purchased to that user’s accounts.
Anyone have any experience or alternatives to this to make it more automated and secure?
Basically no body has access to the downloads unless you have purchased the products.
Upon purchasing some shopping carts send you an email with a unique link to the downloadable so they can access it that way. In your situation you also want them to be able to see the documents on the site at anytime after purchasing them, which makes sense.
Catalook has a 'Your Orders' module, does that show you the document or electronic item you purchased? That might be an option.
But worst case, I guess you can implement your 1 role per product. Sounds like a lot of work though! Or, do some custom :]coding.
Based on your situation the cart I use the most DNNspot (mine) - it would be similar to Catalook. Where you would need to create a role per product. Or use the orders module to show your previous orders which would link to your document you bought.
How good is your SQL? You could use the core DNN 'reports module' If you analyze the database and orders table - with a little bit of SQL you could setup a custom Report and maybe solve this.
This is very interesting an challenging. probably, this is not supported by catalook store module by default. If you are looking to implement a new simple module, there are some simple solutions to this.
Using personalization: you can use dnn's personalization provider to store user products. initially empty, and as user purchases the products, you can add comma separated list of productid to maintain it smartly. check that values back to validate downloads
Using custom user profile property and use it in same way as [1] above
Email option suggested by #Ryan is good option when you want to allow users to download manually only via email links. But again, you will still need to validate if a user is allowed to download that product or not that you can achieve via the above suggestions.
Let me know if you need more help with this, I have good experience to deal with catalook specific small modules for such extensions.
Happy coding