Jump to content

hugo_064

Members
  • Content count

    13
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hugo_064

    Pop out. login

    hi Hungryfrank, Thank you for this addon i try to use this modal in other page like "shopping_cart.php" with the "confirm order" 's button. Work fine with this modification in "loginpopout.php" : function listen_injectSiteEnd() { if (!tep_session_is_registered('customer_id')) { $this->siteend .= " <script> $('a[href*=\"login.php\"]').on( \"click\", function(e) { e.preventDefault(); $('#LoginModal').modal('show'); }); $('a[href*=\"checkout_shipping.php\"]').on( \"click\", function(e) { e.preventDefault(); $('#LoginModal').modal('show'); }); </script>"; }else{ $this->siteend .= " <script> $('a[href*=\"login.php\"]').on( \"click\", function(e) { e.preventDefault(); $('#LoginModal').modal('show'); }); </script>"; } Now i'll try to use addon with contact_us.php In contact_us.php After "require('includes/application_top.php');" add if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link('login.php', '', 'SSL')); } and in loginpopout.php after if (!tep_session_is_registered('customer_id')) { $this->siteend .= " <script> $('a[href*=\"login.php\"]').on( \"click\", function(e) { e.preventDefault(); $('#LoginModal').modal('show'); }); add $('a[href*=\"contact_us.php\"]').on( \"click\", function(e) { e.preventDefault(); $('#LoginModal').modal('show'); }); But something wrong because after login back to index page and not to contact_us page. What do you thing about that. Have fun
  2. Ok it's good i found the solution in the standard install 404 Error This is the most common problem and is almost always due to having the path set incorrectly in the .htaccess file. To see if this is the problem, go to your site. If it has a url like http://some_domain.com/, then your shop is located in the root of your account. If it has a url like http://some_domain.com/another_name/, then your shop is located in the "another_name" sub-directory. Using this information, open your .htaccess file and find the line that reads RewriteBase / If your shop is located in the root directory, as determined with the above test, then the above line is correct. But if your shop is located in some other directory, then change the above line to RewriteBase /another_name/ Thank you Jack for your time
  3. Thank you jack for information i turn off the addon and site work fine. url of tomato : "phoenixorg/product_info.php?products_id=5" and real product page After verification the xamp mod_rewrite is enable. i reset seo cache and turn on the addon but same result url : "phoenixorg/tomatoes-p-5.html" white page and error 404 i don't know what to do... thank you
  4. Thank you Jack_mcs i try it on a fresh install Phoenix Edition v1.0.5.0 i follow the "Install instructions for Ultimate SEO into a Phoenix shop" i have a right rewriting url : "phoenixorg/tomatoes-p-5.html" but i have a white page error 404 on products, category and manufacturers my htaccess : # $Id$ # # This is used with Apache WebServers # # For this to work, you must include the parameter 'Options' to # the AllowOverride configuration # # Example: # # <Directory "/usr/local/apache/htdocs"> # AllowOverride Options # </Directory> # # 'All' with also work. (This configuration is in the # apache/conf/httpd.conf file) # The following makes adjustments to the SSL protocol for Internet # Explorer browsers #<IfModule mod_setenvif.c> # <IfDefine SSL> # SetEnvIf User-Agent ".*MSIE.*" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 # </IfDefine> #</IfModule> # If Search Engine Friendly URLs do not work, try enabling the # following Apache configuration parameter # AcceptPathInfo On # Fix certain PHP values # (commented out by default to prevent errors occuring on certain # servers) # php_value session.use_trans_sid 0 <IfModule mod_headers.c> Header unset ETag </IfModule> FileETag None ## EXPIRES CACHING ## ## https://gtmetrix.com/leverage-browser-caching.html ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" ExpiresDefault "access plus 2 days" </IfModule> ## EXPIRES CACHING ## # Begin Ultimate SEO V2.2d Options +FollowSymLinks RewriteEngine On # RewriteBase instructions # Change RewriteBase dependent on how your shop is accessed as below. # http://www.mysite.com = RewriteBase / # http://www.mysite.com/catalog/ = RewriteBase /catalog/ # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/ # Change the following line using the instructions above RewriteBase /phoenixorg/ RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING} # End Ultimate SEO V2.2d Can you tell me if i do something wrong or if i forgot something. Thank you
  5. hi all Does this contribution work with a local xamp server ? Thank you
  6. Hi all, Forget my 3 previous post. i'm back with new code for update and delete products in modal shopping cart. This add-on work only on products without attributes. 1/ create 2 files : 1-A/ ajax_shopping_cart.php <?php require("includes/application_top.php"); $page_content = $oscTemplate->getContent('shopping_cart'); require('includes/languages/' . $language . '/shopping_cart.php'); require('includes/languages/' . $language . '/modules/content/footer/cm_footer_modal_cart.php'); ?> <table class="table" style="margin-bottom: 0;"> <thead> <tr> <th class="d-none d-md-table-cell">&nbsp;</th> <th><?php echo MODULE_CONTENT_SC_EST_PRODUCT_LISTING_HEADING_PRODUCT; ?></th> <th><?php echo MODULE_CONTENT_SC_EST_PRODUCT_LISTING_HEADING_AVAILABILITY; ?></th> <th><?php echo MODULE_CONTENT_SC_EST_PRODUCT_LISTING_HEADING_QUANTITY; ?></th> <th class="text-right"><?php echo MODULE_CONTENT_SC_EST_PRODUCT_LISTING_HEADING_PRICE; ?></th> </tr> </thead> <tbody> <?php if ($cart->count_contents() > 0) { // register country_id for tax if ( isset($_POST['country_id']) ) { $customer_country_id = $_POST['country_id']; tep_session_register('customer_country_id'); $customer_zone_id = isset($_POST['zone_id'])? $_POST['zone_id'] : null; tep_session_register('customer_zone_id'); } $any_out_of_stock = 0; $products = $cart->get_products(); $products_name = NULL; $products_field = NULL; for ($i=0, $n=sizeof($products); $i<$n; $i++) { // Push all attributes information in an array if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { foreach($products[$i]['attributes'] as $option => $value) { $products_field .= tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from products_options popt, products_options_values poval, products_attributes pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name']; $products[$i][$option]['options_values_id'] = $value; $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name']; $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price']; $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix']; } } } for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_name .= '<tr>'; $products_name .= '<td class="d-none d-md-table-cell"><a href="' . tep_href_link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . tep_image('images/' . $products[$i]['image'], htmlspecialchars($products[$i]['name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>'; $products_name .= '<th><a href="' . tep_href_link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a>'; if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { foreach($products[$i]['attributes'] as $option => $value) { $products_name .= '<small><br><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $products_name .= '</th>'; if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= '<td>' . $stock_check . '</td>'; } else { goto in_stock; } } else { in_stock: $products_name .= '<td>' . MODULE_CONTENT_SC_EST_PRODUCT_LISTING_TEXT_IN_STOCK . '</td>'; } $products_name .= '<td><div class="input-group">'; $products_name .= tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width:65px;" min="0" id="qty'.$products[$i]['id'].'" ', 'number'); $products_name .= tep_draw_hidden_field('products_id[]', $products[$i]['id']); $products_name .= '<span class="update" onclick="update('.$products[$i]['id'].')">' . tep_draw_button(MODULE_CONTENT_SC_PRODUCT_LISTING_TEXT_BUTTON_UPDATE, null, NULL, NULL, NULL, 'btn-info') . '</span>'; $products_name .= '<span class="delete" id="'.$products[$i]['id'].'">'.tep_draw_button(MODULE_CONTENT_SC_PRODUCT_LISTING_TEXT_BUTTON_REMOVE, null, NULL, NULL, NULL, 'btn-danger') . '</span>'; $products_name .= '</div></td>'; $products_name .= '<td class="text-right">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</td>'; $products_name .= '</tr>'; } } echo $products_name; ?> </tbody> </table> <?php echo '<p style="text-align: right; padding: 1px;"><strong>'. MODULE_CONTENT_FOOTER_MODAL_CART_TOTAL . $currencies->format($cart->show_total()).'</strong></p>'; ?> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button><?php echo tep_draw_button(MODULE_CONTENT_FOOTER_MODAL_CART_HEADING_TITLE . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link('shopping_cart.php')) . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'fas fa-angle-right', tep_href_link('checkout_shipping.php', '', 'SSL')); ?> </div> <script> function update(data){ var temp="#qty"+data; var Qty=$(temp).val(); var action = "Update"; //Define action variable value Delete $.ajax({ url : "ajax_shopping_cart_action.php", method : "POST", data : {qty:Qty, id:data, action:action}, success : function(data){ $("#ajax_shopping_cart").load("ajax_shopping_cart.php"); } }) } $(document).ready(function(){ // Delete product $('.delete').click(function(){ var el = this; var id = this.id; // Delete id var action = "Delete"; //Define action variable value Delete // AJAX Request $.ajax({ url: 'ajax_shopping_cart_action.php', type: 'POST', data: { id:id, action:action }, success: function(response){ // Removing row from HTML Table $(el).closest('tr').css('background','tomato'); $(el).closest('tr').fadeOut(800, function(){ $(this).remove(); }); $("#ajax_shopping_cart").load("ajax_shopping_cart.php"); } }); }); }); </script> 1-B/ ajax_shopping_cart_action.php <?php require('includes/application_top.php'); if($_POST["action"] == "Delete"){ if(isset($_POST["id"])){ $cart->remove($_POST["id"]); } } if($_POST["action"] == "Update"){ if(isset($_POST["id"])){ $cart->add_cart($_POST['id'], $_POST['qty'], $attributes, false); } } ?> 2/ Modify tpl_cm_footer_modal_cart.php 2-A/ Hide <?php echo $cart_contents_string; ?> <p style="text-align: right; padding: 1px;"><strong><?php echo MODULE_CONTENT_FOOTER_MODAL_CART_TOTAL . $currencies->format($cart->show_total()); ?></strong></p> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button><?php echo tep_draw_button(MODULE_CONTENT_FOOTER_MODAL_CART_HEADING_TITLE . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link('shopping_cart.php')) . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'fas fa-angle-right', tep_href_link('checkout_shipping.php', '', 'SSL')); ?> </div> 2-B/ Add after <div class="modal-body"> <div id="ajax_shopping_cart"></div> <script> $(document).ready(function(){ $("#ajax_shopping_cart").load("ajax_shopping_cart.php"); }); </script> That all If someone can help me to update products with attributes it will be nice.
  7. For "Your shopping cart (x)" button : in "tpl_cm_footer_modal_cart.php" hide : <?php /* <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button><?php echo tep_draw_button(MODULE_CONTENT_FOOTER_MODAL_CART_HEADING_TITLE . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link('shopping_cart.php')) . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'fas fa-angle-right', tep_href_link('checkout_shipping.php', '', 'SSL')); ?> </div> */?> and in "ajax_shopping_cart_total.php" add after ?> : <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button><?php echo tep_draw_button(MODULE_CONTENT_FOOTER_MODAL_CART_HEADING_TITLE . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link('shopping_cart.php')) . tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'fas fa-angle-right', tep_href_link('checkout_shipping.php', '', 'SSL')); ?> </div>
  8. hugo_064

    Admin responsive sidebar with bootstrap

    Hi piernas, Think you for your great job. I try to install it on a fresh osc 2.3.4 and on fresh osc 2.3.4.1 but expand or collapse menu didn't work. I downloaded jquery-2.2.3.min.js (i saw it in your template_top.php) because osc 2.3.4 is on jquery-1.11.1.min.js but same result, can't expand or collapse the menu. Witch version of osc did u use for that ? Can you help me to resolve it ? Sincerly
×