Skip to main content
With the BestPrice order module, many buyers shop together. The shop advertises a campaign for a product, the buyers reserve quantities, and the more is reserved in total, the cheaper the unit price becomes for everyone. Only at the end of the campaign is an order created from it. The tags with the prefix E-BP_ show this in the template: the status of the campaign, the price tier reached, the buyer’s own reservation and the savings. Guide: BestPrice order module
The interface for the reservation process is located in the include template incl_bestprice.htm. Some of the tags only work there because they refer to the current process. The pure display tags can be used on all templates.

The three steps of a reservation

The buyer goes through three steps. There is a range tag for each one, so all three steps can be in the same file.

What the buyer needs

No reservation is possible without logging in and without stored addresses. Three range tags check this.
Check the login first and then the addresses. Without a login, there is no customer account in which addresses could be stored, and the two address checks are then meaningless.

The status of the campaign

A campaign has a start and an end. Three range tags tell you where it currently stands.
E-BP_Begin and E-BP_End output the two points in time. Both accept an optional format in the parentheses.
The format follows the usual notation with percent signs: %d for the day, %m for the month, %Y for the four-digit year, %H and %M for hour and minute. This option is not described in the previous documentation, but it is available in the module.

The campaign and its product

E-BP_TotalAmount is the key figure of the whole campaign: it adds up all buyers and thus determines the price tier reached. Display it prominently, because it is the reason why someone tells their friends about the campaign.

The price tiers

Each campaign has a set of tiers consisting of minimum quantities and the corresponding unit prices. E-BP_PriceList is the loop over them.
E-BP_PriceList is a pure loop tag. A simple enclosure {E-BP_PriceList} has no effect. You can tell whether there are any tiers at all by the fact that the loop does not run.
The three tags with PriceList in their name only output something inside the loop.

Prices and savings

Every price exists twice: without a suffix in technical format and with the suffix _Format in shop format.
The current unit price is determined as follows: the shop goes through the tiers and takes the highest tier whose minimum quantity has already been reached by the total quantity of all buyers. If no tier is reached, the base price from E-BP_BasicPrice applies. The savings are the difference between the two.
The enclosure of these tags only applies for a value greater than zero. As long as no tier has been reached, there are no savings, and the negative range is the right place for a note that it is still worth recommending the campaign.
For E-BP_CompletePrice, the enclosure currently does not work in the module. Use the tag as a single tag and, if necessary, check via E-BP_Orders whether the buyer has any reservations at all.
E-BP_NewCompletePrice and E-BP_NewCompleteSaving are pure single tags. They belong in the second and third step of the reservation, where the buyer should see how much their total grows with this reservation.

The buyer’s reservations

E-BP_Orders lists all current reservations of the logged-in buyer, across campaigns.
Inside the loop, all campaign and price tags refer to the respective reservation. Outside it, they refer to the campaign currently being displayed. The same tags therefore stand for both, depending on where they are placed.
E-BP_OrderDate outputs the time of the reservation and, like E-BP_Begin, accepts an optional format.

The addresses of the reservation

Two ranges switch to the billing or delivery address of the reservation. Within them, E-BP_Address-… outputs the individual fields.
Supported field names: Company, Salutation, SalutationCode, Title, TitleCode, FirstName, LastName, Street1, Street2, Zip, City, State, Country, CountryISO, PostOfficeBox, PostCenter, Department, Phone, BusinessPhone, MobilePhone, Fax, BusinessFax, E-Mail, DateOfBirth, TaxId and Suffix1 to Suffix10.
E-BP_Address-… only outputs something inside one of the two address ranges. Outside them, there is no defined address it could refer to.
The two address ranges cannot be used as negative ranges. Check beforehand with E-BP_Has-Address or E-BP_Has-Delivery-Address whether an address exists.

Messages

Checking permissions

E-BP_Warranty() encloses content based on the buyer’s permissions. The parentheses contain a comma-separated list of identifiers; the range appears as soon as one of them applies.
This tag is not described in the previous documentation, but it is available in the module. Which identifiers are assigned in your shop depends on the permissions configuration. Check the result before you build on it.

The reservation form

The form with which the buyer makes a reservation must submit the process identifier. It is in E-BP_OrderId.
Without this hidden parameter, the shop cannot tell two submissions of the same form apart. An accidental double click then leads to two reservations. Conversely, the identifier allows you to deliberately reserve the same product several times in the same quantity.

The tags at a glance

  • Guide: BestPrice order module
  • Guide: Login and registration
  • Guide: Address data