Gift Certificates search doesn't work

I am following @QMcKay tutorials for gift certificates, after entered a gift certificate name started by GC20 and entered a balance, when i am searching at the “Gift Certificates” Entity screen i could not found a match for the gift certificate that i have entered before

My Gift Certificates Entity screen :


The created Gift Certficates already appear when iam restarting sambapos :

Purchasing Gift Certificate through a ticket also doesn’t create automatically the Gift Certificate and yet also not searchable nor an entity is created.

Looks like “RU GC Purchased & Printed” doesn’t get called when a customer purchased Gift Certificate through a ticket because there is no file created or updated eventough i have setup “AC GC Add Line to Text File”

My “RU GC Purchased & Printed” :

My “AC GC Create” :

I think the GC number you entered is dummy .are you creating a gc from menu? do you have a product called gift certificate?if so try to add and settle the payment try that way the GC number will create automatically , not sure if you can create a gc from the entity screen as you showed.

gsreddy,

Yes, what i have meant by through a ticket is ordered a Gift Certificate through the Tables, added gift certificate, change price to the amount that i wanted for gift certificate balance, and settled, but still there is no gift certificate entity automatically created, thus making it not searchable as from my understanding “Purchased” GCStatus only available through manual purchasing through settled ticket.

I have re-followed the tutorial dosen of times, but still cannot figuring out on why the gift certificate doesn’t automatically created.

Other question is how to make Gift Certificates manually through the entity screen?

[Edit]
“RU GC Purchased & Printed” never get called because when ordering a gift certificate, it never reaches “Order State Updated” (found out using Rule Debugger), eventough ticket has reached settled.


@QMcKay
What is the correct way ordering a gift certificate?, so “Order State Updated” get called.

You buy a GC as a Product. You don’t create them manually.

@QMcKay
I already did buy it through a ticket and settled but the gift certificate entity still did not get created.

I am on V5.56 if it’s make any differences, from my rule debugging somehow “Order State Updated” doesn’t get called when buying through a ticket.

I just tested GC Pruchase (v5.1.56) and it works fine.

Check this Action and Rule…

If you want to issue a GC without taking payment for it, you can add an automation command button for this and add this Rule…

##GC Manual Create##

Rule Name: GC Manual Create
Event Name: Automation Command Executed
Custom Constraint List:
Execute Rule if: Matches
Automation Command Name Equal GC Manual Create

##Actions:##

GC Update Order State

Constraint: (none)

Current State: Ordered
State: Printed

@QMcKay
Re-Checked “RU GC Update Order States” rule, yes it’s the same as instructed on the tutorial.

Already followed your tutorial on “GC Manual Create” in the original thread but still no gift certificate entity being created :frowning:.

Do you want my database dumps?.

Hey Q - I scanned over that early V4 Tutorial and there is no Primary Key Defined? Is that correct… just saying?
Tutorial back in John’s days.

What does this Rule look like?

Not necessary.

1 Like

@QMcKay
Here we go :

Changing “Menu Item Name” Equals “Gift Certificate” also still doesn’t work :frowning:.

If you added the manual create button, show what happens when you click that button… we should see the Order State change from Ordered to Printed.

When that happens, it should trigger the event for Order State Updated (GC Purchased & Printed), which is where the GC Entity and Account are created…

@QMcKay
It doing nothing, after clicked “GC Create” on the Gift Certificate, the button will disappear after clicked the button :

It looks like the state is being updated properly. But for some reason, the Entity and Account are not being created. Is the Rule not firing?

In the Rule for GC Purchased & Printed, add a Show Message Action to the top of the Rule, and put this in there:

DT:[=Helper.GetUniqueString()] P:[=Order.Price]

@QMcKay
The Show Message Action never get displayed, i have debugged the rules, and it seems somehow it never reaches “Order State Updated”, so “RU GC Purchased & Printed” never get executed :frowning:.

Need to find the reason that Rule does not fire. Either the State Name (Certificate) does not match, or the State (Printed) does not match. It needs to match both for the Rule to fire.

Show your Action for GC Update Order State.

@QMcKay
Exactly, Here is it :

:stumped:

Something is stuck. You might need to recreate the Rule from scratch (not cloned).

Try creating a new Rule containing only the Show message action, and set up the same constraints as this:

1 Like

@QMcKay
Doh :scream:, After re-created the rules and found out there is a blank space both in-front “State Name” Equal and “State” Equal, sorry for the false alarm!. Really thanks for spending your valuable time debugging it :joy:.

Is there anyway to create gift certificate through the entity screen?