Originally Posted by noahmarket
Originally Posted by balihr
Originally Posted by noahmarket
Originally Posted by balihr
balihr and I Were talking about responsive issues with a template and shopping cart
Originally Posted by noahmarket
Originally Posted by balihr
Originally Posted by noahmarket
Originally Posted by balihr
balihr and I Were talking about responsive issues with a template and shopping cart
Okay.. So I've got this installed.. I added an Awesome Font cart glyph in front of the header cart totals this mods generates. I even got the header totals to appear in place of the normal header cart totals so that if I turn this module off, the default header totals/icons appear..
Here's what I am having issues with...
The formatting of the header totals.. Specifically I cannot seem to figure out what I need to do to get the totals to appear WHERE they should in the header.. Currently, they sit to the left of my header links.. I am using the Westminster-New template.
Here's all the changes I made:
includes/templates/MY_TEMPLATE/common/tpl_header.php
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_zx_ajax_shopping_cart.phpCode:<li> <!-- BOF ZX AJAX Add to Cart --> <?php // BOF AJAX Cart if (ZX_AJAX_CART_STATUS == 'true') { echo '<div id="carttopcontainer"></div>'; require(DIR_WS_MODULES. 'sideboxes/'.$template_dir. '/zx_ajax_shopping_cart.php'); } else { echo '<a href="'. zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') .'"><i class="fa fa-shopping-cart"></i> '. $_SESSION['cart']->count_contents() .' - '. $currencies->format($_SESSION['cart']->show_total()) .'</a> | '; } // EOF AJAX Cart ?> <!-- EOF ZX AJAX Add to Cart --> </li>
add_prod.phpCode:$content .= '<a href="'. zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') .'" onClick="ajax_cart(); return false"><i class="fa fa-shopping-cart"></i> '. $_SESSION['cart']->count_contents() .' - '. $currencies->format($_SESSION['cart']->show_total()) .'</a></div> | ';
add_to_cart.phpCode:$cart_top = '<a href="'. zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') .'" onClick="ajax_cart(); return false"><i class="fa fa-shopping-cart"></i> '. $_SESSION['cart']->count_contents() .' - '. $currencies->format($_SESSION['cart']->show_total()) .'</a>';
Finally link to dev site: http://clientscrappin(dot)divawebdzg...r-p-13207.htmlCode:$content .= '<a href="'. zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') .'" onClick="ajax_cart(); return false"><i class="fa fa-shopping-cart"></i> '. $_SESSION['cart']->count_contents() .' - '. $currencies->format($_SESSION['cart']->show_total()) .'</a>';
What do I need to modify to get the cart totals to site between the "Login" and "Checkout" links??
Last edited by DivaVocals; 19 Jan 2015 at 11:56 AM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
It has position:absolute so you need to edit stylesheet_ajax_cart.css at line 4. Change left:0 to right:10%
If that's what you're asking :)
Last edited by DivaVocals; 19 Jan 2015 at 12:40 PM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Hehe, and where is it that it should appear? :) All the way to the left, basically above the popup? I'm confused, not sure what exactly you're trying to do. Give this blind man a hint with some photoshop...
If you visit the dev site: http://clientscrappin(dot)divawebdzg...r-p-13207.html
Look in the upper right hand side of the site..
You will see the cart totals (which come from this mod), the "Login" link, and the "Checkout link..
See the pipes "|" character between the "Login" link, and the "Checkout links?? The cart totals should go THERE..
I attached a screenprint.. but if you go to the dev site you can see this there too..
![]()
Last edited by DivaVocals; 19 Jan 2015 at 12:50 PM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Ah! Why didn't you say so in the first place?
Here's an idea, although I haven't tested. I would go for the templates tpl_header.php and insert a new <li> on line 70 (don't forget to close and re-open the if($_SESSION['customer_id']). Make that <li id=" carttopcontainer"> instead of adding that div with the same id. I think it should do the trick...
Welll not for nothing I kinda did..
Okay.. well this didn't change the position of the cart totals.. they still sit to the left of the rest of the header links.. BUT this was a better way to code this conditional statement.. Here's what my templates tpl_header.php code looks like now:
Please note that the first line:Code:<?php //if ($_SESSION['cart']->count_contents() != 0) { ?> <!-- BOF ZX AJAX Add to Cart --> <?php // BOF AJAX Cart if (ZX_AJAX_CART_STATUS == 'true') { echo '<li id=" carttopcontainer">'; require(DIR_WS_MODULES. 'sideboxes/'.$template_dir. '/zx_ajax_shopping_cart.php'); } else { echo '<li>'; echo '<a href="'. zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') .'"><i class="fa fa-shopping-cart"></i> '. $_SESSION['cart']->count_contents() .' - '. $currencies->format($_SESSION['cart']->show_total()) .'</a> | '; } // EOF AJAX Cart ?> <!-- EOF ZX AJAX Add to Cart --> </li> <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li> <?php //}?>
and last line:Code:<?php //if ($_SESSION['cart']->count_contents() != 0) { ?>
includes double slashes (//). This means the cart totals will show regardless as to whether the cart is empty or not.Code:<?php //}?>
I'm pretty sure that this is a CSS change at this point.. I cannot figure out the right CSS changes needed to get this part of the menu to sit where I need it to..
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
FYI.. I rolled back my includes/templates/MY_TEMPLATE/common/tpl_header.php mods to what I originally posted..
Turns out that the ID "carttopcontainer" needs to be in it's own div container for the menu popup to work correctly..Code:<li> <!-- BOF ZX AJAX Add to Cart --> <?php // BOF AJAX Cart if (ZX_AJAX_CART_STATUS == 'true') { echo '<div id="carttopcontainer"></div>'; require(DIR_WS_MODULES. 'sideboxes/'.$template_dir. '/zx_ajax_shopping_cart.php'); } else { echo '<a href="'. zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') .'"><i class="fa fa-shopping-cart"></i> '. $_SESSION['cart']->count_contents() .' - '. $currencies->format($_SESSION['cart']->show_total()) .'</a> | '; } // EOF AJAX Cart ?> <!-- EOF ZX AJAX Add to Cart --> </li>
I am noticing that there are some anomalies with how this menu behaves when it comes to out of stock products.. Discovered this when testing the mobile views since I turn off the menu on mobile devices.. I need to do more testing and will report back my findings in full.. It appears to not be firing off some of the messages that I would see in the default cart behavior..
Last edited by DivaVocals; 20 Jan 2015 at 02:45 PM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Hi Diva,
I'm using this mod on a test site with the Westminster new template, and it seems to be working fine in normal, mobile and tablet view, if you wanted to see the file changes I made I can post them?
What problems were you having with it though, as I'm worried there may be other problems I have overlooked and I don't want to put it on my live site until I'm sure.
Thanks