Post by aaron4osu » Thu Jun 25, 2015 11:08 pm

I've been searching for how to set up dynamic remarking on open cart, but I haven't been able to find any directions or "how to" guides. From what I've seen the extentions don't really give much instruction.

Has anyone had any luck with them?

Also, do you have to manually create an ad for each product? I was hoping that ad would be html based where the last product the customer visited is automatically served up in the ad along with the product title and maybe some customizable text. Are there any extensions that work that way?

Thanks

Newbie

Posts

Joined
Fri Nov 22, 2013 3:21 am

Post by IP_CAM » Fri Jun 26, 2015 12:56 am

aaron4osu wrote:1. ... how to set up dynamic remarking on open cart...
2. ... how to manually create an ad for each product? ... was hoping that ad would be html based...
1. Most readers will not understand the meaning of this. What are you trying to achieve ?

2. OpenShop does NOT have/use plain HTML- Templates, OC is Framework-Construction, moduled, to match any language, currency, and storing all 'variable' Content in it's database. If called upon, it will call/use different, specific Source Template and/or Code Files, as well a a ton of JS/JSON/etc. Scripts, to 'construct' an individually 'sampled' type of HTML Page.

The only 'REAL' HTML Content is placed in Files, mostly stored in the Theme/Template/ Subsections, some of it possibly in MODEL/whatever Subsections as well, depending on Mod-Writers. The VqMod Files also may contain HTML Content, but all the HTML Content, usually, only exists as Table <table></table>, TableRow <tr></tr>, TableData<td></td>, and their content, usually containing Text($variables), Images, PHP Commands, 'Variables', lists and links, e.t.c.! Most everything, VISUALLY, else is SET/DEFINED by CSS. And all the Content, placed by use of i.E. Wysiwyg Editors, is usually placed, as (secured/filtered) Section HTML Content, in DB as well.

I am fully aware of your Problem, it took me a Year, go get used to do it the OC way, and I should have started with OC one year later, anyway, because I'm now stuck with OC v.1.5.6.x, because OC v.2.x is, in many things, different again, and I'm just too old and tired, to now start over again, trying to understand all that 'responsive' Garbage, making it even harder, to find / modify anything, correctly, if one want's to enlarge/reduce a simple little field... , just to give you an example.

So, take it, as it comes. It's not gonna change anyway... ::)

Good Luck
Ernie
ipc.li/shop/

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Dhaupin » Tue Jun 30, 2015 12:16 am

Those ads are created from feeds in google merchant center: https://support.google.com/merchants/answer/188494

So all you do is link to your merchant account feed then tell Adwords what products to use. The prob with OC is that its Gbase feed hasn't been updated since about the beginning of time. So this means that you either need to make it compliant, or grab an extension that will properly feed Google merchant center.

If you want a really crappy backwoods fix for 1.5.6.x that barely works to get feeds rolling, here is a free vQ we made hah there are absolutely no guarantees it will work, and its missing G categories. We just made it to get validated not to comply ;)

Code: Select all

<modification>

	<id><![CDATA[Removes taxes from feed. Fixes multistore channel and item images link. Replaces spaces in image folders and minifies item desc. Removes image scaling, no need for scaling these. Removes the default no image. Repairs model number to be correct with conditional identifier_exists and fixes UPC and EAN. Fixes sale_price attrib and adds scheduling and date safety of 1 year for undefined sale lengths. Adds date available. Adds grouped product from-price support. Fixes weight to be shipping_weight and adds 0.00 conditional to hide it then make free ship. Adds is_bundle for model numbers called grouped. Includes operations to make new lines and proper tabbing for human readability.]]></id>
	<version><![CDATA[1.0.8]]></version>
	<vqmver><![CDATA[2.4.1]]></vqmver>
	<author><![CDATA[CreadevDotOrg]]></author>

	<file name="catalog/controller/feed/google_base.php">
		
		<!-- ### Begin adding tabs and newlines -->
		<operation info="XML newline" error="log">
			<search position="replace"><![CDATA[
				$output  = '<?xml version="1.0" encoding="UTF-8" ?>';
			]]></search>
			<add><![CDATA[
				$output  = '<?xml version="1.0" encoding="UTF-8" ?>' . "\r\n";
			]]></add>
		</operation>
		<operation info="RSS newline formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">';
			]]></search>
			<add><![CDATA[
				$output .= '<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">' . "\r\n";
			]]></add>
		</operation>
		<operation info="RSS CHANNEL formatting start" error="log">
			<search position="replace"><![CDATA[
				$output .= '<channel>';
			]]></search>
			<add><![CDATA[
				$output .= "\t" . '<channel>' . "\r\n\r\n";
			]]></add>
		</operation>
		<operation info="RSS CHANNEL formatting end" error="log">
			<search position="replace"><![CDATA[
				$output .= '</channel>'; 
			]]></search>
			<add><![CDATA[
				$output .= "\t" . '</channel>' . "\r\n";
			]]></add>
		</operation>
		<operation info="RSS TITLE formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<title>' . $this->config->get('config_name') . '</title>'; 
			]]></search>
			<add><![CDATA[
				$output .= "\t\t" . '<title>' . $this->config->get('config_name') . '</title>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="RSS DESC formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<description>' . $this->config->get('config_meta_description') . '</description>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t" . '<description>' . $this->config->get('config_meta_description') . '</description>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="RSS LINK formatting - includes extra line break" error="log">
			<search position="replace"><![CDATA[
				$output .= '<link>' . HTTP_SERVER . '</link>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t" . '<link>' . $this->config->get('config_url') . '</link>' . "\r\n\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM formatting start" error="log">
			<search position="replace"><![CDATA[
				$output .= '<item>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t" . '<item>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM formatting end - includes extra line break" error="log">
			<search position="replace"><![CDATA[
				$output .= '</item>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t" . '</item>' . "\r\n\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM TITLE formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<title>' . $product['name'] . '</title>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<title>' . $product['name'] . '</title>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM LINK formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<link>' . $this->url->link('product/product', 'product_id=' . $product['product_id']) . '</link>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<link>' . $this->url->link('product/product', 'product_id=' . $product['product_id']) . '</link>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM DESCRIPTION formatting - break before and after desc" error="log">
			<search position="replace"><![CDATA[
				$output .= '<description>' . $product['description'] . '</description>';
			]]></search>
			<add><![CDATA[
				$whitespace_desc = preg_replace('/\s+/', ' ', $product['description']);
				// $whitespace_desc = preg_replace('/[[:blank:]]+/', ' ', $product['description']);
				$clean_desc = str_replace('°', '&deg;', $whitespace_desc);
				$output .= "\t\t\t" . '<description>' . $clean_desc . '</description>' . "\r\n";
			]]></add>
		</operation>
		<operation info="ITEM BRAND formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:brand>' . html_entity_decode($product['manufacturer'], ENT_QUOTES, 'UTF-8') . '</g:brand>';
			]]></search>
			<add><![CDATA[
				if ($product['manufacturer']) {
					$output .= "\t\t\t" . '<g:brand>' . html_entity_decode($product['manufacturer'], ENT_QUOTES, 'UTF-8') . '</g:brand>' . "\r\n"; 
				}
			]]></add>
		</operation>
		<operation info="ITEM CONDITION formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:condition>new</g:condition>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<g:condition>New</g:condition>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM ID formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:id>' . $product['product_id'] . '</g:id>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<g:id>' . $product['product_id'] . '</g:id>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM PRICE SPECIAL formatting with date safety support - note we didnt use date(c)" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:price>' .  $this->currency->format($this->tax->calculate($product['special'], $product['tax_class_id']), $currency_code, $currency_value, false) . '</g:price>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<g:price>' . $this->currency->format($product['price'], $currency_code, $currency_value, false) . '</g:price>' . "\r\n";
				
				$output .= "\t\t\t" . '<g:sale_price>' .  $this->currency->format($product['special'], $currency_code, $currency_value, false) . '</g:sale_price>' . "\r\n";
			
				$special_date = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_special WHERE product_id = '" . $product['product_id'] . "'");
				
				$date_start_safety = str_replace('0000-00-00', date('Y-m-d', strtotime("yesterday")), $special_date->row['date_start']);
				
				$date_end_safety = str_replace('0000-00-00', date('Y-m-d', strtotime("+1 year")), $special_date->row['date_end']);

				$output .= "\t\t\t" . '<g:sale_price_effective_date>' . $date_start_safety .'T00:00' . date('O') . '/' . $date_end_safety .'T00:00' . date('O') . '</g:sale_price_effective_date>' . "\r\n";
			]]></add>
		</operation>
		<operation info="ITEM PRICE NORMAL formatting with grouped product ultimate support" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:price>' . $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id']), $currency_code, $currency_value, false) . '</g:price>';
			]]></search>
			<add><![CDATA[
				if (($product['price'] == '0.0000') && ($product['model'] == 'grouped')) {
					$output .= "\t\t\t" . '<g:price>' . $this->currency->format($product['pgprice_from'], $currency_code, $currency_value, false) . '</g:price>' . "\r\n";
				} else {
					$output .= "\t\t\t" . '<g:price>' . $this->currency->format($product['price'], $currency_code, $currency_value, false) . '</g:price>' . "\r\n";
				}
			]]></add>
		</operation>
		<operation info="ITEM CATEGORIES formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:product_type>' . $string . '</g:product_type>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<g:product_type>' . $string . '</g:product_type>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM QTY formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:quantity>' . $product['quantity'] . '</g:quantity>';
			]]></search>
			<add><![CDATA[
				$output .= "\t\t\t" . '<g:quantity>' . $product['quantity'] . '</g:quantity>' . "\r\n"; 
			]]></add>
		</operation>
		<operation info="ITEM SHIPPING WEIGHT with FREE SHIP formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:weight>' . $this->weight->format($product['weight'], $product['weight_class_id']) . '</g:weight>';
			]]></search>
			<add><![CDATA[
				if ($product['weight'] > '0.00') {
					$output .= "\t\t\t" . '<g:shipping_weight>' . $this->weight->format($product['weight'], $product['weight_class_id']) . '</g:shipping_weight>' . "\r\n";
				} else {
					$output .= "\t\t\t" . '<g:shipping><price>0</price></g:shipping>' . "\r\n";
				}
			]]></add>
		</operation>
		<operation info="ITEM AVAILABILITY WITH DATE formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:availability>' . ($product['quantity'] ? 'in stock' : 'out of stock') . '</g:availability>';
			]]></search>
			<add><![CDATA[
			
				$output .= "\t\t\t" . '<g:availability>' . ($product['quantity'] ? 'In Stock' : 'Out of Stock') . '</g:availability>' . "\r\n";
				$output .= "\t\t\t" . '<g:availability_date>' . $product['date_available'] . 'T00:00' . date('O') . '</g:availability_date>' . "\r\n";
			]]></add>
		</operation>


		<!-- ### Begin performance and include formatting -->
		<operation info="wipes YES image resizing" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:image_link>' . $this->model_tool_image->resize($product['image'], 500, 500) . '</g:image_link>';
			]]></search>
			<add><![CDATA[
				$clean_image = str_replace(' ', '%20', $product['image']);
				$output .= "\t\t\t" . '<g:image_link>' . $this->config->get('config_url') . 'image/' . $clean_image . '</g:image_link>' . "\r\n";
			]]></add>
		</operation>
		<operation info="wipes NO image resizing" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:image_link>' . $this->model_tool_image->resize('no_image.jpg', 500, 500) . '</g:image_link>';
			]]></search>
			<add><![CDATA[
				// $output .= "\t\t\t" . '<g:image_link>' . $this->config->get('config_url') . 'image/no_image.jpg</g:image_link>' . "\r\n";
				$output .= "\t\t\t" . '<g:image_link></g:image_link>' . "\r\n";
			]]></add>
		</operation>
		<operation info="UPC and EAN conditional and formatting" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:upc>' . $product['upc'] . '</g:upc>'; 
			]]></search>
			<add><![CDATA[
				if ($product['upc']) {
					$output .= "\t\t\t" . '<g:upc>' . $product['upc'] . '</g:upc>' . "\r\n";
				}
				
				if ($product['ean']) {
					$output .= "\t\t\t" . '<g:ean>' . $product['ean'] . '</g:ean>' . "\r\n";
				}
			]]></add>
		</operation>
		<operation info="adds model conditional bundle and makes MPN conditional identifier exists" error="log">
			<search position="replace"><![CDATA[
				$output .= '<g:mpn>' . $product['model'] . '</g:mpn>';
			]]></search>
			<add><![CDATA[
				if ($product['model'] == 'grouped') {
					$output .= "\t\t\t" . '<g:model_number>' . $product['model'] . '</g:model_number>' . "\r\n";
					$output .= "\t\t\t" . '<g:is_bundle>TRUE</g:is_bundle>' . "\r\n";
				} else {
					$output .= "\t\t\t" . '<g:model_number>' . $product['model'] . '</g:model_number>' . "\r\n";
				}
				
				if ($product['mpn']) {
					$output .= "\t\t\t" . '<g:mpn>' . $product['mpn'] . '</g:mpn>' . "\r\n";
				} else {
					$output .= "\t\t\t" . '<g:identifier_exists>FALSE</g:identifier_exists>' . "\r\n";
				}
			]]></add>
		</operation>

	</file>

</modification>

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA
Who is online

Users browsing this forum: Amazon [Bot] and 93 guests