Technical Notes and Troubleshooting
Please note: The contents of this article apply only to licensed versions of the ProductCart software. They do not apply to stores running as a hosted application under a ProductCart Live agreement.
Advanced Settings for the Product Details Page
There are 3 variables at this time that can be configured directly in the source code and not via the Control Panel. All three of them affect the product details page. You can find them at the top of the file pc/app-ViewPrdFuncs.asp
The following is an explanation of what they do.
Hide Unavailable Sub-Products
(1) app_HideNotAvailableItemsDo you want to show or hide options corresponding to unavailable sub-products? Unavailable products are NOT out of stock products and they are NOT inactive products. They ARE sub-products that were not added or were deleted. The variable accepts two values:
- 1 = Option attributes corresponding to unavailable products are not shown
- 0 = They are shown grayed out
The rationale behind this setting is that some customers might wonder why certain options are not shown and this could trigger a customer service request. To avoid such requests, the options are indeed shown, but they cannot be selected.
Display Final Price
(2) app_DisplayFinalPriceThis variable allows you to either display the price differentials compared to the product’s base price, or the final prices. Some stores don’t like having a base price, but would rather define the prices at the sub-product level. In that scenario, the Apparel Product price is 0 and the prices are only entered on the Manage Sub-Products page. This is the scenario in which this variable becomes useful.
The variable accepts two values:
- 0 = The price difference compared to the Apparel Product’s online price is shown (e.g. XXL - Add $5)
- 1 = No price difference is shown, but rather the final prices are shown for each option (e.g. XXL - $49.95)
Display "Waiting" Box
(3) app_DisplayWaitingBoxThis variable allows you to turn on or off a “Waiting Box”. When there are a lot of sub-products (hundreds) the JavaScript might take a few seconds to process a change of selection on the product details page. A dialog box can be shown in that case to inform the customer that the selection is being updated.
- 0 = Turn off the Waiting Box (default)
- 1 = Turn on the Waiting Box. When it’s on, you can then specify the message to show using the app_WaitingMsg variable. For example: app_WaitingMsg=“Please wait…”
Product Options: Database Structure
Question: How are product options organized in the database?
Answer: They are stored as follows:
- Option groups are stored in the OptionGroups table (e.g. “Color”, “Size”, etc.).
- Option attributes are stored in the Options table (e.g. “Blue”, “Red”, “Small”, “Large”, etc.).
The relationship between option groups and attributes is defined in the optGrps table.
The products table contains the ID of the option group(s) assigned to those products, which is used to determine whether the product is using product options or not. The options_optionsGroups table holds details about the relationship between products and options assigned to them.
Apparel Products and Sub-Products: Database Structure
Question: In the ProductCart database, how is the relationship between Apparel products and Sub-products handled?
Answer: Both the parent product and its sub-products are saved to the “products” table. The relationship between N sub-products and their unique parent product is handled by the “pcProd_ParentProd” field in the same table. The field holds the unique ID of the parent product. The value is that of the “idproduct” field for the parent product, in the same table.
If the product is a sub-product, the option groups (e.g. “Color”) and option attributes (e.g. “Red”) assigned to it are stored in the “pcprod_Relationship” field. Let's assume that the field contains the string: 6_9_11:
- 6 = ID of the parent product
- 9 = ID of the first “option group/option attribute” combination (e.g. “color/red”). The id refers to the “idoptoptgrp” field in the “options_optionsGroups” table.
- 11 = ID of the second “option group/option attribute” combination (e.g. “size/large”). Here too, the id refers to the “idoptoptgrp” field in the “options_optionsGroups” table.