Post by stonehinged » Sat Apr 07, 2012 12:25 am

Can anyone provide assistance that would help me return the product model variable in footer.tpl preferably with a vQmod? I'm using 1.5.2.1

Ideally,
if:
on a product page the variable is returned for that product,
on a category page the variable is returned for the first product listed,
on a checkout page the variable is returned for the first product in the cart,

else if:
not any of these pages the variable returns null.

Way too complicated for my programming skill level :o

Thanks for any help!

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US

Post by JAY6390 » Sat Apr 07, 2012 5:29 am

The only way I can think of is to pass this to the document object and then retrieve it using the footer controller, however something like that isn't as simple as it sounds

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by stonehinged » Sat Apr 07, 2012 10:20 pm

Thanks Jay, figured as much, simply beyond my capabilities. But that never keeps me from trying and experimenting.

For now I'd be happy with it returning a product model number if on the product page and null if any other page.

Thanks for replying back.

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US

Post by JAY6390 » Sat Apr 07, 2012 10:27 pm

Note this is untested

/catalog/controller/common/footer.php
Add this code before the render:

Code: Select all

$model = false;
if(!empty($this->request->get['route']) && $this->request->get['route'] == 'product/product' && !empty($this->request->get['product_id'])) {
    $product_id = (int)$this->request->get['product_id'];
    $this->load->model('catalog/product');
    $product = $this->model_catalog_product->getProduct($product_id);
    if($product) {
        $model = $product['model'];
    }
}

$this->data['model'] = $model; 
In the footer.tpl file, wherever you want the model, use

Code: Select all

<?php if(!empty($model)) echo $model; ?>

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by stonehinged » Mon Apr 09, 2012 2:27 am

Jay... brilliant! I can't thank you enough!

It has worked perfectly in my vQmod.

Hats off! You guys that know what you're doing really rock! I wish I had your talents. This latest code for Google Trusted Stores has been a bear but this should fulfill the requirement.

Thanks so much again!

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US

Post by Demon5 » Wed Jun 13, 2012 9:14 pm

I received the below email from trusted stores. How did you go about the feeds? Could use a vqmod for this on 1.5.2.1+


Hello,

Thank you for applying for the Trusted Stores program! We see that you've completed part of the signup process and wanted to follow up with you regarding next steps.

We've reviewed your integration and noticed that while you have successfully set up your account, the shipment and cancellation data feeds as well as the the badge and opt-in module JavaScript elements must all be implemented before we can start reviewing your application.

Please see the following links for more details:
http://support.google.com/trustedstores ... er=2609890
http://support.google.com/trustedstores ... er=2609894

Please let us know once both the data feeds and JavaScript elements are in place, and feel free to reach out if you have any questions!

Sincerely,
The Google Trusted Stores Team

https://www.lotnllc.com is your one stop shop for all your computer needs!


User avatar
Active Member

Posts

Joined
Sat Jun 19, 2010 4:12 am
Location - Sacramento, CA
Who is online

Users browsing this forum: No registered users and 24 guests