Hi,
We are doing a redesign of our website and as part of that process we are designing our checkout experience to be more mobile friendly.
I recently modified our system using an addon to load a different layout based on specific product id's. No, we aren't doing split testing, we just wanted to roll out our new product page design (which required a different layout) to see how Google would receive the changes to our product page on a select number of products.
Previously we have blasted away our entire design for all products and if there is an SEO issue on the page then it can harm our rankings.
Anyway, selecting a different layout was doable via hooks and now I would like to also load a different theme for specific controllers.
We only have a small team and would like to roll out our new checkout. The new checkout belongs to a new theme we are developing. We are not developing the new checkout inside our existing theme because we want to move away from bulky purchased themes and code up something much simpler and customised to our users.
So far I have looked at these "hooks" hoping that by modifying the theme path, that all would be golden. It kinda works, but templates are not loading from the correct location. I can't quite wrap my head around how the theme system works and hoping someone has some more thoughts around how I can achieve this.
Here are the hooks I am currently using:
function fn_my_changes_get_theme_path_pre(&$path, &$area, &$company_id, &$theme_names){ $dispatch_matches = [ 'checkout.checkout', 'index.index' ]; if ($area == "C" && $company_id == 3 && in_array($_REQUEST['dispatch'], $dispatch_matches))$theme_names['c_' . $company_id] = 'bfa'; }
function fn_my_changes_get_theme_path(&$path, &$area, &$dir_design, &$company_id){ $dispatch_matches = [ 'checkout.checkout', 'index.index' ]; if ($area == 'C' && in_array($_REQUEST['dispatch'], $dispatch_matches)){ $path = str_replace("vivashop", "bfa", $path); } }