Picture of Generic Pricing Script | The Basics | GT_PR_£_Pricing Scripts_001

Generic Pricing Script | The Basics | GT_PR_£_Pricing Scripts_001

In this tutorial, we will take a look at the basics of the Generic Pricing Script. Pricing scripts are versatile tools used to customize and control product pricing. They allow users to define pricing based on various attributes and attribute combinations, providing the flexibility to adapt pricing to specific business needs. Whilst custom pricing scripts can be created for niche scenarios, the Infigo provided Generic Pricing Script can be used for the vast majority of cases.

Tutorial Video Transcript

A transcript of our tutorial video, ensuring you can find exactly what you need, when you need it.

You can search this page to find the relevant time-stamp in the video. Also, this text can be used as part of the tutorial search feature.

00:00:06:08 - 00:00:07:09
This tutorial will

00:00:07:09 - 00:00:10:11
take a look at the basics of the generic
pricing script.

00:00:11:07 - 00:00:13:13
Pricing scripts are versatile tools

00:00:13:13 - 00:00:16:13
utilized to customize and control
product pricing.

00:00:17:00 - 00:00:20:15
They allow users to define pricing
based on various attributes

00:00:20:15 - 00:00:24:13
and attributes combinations,
providing the flexibility to adapt

00:00:24:13 - 00:00:26:23
pricing to specific business needs.

00:00:28:08 - 00:00:32:03
Whilst custom pricing scripts
can be created for niche scenarios,

00:00:32:12 - 00:00:36:04
the Infigo provided generic pricing
script can be used

00:00:36:04 - 00:00:39:22
for the vast majority of cases.

00:00:43:25 - 00:00:47:00
So the first thing we're going to do
is to navigate to or create

00:00:47:00 - 00:00:52:02
a brand new product pricing
scripts are activated on a product basis.

00:00:52:11 - 00:00:55:21
So let's navigate and begin
by just creating a basic product.

00:00:57:11 - 00:01:00:01
So the regular way,
if I just go to product management

00:01:02:00 - 00:01:03:08
now adds a new

00:01:03:08 - 00:01:05:11
sample product.

00:01:10:20 - 00:01:12:05
With that product created, we

00:01:12:05 - 00:01:14:25
next need to go to its product
variant settings

00:01:17:07 - 00:01:19:15
and click on edit
to get to the product variant.

00:01:19:15 - 00:01:20:16
Just as a reminder,

00:01:20:16 - 00:01:24:20
this is where a lot of the technical
elements of the product are defined.

00:01:25:00 - 00:01:28:02
Things such as pricing weights,
dimensional information

00:01:28:26 - 00:01:35:18
and things of that nature.

00:01:35:18 - 00:01:40:02
Actually assigning the generic pricing
script to a product is very, very easy.

00:01:40:16 - 00:01:43:04
So if you start off
just on the information tab,

00:01:44:06 - 00:01:47:23
scroll down a little bit
to find the attach a price script.

00:01:48:14 - 00:01:51:06
And what you'll find in this
dropdown is the generic

00:01:51:06 - 00:01:53:29
pricing script.

00:01:56:29 - 00:01:58:28
Before
you can make any additional changes,

00:01:58:28 - 00:02:01:17
you need to go ahead
and save that product.

00:02:02:10 - 00:02:06:01
And then if you scroll back down to where
we just specify the pricing script,

00:02:06:11 - 00:02:11:02
you'll see there's now
a couple of additional options available.

00:02:13:07 - 00:02:13:19
Now the

00:02:13:19 - 00:02:17:01
generic pricing script
has a default configuration.

00:02:17:11 - 00:02:21:20
So if no additional configuration
is performed inside this box here,

00:02:21:20 - 00:02:25:08
which will come back to you
later, the settings displayed in the blue

00:02:25:08 - 00:02:30:05
box below it will be followed
for this particular product.

00:02:32:22 - 00:02:34:02
We can override all

00:02:34:02 - 00:02:38:23
or part of the generic configuration
within the pricing script

00:02:38:23 - 00:02:42:24
configuration box before taking a look
at this in further detail.

00:02:43:00 - 00:02:47:09
We will address the CSV document
containing all of the pricing information

00:02:47:18 - 00:02:55:23
for this particular product.

00:02:56:11 - 00:03:00:17
So what we have on screen now
is the associated CSV for this particular

00:03:00:17 - 00:03:01:14
product.

00:03:01:25 - 00:03:04:28
In addition to configuring settings
for the pricing script.

00:03:05:07 - 00:03:08:04
All of the pricing options
will need to be detailed

00:03:08:04 - 00:03:10:13
in a partnering CSV document.

00:03:11:16 - 00:03:14:29
This example is about as simple
as these documents can get.

00:03:15:09 - 00:03:19:04
Later, tutorials regarding
pricing scripts will add more complexity

00:03:19:10 - 00:03:20:28
to the pricing structure.

00:03:22:22 - 00:03:24:05
So this sample document we've

00:03:24:05 - 00:03:27:18
got here contains
three rows of three columns, rather.

00:03:28:08 - 00:03:32:04
We've got two columns which are associated
with product attributes

00:03:32:04 - 00:03:34:11
which we will assign to the product
in a moment.

00:03:34:26 - 00:03:37:11
In our case,
these product attributes are very simply

00:03:37:11 - 00:03:40:29
just named as A and B as a reminder.

00:03:40:29 - 00:03:43:14
Product attributes are things
which allow you to define

00:03:44:15 - 00:03:46:22
or select details for a product.

00:03:46:22 - 00:03:50:09
So, for example, if you had a clothing
item, some of your attributes

00:03:50:09 - 00:03:54:05
might be size, color or material.

00:03:55:21 - 00:03:58:21
The third column we've got
is a price column.

00:03:59:09 - 00:04:03:23
So this is actually showing us that
if those two combinations of attributes,

00:04:03:23 - 00:04:07:00
all selected, this is the price
that's going to be associated

00:04:07:00 - 00:04:09:10
with it.

00:04:12:16 - 00:04:13:11
So as we've mentioned,

00:04:13:11 - 00:04:16:09
each row details
a different pricing scenario.

00:04:16:25 - 00:04:22:20
In this simple example will detail ten
scenarios where pricing will be returned.

00:04:23:10 - 00:04:26:04
If any selection sits outside of this
scope.

00:04:26:26 - 00:04:30:01
A default value of £10,000

00:04:30:10 - 00:04:33:23
or your selected currency
will be displayed instead.

00:04:34:02 - 00:04:35:16
Just to make it really clear

00:04:35:16 - 00:04:39:05
that there's been a problem
somewhere with the selection.

00:04:42:23 - 00:04:44:21
So in order to utilize this information,

00:04:44:21 - 00:04:48:13
we need to save it as a comma
delimited CSV document.

00:04:49:04 - 00:04:52:15
So if I just go to file
and save as with an excel,

00:04:52:15 - 00:04:53:17
So if I just go to file
and save as with an excel,

00:04:53:17 - 00:05:00:19
I can choose a comma delimited CSV,

00:05:00:19 - 00:05:02:01
give it a name

00:05:06:17 - 00:05:08:25
and save it.

00:05:12:09 - 00:05:14:28
Now returning to Infigo,
what we need to do next

00:05:14:28 - 00:05:17:21
is to upload this CSV data

00:05:18:05 - 00:05:21:05
to an area
that we call global additional data.

00:05:21:22 - 00:05:24:12
So you can get to this post
by searching within the main menu

00:05:24:12 - 00:05:27:22
just for global additional data.

00:05:31:08 - 00:05:32:26
This area of Infigo acts

00:05:32:26 - 00:05:36:08
as a file storage area
for these CSV documents.

00:05:36:18 - 00:05:39:16
Files can easily be added to this area, or

00:05:39:16 - 00:05:42:21
they could even be split
into subdirectories if required as well,

00:05:43:03 - 00:05:47:13
which again we'll cover in later tutorials
as they have quite specific purposes.

00:05:49:12 - 00:05:51:13
To upload our newly created CSV

00:05:51:13 - 00:05:55:13
I'm just going to click on the upload file
or drag and drop the file

00:05:55:13 - 00:05:57:22
into this location.

00:05:58:29 - 00:06:00:00
Once we've uploaded that,

00:06:00:00 - 00:06:03:13
you'll see it's
within this array of available documents.

00:06:05:00 - 00:06:08:19
If we want to actually remember
the name of that particular document,

00:06:08:19 - 00:06:11:12
which we will dig later on,
or if you want to rename it,

00:06:11:24 - 00:06:13:13
just find the Associated entry.

00:06:13:13 - 00:06:17:29
Click on the little gear configuration
settings icon and that will allow you

00:06:17:29 - 00:06:21:11
to rename that particular document.

00:06:24:07 - 00:06:26:19
So we're going to leave this area for now,
and I'm going to navigate

00:06:26:19 - 00:06:30:10
back to our product
that we were just working on.

00:06:31:22 - 00:06:33:09
So what we're going to do now is to begin

00:06:33:09 - 00:06:36:15
configuring the script
for this particular product.

00:06:37:04 - 00:06:42:22
So only segments of code requiring
alteration from the default script

00:06:42:22 - 00:06:47:11
in the blue box need to be addressed
in the script configuration area.

00:06:48:15 - 00:06:51:16
So in our sample,
all we need to do in this case

00:06:51:16 - 00:06:54:19
is to specify
the name of the linked CSV file,

00:06:54:20 - 00:07:00:07
which contains all of the relevant data
for this particular product.

00:07:04:09 - 00:07:06:22
So in order to do this,
we just need to look in the blue box

00:07:06:22 - 00:07:10:02
and copy and paste
the relevant entries from here.

00:07:10:21 - 00:07:14:04
So all we're going to need
is this file path which points directly

00:07:14:04 - 00:07:18:10
towards a certain CSV
uploaded into global additional data.

00:07:19:11 - 00:07:23:01
So I'm going to copy that section of code.

00:07:24:28 - 00:07:27:13
I'll make
sure I input the closing brackets as well.

00:07:27:13 - 00:07:29:20
Just so we've got this finalized

00:07:29:20 - 00:07:33:07
and this is the only line
that we're going to need.

00:07:33:07 - 00:07:35:29
We are going to need to rename the file
that it's pointing at.

00:07:35:29 - 00:07:38:14
So we're going to need to make sure
that this is the file

00:07:39:00 - 00:07:42:04
or the name of the file
that we've just uploaded.

00:07:42:12 - 00:07:48:09
So I'm going to go and locate that.

00:07:48:09 - 00:07:51:27
You want to include the file extension

00:07:52:27 - 00:07:53:25
and then just replace

00:07:53:25 - 00:07:57:01
the default file that CSV

00:07:57:01 - 00:07:59:11
with our newly updated on

00:07:59:11 - 00:08:03:10
you get loaded CSV.

00:08:03:12 - 00:08:07:20
Another thing to be careful of here
is that the last line in this code

00:08:07:29 - 00:08:11:19
does not need
the comma at the end of the line.

00:08:12:06 - 00:08:16:18
So as you'll see in the configuration
here, most of these lines or segments

00:08:16:27 - 00:08:20:25
have a comma at the end of them to denote
that it's the end of a line of code.

00:08:21:21 - 00:08:25:05
This is with the exception
of the last line, which does not need one.

00:08:25:26 - 00:08:29:08
So in this case, for example,
if that is the only line that we're going

00:08:29:08 - 00:08:32:04
to need, it's not going to need a comma

00:08:32:12 - 00:08:35:07
at the end of that line of code.

00:08:36:18 - 00:08:40:18
If you do mistakenly put a comma
at the very end on the last line of code,

00:08:40:25 - 00:08:44:05
then please do bear in mind
that your script will not be able to run.

00:08:44:13 - 00:08:49:03
And this is a very common
syntax error that we see.

00:08:50:23 - 00:08:51:04
Okay.

00:08:51:04 - 00:08:55:01
So with that information inputs, let's
go ahead and save that product.

00:08:56:09 - 00:08:59:02
And now I'm just going to go ahead
and view that product page.

00:08:59:02 - 00:09:00:00
So we'll take a look at that.

00:09:00:00 - 00:09:04:18
On the frontend.

00:09:04:18 - 00:09:08:21
And what we can see is that we're initial
being provided with some information

00:09:08:21 - 00:09:11:24
that we might not have additionally
initially have expected.

00:09:12:13 - 00:09:15:07
So this is the well the £10,000

00:09:15:07 - 00:09:18:02
that it's displaying
here is the default price.

00:09:18:11 - 00:09:22:28
If there is an error when utilizing
the pricing script, we'll also presented

00:09:22:28 - 00:09:27:20
with some helpful information into where
the potential problems are occurring.

00:09:28:07 - 00:09:31:24
So in this case, it's
due to the fact that there are no match

00:09:32:02 - 00:09:34:20
between the attributes
specified on the product

00:09:34:20 - 00:09:37:27
for which we haven't currently assigned
any and the attributes

00:09:37:27 - 00:09:41:15
specified within the pricing script. CSV.

00:09:42:06 - 00:09:44:23
So you can see it's
giving us the default price to tell us

00:09:44:23 - 00:09:48:05
as a problem and it's telling us
where it thinks there is a problem

00:09:50:03 - 00:09:51:12
in order to resolve this, we're

00:09:51:12 - 00:09:54:20
going to actually assign
those two attributes to our product.

00:09:55:20 - 00:09:58:08
So still within the product
variance section,

00:09:58:08 - 00:10:00:24
I'm going to go to attributes

00:10:00:24 - 00:10:03:06
and then add my two relevant attributes.

00:10:03:17 - 00:10:06:06
Now I've already created
these attributes in my example.

00:10:07:08 - 00:10:11:05
There are separate resources on the Infigo
Academy for creating attributes.

00:10:11:12 - 00:10:18:05
If you don't already know how to do this,
so my relevant attributes are A

00:10:18:05 - 00:10:32:23
and B.

00:10:36:14 - 00:10:37:29
Now, in our simple example,

00:10:37:29 - 00:10:42:11
we're assuming the product attribute names
and the column headers

00:10:42:11 - 00:10:45:03
within the CSV itself

00:10:46:18 - 00:10:49:02
are identical in the naming convention.

00:10:49:03 - 00:10:51:27
So. AB And then. AB,

00:10:51:27 - 00:10:55:15
this is the easiest way
to utilize the generic pricing script.

00:10:55:15 - 00:10:58:17
We can specify if there is a difference
in the naming convention.

00:10:58:25 - 00:11:03:06
However,
this will be covered in a later tutorial.

00:11:05:05 - 00:11:07:26
So with that saved, I'm going to navigate
back to my product

00:11:07:26 - 00:11:12:10
landing page and refresh it.

00:11:12:10 - 00:11:15:20
And we see we get a slightly different

00:11:15:20 - 00:11:16:09
approach.

00:11:16:09 - 00:11:18:17
Appearing
now we get a slightly different result,

00:11:18:17 - 00:11:22:08
so we're still seeing a result
of 10,000 initially, but that's because

00:11:22:08 - 00:11:27:27
we've not defined any pre-selected values
for these particular attributes.

00:11:28:04 - 00:11:30:18
So it's not able to

00:11:30:18 - 00:11:33:08
draw in a price from that CSV

00:11:33:14 - 00:11:36:17
because we it doesn't know what
attributes, values it's going to choose.

00:11:37:12 - 00:11:39:23
However, if we start selecting values

00:11:39:23 - 00:11:42:28
within those attributes,
you can see that the pricing updates.

00:11:43:09 - 00:11:48:12
So it's looking through that CSV document
for a combination of attributes

00:11:48:13 - 00:11:51:14
A, an attribute B and is drawing back

00:11:51:22 - 00:11:55:15
the appropriate price.

 

Incomplete