Post by Qphoria » Fri May 08, 2009 9:31 pm

:P O0

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by BlubberLine » Sat May 09, 2009 7:02 am

Hi Daniel. Your AJAX Module is a fantastic gimmick. It makes shopping to a fun.
Sorry about it. I've something to complain.

a) Custumer gets two Emails when ordering - Webmaster none
b) Wouldn't it be an idea to give extension / Shipping the possibility to ad own Shipping methods
c) Opening a single flat file for Terms & Condition

Well, the rest you know.

Best regards

Germany / Flensburg

Newbie

Posts

Joined
Sun Apr 26, 2009 10:57 pm

Post by Daniel » Sat May 09, 2009 8:24 am

a) Custumer gets two Emails when ordering - Webmaster none
change the setting in the settings alert mail to true.

b) Wouldn't it be an idea to give extension / Shipping the possibility to ad own Shipping methods
Customers can add there own method. Do you mean they can add there own titles and cost via a input box.

c) Opening a single flat file for Terms & Condition
I might be able to have it so a box slides ut with the terms in.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Sat May 09, 2009 8:35 am

Just for people having problems with the ajax cart. This is the best way i have foudnt to get the right results so far:

Code: Select all


$(document).ready(function () {
	$('#add_to_cart').replaceWith('<a onclick="" id="add_to_cart" class="button">' + $('#add_to_cart').html() + '</a>');

	$('#add_to_cart').click(function () {
		$.ajax({
			url: 'index.php?route=module/cart/callback',
			dataType: 'html',
			async: false,
			beforeSend: function () {
				$.ajax({
					type: 'post',
					url: 'index.php?route=checkout/cart',
					data: $('#product :input')
				});				
			},
			complete: function () {
				var image = $('#image').offset();
				var cart  = $('#module_cart').offset();
	
				$('#image').before('<img src="' + $('#image').attr('src') + '" id="temp" style="position: absolute; top: ' + image.top + 'px; left: ' + image.left + 'px;" />');
	
				params = {
					top : cart.top + 'px',
					left : cart.left + 'px',
					opacity : 0.0,
					width : $('#module_cart').width(),  
					heigth : $('#module_cart').height()
				};		
	
				$('#temp').animate(params, 'slow', false, function () {
					$('#temp').remove();
				});				
			},
			success: function (html) {
				$('#module_cart .middle').html(html);
			}
		});
	});			
});

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by leovicio » Sat May 09, 2009 9:06 am

Não funciona essa função ta peindo o callback antes de inserir o procuto no carrinho

se não tem nada no carrinho não retorna nada no tem callback


This function does not work ta peindo the callback before entering the procuto to cart

it has nothing to cart does not return anything in the callback has


assim ta perfeito
ele só carrega o callback apos inseir o produto no carrinho

ta so perfect
it only loads the callback after the insecticide product to cart

Code: Select all

$(document).ready(function () {
	$('#add_to_cart').replaceWith('<a onclick="" id="add_to_cart" class="button">' + $('#add_to_cart').html() + '</a>');

	$('#add_to_cart').click(function () {
		$.ajax({
			type: 'post',
			url: 'index.php?route=checkout/cart',
		 data: $('#product :input'),
         success: function(){
         $('#module_cart .dvi2').load('index.php?route=module/cart/callback');
         }
      });   
	
		var image = $('#image').offset();
		var cart  = $('#module_cart').offset();
	
		$('#image').before('<img src="' + $('#image').attr('src') + '" id="temp" style="position: absolute; top: ' + image.top + 'px; left: ' + image.left + 'px;" />');
	
		params = {
			top : cart.top + 'px',
			left : cart.left + 'px',
			opacity : 0.0,
			width : $('#module_cart').width(),  
			heigth : $('#module_cart').height()
		};		
	
		$('#temp').animate(params, 'slow', false, function () {
			$('#temp').remove();
		});			
	});			
});

User avatar
Newbie

Posts

Joined
Sun Apr 12, 2009 11:43 am

Post by leovicio » Sat May 09, 2009 9:12 am

ops
I'm using another template

Code: Select all

$(document).ready(function () {
	$('#add_to_cart').replaceWith('<a onclick="" id="add_to_cart" class="button">' + $('#add_to_cart').html() + '</a>');

	$('#add_to_cart').click(function () {
		$.ajax({
			type: 'post',
			url: 'index.php?route=checkout/cart',
		 data: $('#product :input'),
         success: function(){
         $('#module_cart .middle').load('index.php?route=module/cart/callback');
         }
      });   
	
		var image = $('#image').offset();
		var cart  = $('#module_cart').offset();
	
		$('#image').before('<img src="' + $('#image').attr('src') + '" id="temp" style="position: absolute; top: ' + image.top + 'px; left: ' + image.left + 'px;" />');
	
		params = {
			top : cart.top + 'px',
			left : cart.left + 'px',
			opacity : 0.0,
			width : $('#module_cart').width(),  
			heigth : $('#module_cart').height()
		};		
	
		$('#temp').animate(params, 'slow', false, function () {
			$('#temp').remove();
		});			
	});			
});

User avatar
Newbie

Posts

Joined
Sun Apr 12, 2009 11:43 am

Post by leovicio » Sat May 09, 2009 9:16 am

suggestion to see Privacy Policy in Create Account
view Privacy Policy with thickbox \ visualiar Privacy Policy com thickbox


catalog\language\english\account\create.php
replace \ substituir

line 13 \linha 13
$_['text_agree'] = 'I have read and agree to the <a onclick="window.open(\'%s\');"><b>%s</b></a>';


to / por
$_['text_agree'] = 'I have read and agree to the <a class="thickbox" href="%s?keepThis=true&TB_iframe=true&height=400&width=600"><b>%s</b></a>';


catalog\controller\account\create.php

replace \ substituir
line 138 \ linha 138

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->http('information/information&information_id=' . $this->config->get('config_account')), $information_info['title']);

to / por
$this->data['text_agree'] = sprintf($this->language->get('text_agree'), 'index.php?route=information/information/callback&information_id='. $this->config->get('config_account'), $information_info['title']);


catalog\controller\information\information.php

replace at the end of the code \ substituir no final do codigo
line 64 and 65 \ linha 64 e 65

}
?>

to \ por

public function callback() {
$this->load->language('information/information');

$this->load->model('catalog/information');

$this->document->breadcrumbs = array();

$this->document->breadcrumbs[] = array(
'href' => $this->url->http('common/home'),
'text' => $this->language->get('text_home'),
'separator' => FALSE
);

$information_info = $this->model_catalog_information->getInformation(@$this->request->get['information_id']);

if ($information_info) {
$this->document->title = $information_info['title'];

$this->document->breadcrumbs[] = array(
'href' => $this->url->http('information/information&information_id=' . $this->request->get['information_id']),
'text' => $information_info['title'],
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $information_info['title'];

$this->data['description'] = html_entity_decode($information_info['description']);

} else {
$this->document->breadcrumbs[] = array(
'href' => $this->url->http('information/information&information_id=' . $this->request->get['information_id']),
'text' => $this->language->get('text_error'),
'separator' => $this->language->get('text_separator')
);

$this->data['heading_title'] = $this->language->get('text_error');

$this->data['description'] = $this->language->get('text_error');

}

$ouput = '<table border="0" cellpadding="0" cellspacing="0" class="dvi2" style="width: 100%;">
<tr>
<td valign="middle" align="left" height="30"><b>'.$this->data['heading_title'].'</b></td>
</tr>
<tr>
<td align="left" valign="top">'.$this->data['description'].'</td>
</tr>
</table>';

$this->response->setOutput($ouput);
}
}
?>

User avatar
Newbie

Posts

Joined
Sun Apr 12, 2009 11:43 am

Post by phpuk » Sat May 09, 2009 9:39 am

AJAX issue...

This still does not work in any browser when adding the first item.

This is what I am seeing with Daniels original and the updated solution...

1. I first clear my browser cache (any browser) then exit the browser.
2. Re-launch the browser.
--> The first 2 steps are to simulate a new visitor arriving at the web site.
3. Select for example I_Pod
4. Click add to cart
5. The cart side module then inserts 1 blank line and under that Sub-Total: £0.00.

When I look at the HTML source I see:

Code: Select all

<div id="module_cart" class="box">
  <div class="top"><img src="catalog/view/theme/default/image/icon_basket.png" alt="" />Shopping Cart</div>
  <div class="middle">
        <div style="text-align: center;">0 items</div>
      </div>

  <div class="bottom">&nbsp;</div>
</div>
If I refresh the page or click home for example then the cart is updated and then works perfectly from then on when adding more items.

When using leovicio solution the cart is never updated until a page refresh occurs either by clicking refresh or moving to another page clicking home for example.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by phpuk » Sat May 09, 2009 10:35 am

AJAX issue Update!

leovicio must have posted an update whilst I was writing my post.

leovicio the code appears to work ok!!!

I have tested it in a number of browsers and they all appear to function correctly.

Thank you Daniel and leovicio for posting your solutions so quickly.

The fast turn around to this possible resolution to this core code issue has been excellent!!!

I prefer to ensure that I only develop with actual version controlled core code so I don't get any surprises later down the line so If accepted as a solution to this and added to the core I don't have to wait for the next release. BONUS!!!

This is how I am used to working so more of this please.

Thanks again...

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by alexbox » Sat May 09, 2009 4:00 pm

Hi Daniel, no reply for my question ? :-[

Newbie

Posts

Joined
Thu Mar 19, 2009 6:23 pm

Post by halalan » Sat May 09, 2009 9:30 pm

I am now lost... has the AJAX issue be corrected in the 1.2.8 version or will it now have to wait until the next 1.2.9??

Were exactly to place the code in what file is not clear in the post above, could someone help clarify or make the fix in the current v1.2.8 version... I still think calling these RC (release candidate) is more in line with how other development open source sites handle releases.

Great opencart developement, but release speed confusing still...I know these are considered BETA versions, so please add the RC to them for quick recongnition.

Helping Each Other With Knowledge....
WHPOA.NET CTOA.NET CEMETERYTN.COM


User avatar
New member

Posts

Joined
Sat Mar 28, 2009 3:13 am
Location - U.S.A.

Post by phpuk » Sat May 09, 2009 9:57 pm

Hi halalan,

AJAX Script update:

Script: catalog/view/theme/default/template/module/cart.tpl

The current fix is:

Code: Select all

$(document).ready(function () {
   $('#add_to_cart').replaceWith('<a onclick="" id="add_to_cart" class="button">' + $('#add_to_cart').html() + '</a>');

   $('#add_to_cart').click(function () {
      $.ajax({
         type: 'post',
         url: 'index.php?route=checkout/cart',
       data: $('#product :input'),
         success: function(){
         $('#module_cart .middle').load('index.php?route=module/cart/callback');
         }
      });

      var image = $('#image').offset();
      var cart  = $('#module_cart').offset();

      $('#image').before('<img src="' + $('#image').attr('src') + '" id="temp" style="position: absolute; top: ' + image.top + 'px; left: ' + image.left + 'px;" />');

      params = {
         top : cart.top + 'px',
         left : cart.left + 'px',
         opacity : 0.0,
         width : $('#module_cart').width(),
         heigth : $('#module_cart').height()
      };

      $('#temp').animate(params, 'slow', false, function () {
         $('#temp').remove();
      });
   });
});
This however has not been acknowledged by Daniel as the final solution as is therefore simply an option at the moment.

With the speed of development at the moment release candidates would not be very beneficial. Daniel updates the version number so that should be enough for now. You should view them all as BETA release candidates although the product is stable.

A version number displayed in the Admin section would be useful though.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by BlubberLine » Sun May 10, 2009 12:57 am

What I've noticed:
config.php define('DB_PREFIX', 'cart_');
But not used!

opencart sql
INSERT INTO `setting` (`setting_id`, `group`, `key`, `value`) VALUES

(6564, 'cart', 'cart_sort_order', '1'),
(6563, 'cart', 'cart_status', '1'),
(6561, 'cart', 'cart_ajax', '1'),
(6562, 'cart', 'cart_position', 'right');

View Source
$(document).ready(function () {
$('#add_to_cart').replaceWith('<a onclick="" id="add_to_cart" class="button">' + $('#add_to_cart').html() + '</a>');

Newbie

Posts

Joined
Sun Apr 26, 2009 10:57 pm

Post by halalan » Sun May 10, 2009 5:36 am

Adding the version in the ADMIN would be helpful. Thanks for clearing up the file for the temporary fix for the AJAX problem

User avatar
New member

Posts

Joined
Sat Mar 28, 2009 3:13 am
Location - U.S.A.

Post by phpuk » Sun May 10, 2009 5:40 am

Your welcome halalan.

Be careful though as I don't know if this will be the final resolution to the issue so be prepared for more updates.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by leovicio » Sun May 10, 2009 7:27 am

As I think anyone pay attention to posting again a nice way to display the Privacy Policy in the form of the account creation

view Privacy Policy with thickbox
catalog \ language \ english \ account \ create.php

replace with this
line 13

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a onclick="window.open(\'%s\');"><b>%s</b></a>';
replace with this

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a class="thickbox" href="%s?keepThis=true&TB_iframe=true&height=400&width=600"><b>%s</b></a>';
catalog \ controller \ account \ create.php

replace with this
line 138

Code: Select all

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->http('information/information&information_id=' . $this->config->get('config_account')), $information_info['title']);
replace with this

Code: Select all

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), 'index.php?route=information/information/callback&information_id='. $this->config->get('config_account'), $information_info['title']);
catalog \ controller \ information \ information.php

replace at the end of the code
line 64 and 65

Code: Select all

}
?>
replace with this

Code: Select all

public function callback() {
		$this->load->language('information/information');
		
		$this->load->model('catalog/information');
		
		$this->document->breadcrumbs = array();
		
      	$this->document->breadcrumbs[] = array(
        	'href'      => $this->url->http('common/home'),
        	'text'      => $this->language->get('text_home'),
        	'separator' => FALSE
      	);
		
		$information_info = $this->model_catalog_information->getInformation(@$this->request->get['information_id']);
		
		if ($information_info) {
	  		$this->document->title = $information_info['title']; 

      		$this->document->breadcrumbs[] = array(
        		'href'      => $this->url->http('information/information&information_id=' . $this->request->get['information_id']),
        		'text'      => $information_info['title'],
        		'separator' => $this->language->get('text_separator')
      		);		
		
		$this->data['heading_title'] = $information_info['title'];
		
		$this->data['description'] = html_entity_decode($information_info['description']);
		
		} else {
      		$this->document->breadcrumbs[] = array(
        		'href'      => $this->url->http('information/information&information_id=' . $this->request->get['information_id']),
        		'text'      => $this->language->get('text_error'),
        		'separator' => $this->language->get('text_separator')
      		);
		
      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['description'] = $this->language->get('text_error');
		
		}

		$ouput = '<table border="0" cellpadding="0" cellspacing="0" class="dvi2" style="width: 100%;">
  <tr>
    <td valign="middle" align="left" height="30"><b>'.$this->data['heading_title'].'</b></td>
  </tr>
  <tr>
    <td align="left" valign="top">'.$this->data['description'].'</td>
  </tr>
</table>';
		
		$this->response->setOutput($ouput);
	} 	
}
?>
see how that is
privacy.jpg

privacy.jpg (78.66 KiB) Viewed 6128 times


User avatar
Newbie

Posts

Joined
Sun Apr 12, 2009 11:43 am

Post by phpuk » Sun May 10, 2009 8:53 am

Hi,

I did have a look and agree that it does look better.

Version 1.2.8 opens the terms and conditions in the checkout in a new window so maybe you could modify the code using your solution to display the Term and Conditions in a Thickbox also?

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by leovicio » Sun May 10, 2009 10:46 am

view Privacy Policy with thickbox in Payment Information

catalog \ language \ english \ checkout \ payment.php

replace
line 14

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a onclick="window.open(\'%s\');"><b>%s</b></a>';
replace with this

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a class="thickbox" href="%s?keepThis=true&TB_iframe=true&height=400&width=600"><b>%s</b></a>';

catalog \ controller \ checkout \ payment.php

replace
line 176

Code: Select all

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->http('information/information&information_id=' . $this->config->get('config_checkout')), $information_info['title']);

replace with this

Code: Select all

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), 'index.php?route=information/information/callback&information_id='. $this->config->get('config_checkout'), $information_info['title']);
See how it is
privacy2.jpg

privacy2.jpg (113.75 KiB) Viewed 6115 times



-----------------------------------------------------------------------------------------------------------

As I think anyone pay attention to posting again a nice way to display the Privacy Policy in the form of the account creation

view Privacy Policy with thickbox
catalog \ language \ english \ account \ create.php

replace
line 13

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a onclick="window.open(\'%s\');"><b>%s</b></a>';
replace with this

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a class="thickbox" href="%s?keepThis=true&TB_iframe=true&height=400&width=600"><b>%s</b></a>';
catalog \ controller \ account \ create.php

replace
line 138

Code: Select all

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), $this->url->http('information/information&information_id=' . $this->config->get('config_account')), $information_info['title']);
replace with this

Code: Select all

$this->data['text_agree'] = sprintf($this->language->get('text_agree'), 'index.php?route=information/information/callback&information_id='. $this->config->get('config_account'), $information_info['title']);
catalog \ controller \ information \ information.php

replace at the end of the code
line 64 and 65

Code: Select all

}
?>
replace with this

Code: Select all

public function callback() {
		$this->load->language('information/information');
		
		$this->load->model('catalog/information');
		
		$this->document->breadcrumbs = array();
		
      	$this->document->breadcrumbs[] = array(
        	'href'      => $this->url->http('common/home'),
        	'text'      => $this->language->get('text_home'),
        	'separator' => FALSE
      	);
		
		$information_info = $this->model_catalog_information->getInformation(@$this->request->get['information_id']);
		
		if ($information_info) {
	  		$this->document->title = $information_info['title']; 

      		$this->document->breadcrumbs[] = array(
        		'href'      => $this->url->http('information/information&information_id=' . $this->request->get['information_id']),
        		'text'      => $information_info['title'],
        		'separator' => $this->language->get('text_separator')
      		);		
		
		$this->data['heading_title'] = $information_info['title'];
		
		$this->data['description'] = html_entity_decode($information_info['description']);
		
		} else {
      		$this->document->breadcrumbs[] = array(
        		'href'      => $this->url->http('information/information&information_id=' . $this->request->get['information_id']),
        		'text'      => $this->language->get('text_error'),
        		'separator' => $this->language->get('text_separator')
      		);
		
      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['description'] = $this->language->get('text_error');
		
		}

		$ouput = '<table border="0" cellpadding="0" cellspacing="0" class="dvi2" style="width: 100%;">
  <tr>
    <td valign="middle" align="left" height="30"><b>'.$this->data['heading_title'].'</b></td>
  </tr>
  <tr>
    <td align="left" valign="top">'.$this->data['description'].'</td>
  </tr>
</table>';
		
		$this->response->setOutput($ouput);
	} 	
}
?>
see how that is
privacy.jpg

privacy.jpg (78.66 KiB) Viewed 6113 times


User avatar
Newbie

Posts

Joined
Sun Apr 12, 2009 11:43 am

Post by alexbox » Sun May 10, 2009 9:46 pm

Why in admin demo of opencart.com i have admin->configuration->settings->Shop,local,option,MAIL,cache and in my localhost of oc1.2.8 i have only: admin->configuration->settings->Shop,local,option,cache....
I not have MAIL section ? ???

Newbie

Posts

Joined
Thu Mar 19, 2009 6:23 pm

Post by rpotterjr » Mon May 11, 2009 12:12 am

Any possibility that Authorize.Net will ever come out of the "Development" status? I don't quite understand why it is even listed as a feature if it hasn't even been completed as of yet. Typically something shouldn't listed if it hasn't been finished. I understand that the shopping cart script is free and will always be in developmen, moving towards a more feature packed solution, but when you list features prematurely as if they are already official "key" features it is a little misleading. I believe that this shop script has alot of potential and the fact that it is considered free open source is amazing.

I have noticed that there are a few members of this forum that have been offering the Authorize.Net feature for a cost. I believe one guy is selling it for $200+ and the other guy is selling it for $20. I guess my question is... At anytime in the near future is this actually going to become an actual feature of Opencart without having to purchase it from someone else?

Don't get me wrong. I am not attempting to be a cheap skate, I am just very cautious when it comes to buying things from an individual rather than an established company or organization. Paypal is the #1 gateway for fradulant sales and identity theft, and it's hard to tell if someone is selling something legit or not. I have purchased things in the past from indiduals such as "mods" for other opensource scripts such as cubecart, zencart, etc and eventhough it didn't happen often, I have been ripped off before when people try to take advantage of open source script providers by selling things to their users.

Also was wondering if U.S. English will ever be a choice as a language pack?

Newbie

Posts

Joined
Mon May 11, 2009 12:10 am
Who is online

Users browsing this forum: No registered users and 5 guests