There will be the following new "functions" in the second Alpha Testing Version:
1. When customer press the link "Product Details", we load an override (templates_default/classic/product_info/tpl.main_page.php) which is doing the following in combination with a change in file "pc_configurator_java_script.php" :
A. Disables HEADER, LEFT COLUMN, RIGHT COLUMN and FOOTER
This is happening because we changed the variable "lnk" in
"display_product_details" function in the file
"pc_configurator_java_script.php" ; Added an extension for checking:
"&hide_header_left_right_footer=1".
It was :Now it is :var lnk = "index.php?main_page=product_info&products_id=" + productid"By this way "hide_header_left_right_footer" is being a PHP variablevar lnk = "index.php?main_page=product_info&products_id=" + productid + "&hide_header_left_right_footer=1"
having the value '1'. So we are now sure that the customer pressed
on the "Products Details" link. We do the following check in the file
"tpl.main_page.php"
and this way we disable HEADER, LEFT COLUMN, RIGHT COLUMN$product_info_pc_configurator = $_GET['hide_header_left_right_footer'];
if($product_info_pc_configurator == 1){
$flag_disable_header = true;
$flag_disable_left = true;
$flag_disable_right = true;
$flag_disable_footer = true;
$extra_popup_info_pid = $_GET['products_id'];
include(DIR_WS_PC_CONFIGURATOR . 'pc_configurator_extra_popup_info.php');
?>
<script>alert('<?php echo PC_CONFIGURATOR_PRODUCT_DETAILS_ALERT;?>')</script>
<?php
}
and FOOTER.
B. As you can see above, we also display an alert popup window
and also $_GET products_id and then "include" a brand new file named
"pc_configurator_extra_popup_info.php".
Inside this file, we query the database to find master_categories_id
base on the products_id and then we query again for categories_name.
Now we are going to use categories_name to track extra information
from a configuration key. This extra information can be added for every
product group in admin, and be activated individualy. This way we know
if a popup alert window should open, and what should the content be.
The second section (B) is now under construction.
With a few words, what you read above is :
1. We override the product's info page to disable header, columns and footer
2. We are able to provide extra information, depending on the products
category. For example: Our products provider, did not inform us for an
out of stock product. Lets asume this product is a proccesor. Then we go
to Admin->Configuration->PC Configurator and we set up a small message
to inform the customer for the availability of one, or two or many other
products in this category at once, quick and easy. We also activate this
message. Now when customer press the "Product Details" link he is
presented with this message.
Well, if we know that we will have availability for this product in the next 2-3 days, we do not have to go to update one by one these products. We just inform the customer with an easy way.
But what if customer do not press on the "Product Details" link ? This is an issue.
This made me think to make another override for the page pc_configurator, where when customer goes to this page, then we present the message we want.
Any ideas would be nice.
Bookmarks